加密密钥太短,请参阅 security.yml.example
encryption key is too short, see security.yml.example
OS - Ubuntu 16
日期 - 11/06/2017
我正在尝试在我的本地计算机上安装 Canvas LMS
。
正在关注 "https://github.com/instructure/canvas-lms/wiki/Production-Start"
这个 link
第一步 - 数据库安装和配置
正在安装 Postgres
a. sudo apt-get install postgresql-9.3
但是我遇到了一个错误
('postgresql-9.3' has no installation candidate)
所以,我使用了下面的命令
a. sudo apt-get update
b. sudo apt-get install postgresql postgresql-contrib
正在配置Postgres
a. sudo -u postgres createuser canvas --no-createdb \
--no-superuser --no-createrole --pwprompt (i set password `'portal'`)
b. sudo -u postgres createdb canvas_production --owner=canvas
第二步 - 获取代码
使用Git
a. sudo apt-get install git-core
b. git clone https://github.com/instructure/canvas-lms.git canvas
c. cd canvas
d. git branch --set-upstream-to origin/stable
代码安装
a. sudo mkdir -p /var/canvas
b. sudo chown -R anup /var/canvas
c. cd canvas
d. sudo cp -av . /var/canvas
e. cd /var/canvas
第三步 - 依赖安装
外部依赖性
a. sudo apt-get install software-properties-common
b. sudo apt-add-repository ppa:brightbox/ruby-ng
c. sudo apt-get update
d. sudo apt-get install ruby2.4 ruby2.4-dev zlib1g-dev libxml2-dev \
libsqlite3-dev postgresql libpq-dev \
libxmlsec1-dev curl make g++
e. curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
f. sudo apt-get install nodejs
g. sudo -u postgres createuser ultron
h. sudo -u postgres psql -c "alter user ultron with superuser" postgres
第四步 - Ruby 宝石
Bundler 和 Canvas 依赖项
a. sudo gem install bundler --version 1.13.6
b. bundle install --path vendor/bundle
Yarn
安装
a. curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
b. echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
c. sudo apt-get update && sudo apt-get install --allow-downgrades yarn=0.27.5-1 (Cause i'm using Ubuntu 16)
d. sudo apt-get install python
e. yarn install
第五步-Canvas默认配置
a. for config in amazon_s3 database \
delayed_jobs domain file_store outgoing_mail security external_migration; \
do cp config/$config.yml.example config/$config.yml; done
动态设置配置
a. cp config/dynamic_settings.yml.example config/dynamic_settings.yml
b. nano config/dynamic_settings.yml (Haven't Changed anything)
数据库配置
a. cp config/database.yml.example config/database.yml
b. nano config/database.yml
已更改自 -
--# do not create a queue: section for your test environment
--test:
-- adapter: postgresql
-- encoding: utf8
-- database: canvas_test
-- host: localhost
-- username: canvas
-- timeout: 5000
--
--development:
-- adapter: postgresql
-- encoding: utf8
-- database: canvas_development
-- timeout: 5000
--production:
-- adapter: postgresql
-- encoding: utf8
-- database: canvas_production
-- host: localhost
-- username: canvas
-- password: portal
-- timeout: 5000
至此
--# do not create a queue: section for your test environment
--test:
-- adapter: postgresql
-- encoding: utf8
-- database: canvas_test
-- host: localhost
-- username: canvas
-- timeout: 5000
--development:
-- adapter: postgresql
-- encoding: utf8
-- database: canvas_production
-- host: localhost
-- username: canvas
-- password: portal
-- timeout: 5000
--production:
-- adapter: postgresql
-- encoding: utf8
-- database: canvas_production
-- host: localhost
-- username: canvas
-- password: portal
-- timeout: 5000
外发邮件配置
a. cp config/outgoing_mail.yml.example config/outgoing_mail.yml
b. nano config/outgoing_mail.yml (Haven't Changed anything)
URL配置
a. cp config/domain.yml.example config/domain.yml
b. nano config/domain.yml
安全配置
一个。 cp config/security.yml.example config/security.yml
b.纳米 config/security.yml
第六步 - 生成资产
1.
a. cd /var/canvas
b. mkdir -p log tmp/pids public/assets app/stylesheets/brandable_css_brands
c. touch app/stylesheets/_brandable_variables_defaults_autogenerated.scss
d. touch Gemfile.lock
e. sudo chown -R anup config/environment.rb log tmp public/assets \
app/stylesheets/_brandable_variables_defaults_autogenerated.scss \
app/stylesheets/brandable_css_brands Gemfile.lock config.ru
f. yarn install
g. RAILS_ENV=production bundle exec rake canvas:compile_assets
Error - encryption key is too short, see security.yml.example, so i
changed the sequrity.yml.example
由此-
--production:
-- # replace this with a random string of at least 20 characters
-- encryption_key: 12345
--development:
-- encryption_key: facdd3a131ddd8988b14f6e4e01039c93cfa0160
-- previous_encryption_keys:
-- - 0610afc39c93010e4e6f41b8898ddd131a3ddcaf
--test:
-- encryption_key: facdd3a131ddd8988b14f6e4e01039c93cfa0160
到这个-
--production:
-- # replace this with a random string of at least 20 characters
-- encryption_key: facdd3a131ddd8988b14f6e4e01039c93cfa0160
--development:
-- encryption_key: facdd3a131ddd8988b14f6e4e01039c93cfa0160
-- previous_encryption_keys:
-- - 0610afc39c93010e4e6f41b8898ddd131a3ddcaf
--test:
-- encryption_key: facdd3a131ddd8988b14f6e4e01039c93cfa0160
问题未解决 - 无论我放在那里都会出现相同的错误
h. sudo chown -R anup public/dist/brandable_css
Getting this error -
cannot access 'public/dist/brandable_css': No such file or directory
我卡在这里了,请帮忙
谢谢!
根据冗长的一系列评论快速回答问题。
文件 security.yml 需要编辑,而不是 security.yml.example.
OS - Ubuntu 16 日期 - 11/06/2017
我正在尝试在我的本地计算机上安装 Canvas LMS
。
正在关注 "https://github.com/instructure/canvas-lms/wiki/Production-Start"
这个 link
第一步 - 数据库安装和配置
正在安装 Postgres
a. sudo apt-get install postgresql-9.3
但是我遇到了一个错误
('postgresql-9.3' has no installation candidate)
所以,我使用了下面的命令
a. sudo apt-get update b. sudo apt-get install postgresql postgresql-contrib
正在配置
Postgres
a. sudo -u postgres createuser canvas --no-createdb \ --no-superuser --no-createrole --pwprompt (i set password `'portal'`) b. sudo -u postgres createdb canvas_production --owner=canvas
第二步 - 获取代码
使用Git
a. sudo apt-get install git-core b. git clone https://github.com/instructure/canvas-lms.git canvas c. cd canvas d. git branch --set-upstream-to origin/stable
代码安装
a. sudo mkdir -p /var/canvas b. sudo chown -R anup /var/canvas c. cd canvas d. sudo cp -av . /var/canvas e. cd /var/canvas
第三步 - 依赖安装
外部依赖性
a. sudo apt-get install software-properties-common b. sudo apt-add-repository ppa:brightbox/ruby-ng c. sudo apt-get update d. sudo apt-get install ruby2.4 ruby2.4-dev zlib1g-dev libxml2-dev \ libsqlite3-dev postgresql libpq-dev \ libxmlsec1-dev curl make g++ e. curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - f. sudo apt-get install nodejs g. sudo -u postgres createuser ultron h. sudo -u postgres psql -c "alter user ultron with superuser" postgres
第四步 - Ruby 宝石
Bundler 和 Canvas 依赖项
a. sudo gem install bundler --version 1.13.6 b. bundle install --path vendor/bundle
Yarn
安装a. curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - b. echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list c. sudo apt-get update && sudo apt-get install --allow-downgrades yarn=0.27.5-1 (Cause i'm using Ubuntu 16) d. sudo apt-get install python e. yarn install
第五步-Canvas默认配置
a. for config in amazon_s3 database \ delayed_jobs domain file_store outgoing_mail security external_migration; \ do cp config/$config.yml.example config/$config.yml; done
动态设置配置
a. cp config/dynamic_settings.yml.example config/dynamic_settings.yml b. nano config/dynamic_settings.yml (Haven't Changed anything)
数据库配置
a. cp config/database.yml.example config/database.yml b. nano config/database.yml
已更改自 -
--# do not create a queue: section for your test environment
--test:
-- adapter: postgresql
-- encoding: utf8
-- database: canvas_test
-- host: localhost
-- username: canvas
-- timeout: 5000
--
--development:
-- adapter: postgresql
-- encoding: utf8
-- database: canvas_development
-- timeout: 5000
--production:
-- adapter: postgresql
-- encoding: utf8
-- database: canvas_production
-- host: localhost
-- username: canvas
-- password: portal
-- timeout: 5000
至此
--# do not create a queue: section for your test environment
--test:
-- adapter: postgresql
-- encoding: utf8
-- database: canvas_test
-- host: localhost
-- username: canvas
-- timeout: 5000
--development:
-- adapter: postgresql
-- encoding: utf8
-- database: canvas_production
-- host: localhost
-- username: canvas
-- password: portal
-- timeout: 5000
--production:
-- adapter: postgresql
-- encoding: utf8
-- database: canvas_production
-- host: localhost
-- username: canvas
-- password: portal
-- timeout: 5000
外发邮件配置
a. cp config/outgoing_mail.yml.example config/outgoing_mail.yml b. nano config/outgoing_mail.yml (Haven't Changed anything)
URL配置
a. cp config/domain.yml.example config/domain.yml b. nano config/domain.yml
安全配置 一个。 cp config/security.yml.example config/security.yml b.纳米 config/security.yml
第六步 - 生成资产
1.
a. cd /var/canvas
b. mkdir -p log tmp/pids public/assets app/stylesheets/brandable_css_brands
c. touch app/stylesheets/_brandable_variables_defaults_autogenerated.scss
d. touch Gemfile.lock
e. sudo chown -R anup config/environment.rb log tmp public/assets \
app/stylesheets/_brandable_variables_defaults_autogenerated.scss \
app/stylesheets/brandable_css_brands Gemfile.lock config.ru
f. yarn install
g. RAILS_ENV=production bundle exec rake canvas:compile_assets
Error - encryption key is too short, see security.yml.example, so i changed the sequrity.yml.example
由此-
--production:
-- # replace this with a random string of at least 20 characters
-- encryption_key: 12345
--development:
-- encryption_key: facdd3a131ddd8988b14f6e4e01039c93cfa0160
-- previous_encryption_keys:
-- - 0610afc39c93010e4e6f41b8898ddd131a3ddcaf
--test:
-- encryption_key: facdd3a131ddd8988b14f6e4e01039c93cfa0160
到这个-
--production:
-- # replace this with a random string of at least 20 characters
-- encryption_key: facdd3a131ddd8988b14f6e4e01039c93cfa0160
--development:
-- encryption_key: facdd3a131ddd8988b14f6e4e01039c93cfa0160
-- previous_encryption_keys:
-- - 0610afc39c93010e4e6f41b8898ddd131a3ddcaf
--test:
-- encryption_key: facdd3a131ddd8988b14f6e4e01039c93cfa0160
问题未解决 - 无论我放在那里都会出现相同的错误
h. sudo chown -R anup public/dist/brandable_css
Getting this error -
cannot access 'public/dist/brandable_css': No such file or directory
我卡在这里了,请帮忙
谢谢!
根据冗长的一系列评论快速回答问题。
文件 security.yml 需要编辑,而不是 security.yml.example.