Skip to content

Commit fa965b5

Browse files
committed
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
1 parent 73d6014 commit fa965b5

1 file changed

Lines changed: 38 additions & 11 deletions

File tree

docs/INSTALL-ubuntu.md

Lines changed: 38 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,37 @@
22

33
## Install Ubuntu 12.04 with the package groups:
44

5+
![screenshot of package group selection screen](https://raw.github.com/discourse/discourse-docimages/master/install/ubuntu%20-%20install%20-%20software%20selection.png)
6+
57
* Basic ubuntu server
68
* OpenSSH server
79
* Mail server
810
* PostgreSQL database (9.1+)
911

12+
You may be working on an already-installed or automatically deployed system, in which case you can install them afterwards:
13+
14+
# Run these commands as your normal login (e.g. "michael")
15+
sudo apt-get update && sudo apt-get -y upgrade
16+
sudo tasksel install openssh-server
17+
sudo tasksel install mail-server
18+
sudo tasksel install postgresql-server
19+
1020
### Configure the mail server:
1121

22+
![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)
23+
1224
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.
1325

26+
![screenshot of mail name configuration screen](https://raw.github.com/discourse/discourse-docimages/master/install/ubuntu%20-%20install%20-%20mail_2%20mailname.png)
27+
28+
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.
29+
30+
![screenshot of relay host configuration screen](https://raw.github.com/discourse/discourse-docimages/master/install/ubuntu%20-%20install%20-%20mail_3%20relayconfig.png)
31+
32+
If you have a mail server responsible for handling the egress of email from your network, enter it here. Otherwise, leave it blank.
33+
34+
## Additional system packages
35+
1436
Install necessary packages:
1537

1638
# Run these commands as your normal login (e.g. "michael")
@@ -139,9 +161,15 @@ Change to the 'discourse' user:
139161

140162
Install RVM if doing a single-user RVM installation:
141163

164+
# As 'discourse'
142165
# Install RVM
143166
\curl -s -S -L https://get.rvm.io | bash -s stable
144-
. ~/.profile
167+
. ~/.bash_profile
168+
169+
# rvm added shell initialization code to ~/.bash_profile,
170+
# move it to ~/.profile instead
171+
cat ~/.bash_profile >> ~/.profile
172+
rm ~/.bash_profile
145173

146174
# Install necessary packages for building ruby
147175
rvm requirements
@@ -163,9 +191,9 @@ Continue with discourse installation
163191
git checkout latest-release
164192

165193
# Install necessary gems
166-
bundle install --deployment
194+
bundle install --deployment --without test
167195

168-
_If you have errors building the native extensions, ensure you have sufficient free system memory. 1GB with no swap won't cut it._
196+
_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._
169197

170198
Configure discourse:
171199

@@ -209,8 +237,8 @@ Initialize the database:
209237
# Run these commands as the discourse user
210238
# The database name here should match the production one in database.yml
211239
createdb discourse_prod
212-
RUBY_GC_MALLOC_LIMIT=900000000 RAILS_ENV=production bundle exec rake db:migrate
213-
RUBY_GC_MALLOC_LIMIT=900000000 RAILS_ENV=production bundle exec rake assets:precompile
240+
RUBY_GC_MALLOC_LIMIT=900000000 RAILS_ENV=production rake db:migrate
241+
RUBY_GC_MALLOC_LIMIT=900000000 RAILS_ENV=production rake assets:precompile
214242

215243
## nginx setup
216244

@@ -229,7 +257,7 @@ Configure bluepill:
229257

230258
# Run these commands as the discourse user
231259
gem install bluepill
232-
echo 'alias bluepill="bluepill --no-privileged -c ~/.bluepill"' >> ~/.bash_aliases
260+
echo 'alias bluepill="NOEXEC_DISABLE=1 bluepill --no-privileged -c ~/.bluepill"' >> ~/.bash_aliases
233261
rvm wrapper $(rvm current) bootup bluepill
234262
rvm wrapper $(rvm current) bootup bundle
235263

@@ -254,14 +282,13 @@ Congratulations! You've got Discourse installed and running!
254282
# Run these commands as the discourse user
255283
bluepill stop
256284
# Pull down the latest release
257-
cd discourse
285+
cd ~/discourse
258286
git checkout master
259287
git pull
260288
git fetch --tags
261289
# To run on the latest version instead of bleeding-edge:
262290
#git checkout latest-release
263-
bundle install --deployment
264-
RUBY_GC_MALLOC_LIMIT=900000000 RAILS_ENV=production bundle exec rake db:migrate
265-
RUBY_GC_MALLOC_LIMIT=900000000 RAILS_ENV=production bundle exec rake assets:precompile
266-
cd
291+
bundle install --without test --deployment
292+
RUBY_GC_MALLOC_LIMIT=900000000 RAILS_ENV=production rake db:migrate
293+
RUBY_GC_MALLOC_LIMIT=900000000 RAILS_ENV=production rake assets:precompile
267294
bluepill start

0 commit comments

Comments
 (0)