mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 07:03:40 +08:00
Merge pull request #1850 from Supermathie/sysadmin-docs
Finally merge in @kpfleming's suggestions in #1430
This commit is contained in:
commit
839c6f0aa8
1
config/nginx.global.conf
Normal file
1
config/nginx.global.conf
Normal file
|
@ -0,0 +1 @@
|
|||
server_names_hash_bucket_size 64;
|
|
@ -10,7 +10,7 @@ With 2 GB of memory and dual cores, you can run two instances of the thin server
|
|||
|
||||
1 GB of memory, 3 GB of swap and a single core CPU are the minimums for a steady state, running Discourse forum – but it's simpler to just throw a bit more hardware at the problem if you can, particularly during the install.
|
||||
|
||||
## Install Ubuntu Server 12.04 LTS with the package groups:
|
||||
## Install Ubuntu Server 12.04 LTS (or later) with the package groups:
|
||||
|
||||
Yes, you can in theory pick the distro of your choice, but to keep this guide sane, we're picking one, and it's Ubuntu. Feel free to substitute the distro of your choice, the steps are mostly the same.
|
||||
|
||||
|
@ -78,9 +78,8 @@ shiny). To install on Ubuntu:
|
|||
# Remove any existing versions of nginx
|
||||
sudo apt-get remove '^nginx.*$'
|
||||
|
||||
# Add nginx repo to sources.list
|
||||
cat <<'EOF' | sudo tee -a /etc/apt/sources.list
|
||||
|
||||
# Setup a sources.list.d file for the nginx repository
|
||||
cat << 'EOF' | sudo tee /etc/apt/sources.list.d/nginx.list
|
||||
deb http://nginx.org/packages/ubuntu/ precise nginx
|
||||
deb-src http://nginx.org/packages/ubuntu/ precise nginx
|
||||
EOF
|
||||
|
@ -149,7 +148,6 @@ Continue with Discourse installation
|
|||
# Pull down the latest code
|
||||
git clone git://github.com/discourse/discourse.git /var/www/discourse
|
||||
cd /var/www/discourse
|
||||
git checkout master
|
||||
|
||||
# To run on the most recent numbered release instead of bleeding-edge:
|
||||
#git checkout latest-release
|
||||
|
@ -170,7 +168,7 @@ Editing /var/www/discourse/config/discourse.conf:
|
|||
|
||||
Database/Hostname:
|
||||
- change database username/password if appropriate
|
||||
- change `hostname` to the name you'll use to access the discourse site, e.g. "forum.example.com"
|
||||
- change `hostname` to the name you'll use to access the Discourse site, e.g. "forum.example.com"
|
||||
|
||||
Redis:
|
||||
- no changes if this is the only application using redis, but have a look
|
||||
|
@ -206,13 +204,10 @@ Not english? Set the default language as appropriate:
|
|||
## nginx setup
|
||||
|
||||
# Run these commands as your normal login (e.g. "michael")
|
||||
sudo cp /var/www/discourse/config/nginx.global.conf /etc/nginx/conf.d/local-server.conf
|
||||
sudo cp /var/www/discourse/config/nginx.sample.conf /etc/nginx/conf.d/discourse.conf
|
||||
|
||||
Edit /etc/nginx/nginx.conf:
|
||||
|
||||
- add: `server_names_hash_bucket_size 64;` to the `http` section
|
||||
|
||||
If discourse will be the only site served by nginx, disable the nginx default
|
||||
If Discourse will be the only site served by nginx, disable the nginx default
|
||||
site:
|
||||
|
||||
- `sudo mv /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf.disabled`
|
||||
|
@ -222,8 +217,8 @@ Edit /etc/nginx/conf.d/discourse.conf
|
|||
|
||||
- edit `server_name`. Example: `server_name cain.discourse.org test.cain.discourse.org;`
|
||||
- change socket count depending on your NUM_WEB count
|
||||
- change socket paths if discourse is installed to a different location
|
||||
- modify root location if discourse is installed to a different location
|
||||
- change socket paths if Discourse is installed to a different location
|
||||
- modify root location if Discourse is installed to a different location
|
||||
|
||||
Reload nginx by running
|
||||
|
||||
|
@ -268,7 +263,7 @@ Congratulations! You've got Discourse installed and running!
|
|||
|
||||
## Administrator account
|
||||
|
||||
Now make yourself an administrator account. Browse to your discourse instance
|
||||
Now make yourself an administrator account. Browse to your Discourse instance
|
||||
and create an account by logging in normally, then run the commands:
|
||||
|
||||
# Run these commands as the discourse user
|
||||
|
|
Loading…
Reference in New Issue
Block a user