From a271dbd7e03e72d5d29e62e53e904d1a43dfe5dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Gra=CC=88=C3=9Fl?= Date: Tue, 3 Dec 2013 20:16:16 +0100 Subject: [PATCH 1/7] on ubuntu sudo is required for every command --- installation/deploy.md | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/installation/deploy.md b/installation/deploy.md index 8025d5edf82a..a72bb569dcd2 100644 --- a/installation/deploy.md +++ b/installation/deploy.md @@ -88,12 +88,10 @@ You can see the [documentation for Supervisor](http://supervisord.org) for more Linux systems use init scripts to run on system boot. These scripts exist in /etc/init.d. To make Ghost run forever and even survive a reboot you could set up an init script to accomplish that task. The following example will work on Ubuntu and was tested on **Ubuntu 12.04**. -Depending on your system you might need to execute the following commands using `sudo` - * Create the file /etc/init.d/ghost with the following command: ``` - $ curl https://github.com/TryGhost/Ghost-Config/blob/master/init.d/ghost \ + $ sudo curl https://raw.github.com/TryGhost/Ghost-Config/master/init.d/ghost \ -o /etc/init.d/ghost ``` @@ -103,21 +101,24 @@ Linux systems use init scripts to run on system boot. These scripts exist in /et * Change the execution permission for the init script by typing ``` - $ chmod 755 /etc/init.d/ghost + $ sudo chmod 755 /etc/init.d/ghost ``` -* Use the script: +* Now you can control Ghost with the following commands: + + ``` + $ sudo service ghost start + $ sudo service ghost stop + $ sudo service ghost restart + $ sudo service ghost status + ``` - * start: `service ghost start` - * stop: `service ghost stop` - * restart: `service ghost restart` - * status: `service ghost status` * To start Ghost on system start the newly created init script has to be registered for start up. Type the following two commands in command line: ``` - $ update-rc.d ghost defaults - $ update-rc.d ghost enable + $ sudo update-rc.d ghost defaults + $ sudo update-rc.d ghost enable ``` ## Setting up Ghost with a domain name From d089070c3609c7c34cbe2e12357781405fe2af49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Gra=CC=88=C3=9Fl?= Date: Tue, 3 Dec 2013 20:47:19 +0100 Subject: [PATCH 2/7] add information about adding user and group and setting permissions right --- installation/deploy.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/installation/deploy.md b/installation/deploy.md index a72bb569dcd2..1a201a761de7 100644 --- a/installation/deploy.md +++ b/installation/deploy.md @@ -98,6 +98,18 @@ Linux systems use init scripts to run on system boot. These scripts exist in /et * Open the file with `nano /etc/init.d/ghost` and check the following: * Change the `GHOST_ROOT` variable to the path where you installed Ghost * Check if the `DAEMON` variable is the same as the output of `which node` +* The Init script runs with it's own Ghost user and group on your system, let's create them with the following: + + ``` + $ sudo useradd -r ghost -U + ``` + +* Let's also make sure the Ghost user can access the installation: + + ``` + $ sudo chown -R ghost:ghost /path/to/ghost + ``` + * Change the execution permission for the init script by typing ``` From 77f707ab9cbad3cab93efdf84425caebb70a3f71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Gra=CC=88=C3=9Fl?= Date: Tue, 3 Dec 2013 20:48:03 +0100 Subject: [PATCH 3/7] add step to add the user to the ghost group --- installation/deploy.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/installation/deploy.md b/installation/deploy.md index 1a201a761de7..bbaea4a7b202 100644 --- a/installation/deploy.md +++ b/installation/deploy.md @@ -133,6 +133,15 @@ Linux systems use init scripts to run on system boot. These scripts exist in /et $ sudo update-rc.d ghost enable ``` +* Let's make sure your user can change files, config.js for example in the Ghost directory, by assigning you to the ghost group: + + ``` + $ sudo adduser USERNAME ghost + ``` + +* If you now restart your server Ghost should already be running for you. + + ## Setting up Ghost with a domain name If you have setup up Ghost to run forever you can also setup a web server as a proxy to serve your blog with your domain. From 979cf2e5db48263aa36c40859b2d7d62d6816664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Gra=CC=88=C3=9Fl?= Date: Tue, 3 Dec 2013 20:49:04 +0100 Subject: [PATCH 4/7] keep filename for the nginx configuration consistant --- installation/deploy.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/installation/deploy.md b/installation/deploy.md index bbaea4a7b202..e6cd49b0e694 100644 --- a/installation/deploy.md +++ b/installation/deploy.md @@ -157,16 +157,14 @@ It also assumes that Ghost is running in the background with one of the above me * Configure your site - * Create a new file in `/etc/nginx/sites-available/example.com` - * Open the file with a text editor (e.g. `sudo nano /etc/nginx/sites-available/example.com`) + * Create a new file in `/etc/nginx/sites-available/ghost.conf` + * Open the file with a text editor (e.g. `sudo nano /etc/nginx/sites-available/ghost.conf`) and paste the following ``` server { listen 80; - server_name example.com; - root /var/www/ghost; location / { proxy_set_header X-Real-IP $remote_addr; @@ -176,12 +174,14 @@ It also assumes that Ghost is running in the background with one of the above me } ``` - * Change `server_name` and `root` to fit your setup - * Symlink your configuration in `sites-enabled` + + * Change `server_name` to your domain + * Symlink your configuration in `sites-enabled`: ``` $ sudo ln -s /etc/nginx/sites-available/ghost.conf /etc/nginx/sites-enabled/ghost.conf ``` + * Restart nginx ``` From 88f0be9a4e6b8457cc57942d0b929bb386b7d8dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Gra=CC=88=C3=9Fl?= Date: Tue, 3 Dec 2013 20:50:02 +0100 Subject: [PATCH 5/7] update example_translation to latest english translation --- example_translation/installation/deploy.md | 56 +++++++++++++++------- 1 file changed, 39 insertions(+), 17 deletions(-) diff --git a/example_translation/installation/deploy.md b/example_translation/installation/deploy.md index 8025d5edf82a..e6cd49b0e694 100644 --- a/example_translation/installation/deploy.md +++ b/example_translation/installation/deploy.md @@ -88,38 +88,60 @@ You can see the [documentation for Supervisor](http://supervisord.org) for more Linux systems use init scripts to run on system boot. These scripts exist in /etc/init.d. To make Ghost run forever and even survive a reboot you could set up an init script to accomplish that task. The following example will work on Ubuntu and was tested on **Ubuntu 12.04**. -Depending on your system you might need to execute the following commands using `sudo` - * Create the file /etc/init.d/ghost with the following command: ``` - $ curl https://github.com/TryGhost/Ghost-Config/blob/master/init.d/ghost \ + $ sudo curl https://raw.github.com/TryGhost/Ghost-Config/master/init.d/ghost \ -o /etc/init.d/ghost ``` * Open the file with `nano /etc/init.d/ghost` and check the following: * Change the `GHOST_ROOT` variable to the path where you installed Ghost * Check if the `DAEMON` variable is the same as the output of `which node` +* The Init script runs with it's own Ghost user and group on your system, let's create them with the following: + + ``` + $ sudo useradd -r ghost -U + ``` + +* Let's also make sure the Ghost user can access the installation: + + ``` + $ sudo chown -R ghost:ghost /path/to/ghost + ``` + * Change the execution permission for the init script by typing ``` - $ chmod 755 /etc/init.d/ghost + $ sudo chmod 755 /etc/init.d/ghost ``` -* Use the script: +* Now you can control Ghost with the following commands: + + ``` + $ sudo service ghost start + $ sudo service ghost stop + $ sudo service ghost restart + $ sudo service ghost status + ``` - * start: `service ghost start` - * stop: `service ghost stop` - * restart: `service ghost restart` - * status: `service ghost status` * To start Ghost on system start the newly created init script has to be registered for start up. Type the following two commands in command line: ``` - $ update-rc.d ghost defaults - $ update-rc.d ghost enable + $ sudo update-rc.d ghost defaults + $ sudo update-rc.d ghost enable + ``` + +* Let's make sure your user can change files, config.js for example in the Ghost directory, by assigning you to the ghost group: + + ``` + $ sudo adduser USERNAME ghost ``` +* If you now restart your server Ghost should already be running for you. + + ## Setting up Ghost with a domain name If you have setup up Ghost to run forever you can also setup a web server as a proxy to serve your blog with your domain. @@ -135,16 +157,14 @@ It also assumes that Ghost is running in the background with one of the above me * Configure your site - * Create a new file in `/etc/nginx/sites-available/example.com` - * Open the file with a text editor (e.g. `sudo nano /etc/nginx/sites-available/example.com`) + * Create a new file in `/etc/nginx/sites-available/ghost.conf` + * Open the file with a text editor (e.g. `sudo nano /etc/nginx/sites-available/ghost.conf`) and paste the following ``` server { listen 80; - server_name example.com; - root /var/www/ghost; location / { proxy_set_header X-Real-IP $remote_addr; @@ -154,12 +174,14 @@ It also assumes that Ghost is running in the background with one of the above me } ``` - * Change `server_name` and `root` to fit your setup - * Symlink your configuration in `sites-enabled` + + * Change `server_name` to your domain + * Symlink your configuration in `sites-enabled`: ``` $ sudo ln -s /etc/nginx/sites-available/ghost.conf /etc/nginx/sites-enabled/ghost.conf ``` + * Restart nginx ``` From 5b07c245a1a69d42a2e62a33cb4bd20afc59827c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Gra=CC=88=C3=9Fl?= Date: Tue, 3 Dec 2013 21:01:15 +0100 Subject: [PATCH 6/7] fix permalinks in example docs --- example_translation/installation/deploy.md | 2 +- example_translation/installation/linux.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/example_translation/installation/deploy.md b/example_translation/installation/deploy.md index e6cd49b0e694..13354a131df6 100644 --- a/example_translation/installation/deploy.md +++ b/example_translation/installation/deploy.md @@ -4,7 +4,7 @@ meta_title: How to Install Ghost on Your Server - Ghost Docs meta_description: Everything you need to get the Ghost blogging platform up and running on your local or remote environement. heading: Installing Ghost & Getting Started subheading: The first steps to setting up your new blog for the first time. -permalink: /installation/deploy/ +permalink: /example_translation/installation/deploy/ chapter: installation section: deploy prev_section: linux diff --git a/example_translation/installation/linux.md b/example_translation/installation/linux.md index 0526ac15977e..9027ed15345d 100644 --- a/example_translation/installation/linux.md +++ b/example_translation/installation/linux.md @@ -4,7 +4,7 @@ meta_title: How to Install Ghost on Your Server - Ghost Docs meta_description: Everything you need to get the Ghost blogging platform up and running on your local or remote environement. heading: Installing Ghost & Getting Started subheading: The first steps to setting up your new blog for the first time. -permalink: /installation/linux/ +permalink: /example_translation/installation/linux/ chapter: installation section: linux prev_section: windows From b6a4fc5da567fc56f64e50b6346cd3701b099d2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Gra=CC=88=C3=9Fl?= Date: Tue, 3 Dec 2013 21:20:31 +0100 Subject: [PATCH 7/7] trigger proper indention --- example_translation/installation/deploy.md | 1 - installation/deploy.md | 1 - 2 files changed, 2 deletions(-) diff --git a/example_translation/installation/deploy.md b/example_translation/installation/deploy.md index 13354a131df6..bb5dcc1cedb8 100644 --- a/example_translation/installation/deploy.md +++ b/example_translation/installation/deploy.md @@ -134,7 +134,6 @@ Linux systems use init scripts to run on system boot. These scripts exist in /et ``` * Let's make sure your user can change files, config.js for example in the Ghost directory, by assigning you to the ghost group: - ``` $ sudo adduser USERNAME ghost ``` diff --git a/installation/deploy.md b/installation/deploy.md index e6cd49b0e694..4a96baed60e2 100644 --- a/installation/deploy.md +++ b/installation/deploy.md @@ -134,7 +134,6 @@ Linux systems use init scripts to run on system boot. These scripts exist in /et ``` * Let's make sure your user can change files, config.js for example in the Ghost directory, by assigning you to the ghost group: - ``` $ sudo adduser USERNAME ghost ```