Created
January 1, 2018 06:23
-
-
Save tienthanh2509/d4426a0d7e3bea8b80f8006b0acf3b12 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo 'gem: --no-document' >> ~/.gemrc | |
curl -sL https://deb.nodesource.com/setup_6.x | bash - | |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list | |
apt-get update | |
apt-get install -y git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev nodejs yarn | |
cd | |
wget --quiet http://ftp.ruby-lang.org/pub/ruby/2.4/ruby-2.4.2.tar.gz | |
tar -xzvf ruby-2.4.2.tar.gz | |
rm -f ruby-2.4.2.tar.gz | |
cd ruby-2.4.2/ | |
./configure --disable-install-doc --disable-install-rdoc | |
make -j12 | |
make install | |
ruby -v | |
gem install bundler | |
git config --global color.ui true | |
git config --global user.name "Thanh Pham" | |
git config --global user.email "[email protected]" | |
gem install rails -v 5.1.4 | |
rails -v | |
echo 'deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main' > /etc/apt/sources.list.d/pgdg.list | |
wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | apt-key add - | |
apt-get update | |
apt-get install -y postgresql-common postgresql-client libpq-dev | |
git clone --depth=1 -b stable https://github.com/instructure/canvas-lms.git ~/canvas-lms | |
cd ~/canvas-lms | |
apt install -y libxmlsec1-dev | |
bundle install | |
npm install -g [email protected] | |
npm install --verbose | |
for config in amazon_s3 delayed_jobs domain file_store outgoing_mail security external_migration; \ | |
do cp -v config/$config.yml.example config/$config.yml; done | |
cp config/dynamic_settings.yml.example config/dynamic_settings.yml | |
# Need run on PostgreSQL server | |
psql -c 'CREATE USER canvas' -d postgres | |
psql -c 'ALTER USER canvas CREATEDB' -d postgres | |
psql -c "ALTER USER canvas WITH PASSWORD '12345678'" -d postgres | |
createdb --username=postgres --owner=canvas canvas_development | |
echo -e "development:\n cache_store: redis_store" > config/cache_store.yml | |
echo -e "development:\n servers:\n - redis://tdmu_redis" > config/redis.yml | |
bundle exec rails db:initial_setup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment