From fa965b5f921ee9d9dbd22ffd3097d12df2a56823 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 5 Jun 2013 03:33:20 -0400 Subject: [PATCH] installdocs: Update with screenshots & more * add screenshots from Ubuntu config process * add instructions for updating predeployed VMs * add details on configuring mail server * don't install test gems into prod * no need for bundle exec * small cleanups --- docs/INSTALL-ubuntu.md | 49 ++++++++++++++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/docs/INSTALL-ubuntu.md b/docs/INSTALL-ubuntu.md index 8ade8f64660..cc2a3a51251 100644 --- a/docs/INSTALL-ubuntu.md +++ b/docs/INSTALL-ubuntu.md @@ -2,15 +2,37 @@ ## Install Ubuntu 12.04 with the package groups: +![screenshot of package group selection screen](https://raw.github.com/discourse/discourse-docimages/master/install/ubuntu%20-%20install%20-%20software%20selection.png) + * Basic ubuntu server * OpenSSH server * Mail server * PostgreSQL database (9.1+) +You may be working on an already-installed or automatically deployed system, in which case you can install them afterwards: + + # Run these commands as your normal login (e.g. "michael") + sudo apt-get update && sudo apt-get -y upgrade + sudo tasksel install openssh-server + sudo tasksel install mail-server + sudo tasksel install postgresql-server + ### Configure the mail server: +![screenshot of mail server type configuration screen](https://raw.github.com/discourse/discourse-docimages/master/install/ubuntu%20-%20install%20-%20mail_1%20system%20type.png) + In our example setup, we're going to configure as a 'Satellite system', forwarding all mail to our egress servers for delivery. You'll probably want to do that unless you're handling mail on the same machine as the Discourse software. +![screenshot of mail name configuration screen](https://raw.github.com/discourse/discourse-docimages/master/install/ubuntu%20-%20install%20-%20mail_2%20mailname.png) + +You probably want to configure your 'mail name' to be the base name of your domain. Note that this does not affect any email sent out by Discourse itself, just unqualified mail generated by systems programs. + +![screenshot of relay host configuration screen](https://raw.github.com/discourse/discourse-docimages/master/install/ubuntu%20-%20install%20-%20mail_3%20relayconfig.png) + +If you have a mail server responsible for handling the egress of email from your network, enter it here. Otherwise, leave it blank. + +## Additional system packages + Install necessary packages: # Run these commands as your normal login (e.g. "michael") @@ -139,9 +161,15 @@ Change to the 'discourse' user: Install RVM if doing a single-user RVM installation: + # As 'discourse' # Install RVM \curl -s -S -L https://get.rvm.io | bash -s stable - . ~/.profile + . ~/.bash_profile + + # rvm added shell initialization code to ~/.bash_profile, + # move it to ~/.profile instead + cat ~/.bash_profile >> ~/.profile + rm ~/.bash_profile # Install necessary packages for building ruby rvm requirements @@ -163,9 +191,9 @@ Continue with discourse installation git checkout latest-release # Install necessary gems - bundle install --deployment + bundle install --deployment --without test -_If you have errors building the native extensions, ensure you have sufficient free system memory. 1GB with no swap won't cut it._ +_If you have errors building the native extensions, ensure you have sufficient free system memory. 1GB with no swap isn't enough, we recommend having 2GB as a minimum._ Configure discourse: @@ -209,8 +237,8 @@ Initialize the database: # Run these commands as the discourse user # The database name here should match the production one in database.yml createdb discourse_prod - RUBY_GC_MALLOC_LIMIT=900000000 RAILS_ENV=production bundle exec rake db:migrate - RUBY_GC_MALLOC_LIMIT=900000000 RAILS_ENV=production bundle exec rake assets:precompile + RUBY_GC_MALLOC_LIMIT=900000000 RAILS_ENV=production rake db:migrate + RUBY_GC_MALLOC_LIMIT=900000000 RAILS_ENV=production rake assets:precompile ## nginx setup @@ -229,7 +257,7 @@ Configure bluepill: # Run these commands as the discourse user gem install bluepill - echo 'alias bluepill="bluepill --no-privileged -c ~/.bluepill"' >> ~/.bash_aliases + echo 'alias bluepill="NOEXEC_DISABLE=1 bluepill --no-privileged -c ~/.bluepill"' >> ~/.bash_aliases rvm wrapper $(rvm current) bootup bluepill rvm wrapper $(rvm current) bootup bundle @@ -254,14 +282,13 @@ Congratulations! You've got Discourse installed and running! # Run these commands as the discourse user bluepill stop # Pull down the latest release - cd discourse + cd ~/discourse git checkout master git pull git fetch --tags # To run on the latest version instead of bleeding-edge: #git checkout latest-release - bundle install --deployment - RUBY_GC_MALLOC_LIMIT=900000000 RAILS_ENV=production bundle exec rake db:migrate - RUBY_GC_MALLOC_LIMIT=900000000 RAILS_ENV=production bundle exec rake assets:precompile - cd + bundle install --without test --deployment + RUBY_GC_MALLOC_LIMIT=900000000 RAILS_ENV=production rake db:migrate + RUBY_GC_MALLOC_LIMIT=900000000 RAILS_ENV=production rake assets:precompile bluepill start