Installing Ghost
This tutorial will show you how to install the CMS and blogging platform Ghost. If you do not have a WebApps section in your hosting Control Panel, then this tutorial is not suitable for your particular hosting environment. You can contact us via our ticketing system for further assistance. 1. Create an app using the WebApps section of the hosting Control Panel
2. Create a MySQL database for Ghost
3. Enable an SSL certificate and force HTTPS connections.You can easily enable a free Let's Encrypt certificate by using the SSL/HTTPS -> Let's Encrypt certificates section of the hosting Control Panel as described in the Let's Еncrypt certificates section from our online documentation. After that, you can use the SSL/HTTPS > Force HTTPS section to force HTTPS connections to the domain/subdomain where Ghost will be running. 4. Install Ghost.First you need to connect to your account via SSH. You can check our online documentation for more information on doing this: Logging Into Your Account via SSH using Putty Once you have connected via SSH, you can enter the shell of your web app with the following command (replace ghost with the name of your web app): sureapp project shell ghost Next, run the following command to install the Ghost command line utility:
To install Ghost with a MySQL 5 database, run the following command: ghost install --url https://$SUBDOMAIN.$DOMAIN$URL_PATH --port $PORT --db mysql --dbhost localhost --dbname myusername_ghost --dbuser ghostuser --dbpass ghostpassword --dir /home/$USER/private/ghost --process local --no-setup-linux-user --stack false --no-start If you wish to use a MySQL 8 database, you will need to also specify the database connection port as 3308: ghost install --url https://$SUBDOMAIN.$DOMAIN$URL_PATH --port $PORT --db mysql --dbhost localhost --dbport 3308 --dbname myusername_ghost --dbuser ghostuser --dbpass ghostpassword --dir /home/$USER/private/ghost --process local --no-setup-linux-user --stack false --no-start You should replace the parts in bold with the respective values for your web app. dbname: the name of the MySQL database you created at step 2 If you get the following prompt, please select the "no" option: Do you wish to set up Nginx?: The installer should finish with the following output: Ghost was installed successfully! To complete setup of your publication, visit: https://www.example.com/ghost/ The setup URL of Ghost is not working as we have not yet started and configured the web app. 5. Configure and start the Web App.Make the following changes to the Web App:
node current/index.js
NODE_ENV production This way Ghost will run in production mode.
Save the changes and click on the red 'Enable the app' button. Ghost should start after a few seconds and you can complete the setup by visiting the URL that was provided by the installer (https://www.example.com/ghost/ in our example). To invite staff, you first need to configure the email service following the instructions provided in the next step. 6. Configuring the email serviceFor Ghost to be able to send email, you can configure it to use the Sendmail binary on the server. To do this, you have to edit the Ghost configuration file config.production.json which is located in the Ghost installation directory. You can easily edit the file through the File Manager interface of the hosting Control Panel. Change the following lines in config.production.json:
"mail": { "transport": "Direct" }, to "mail": { "transport": "sendmail", "options": { "path": "/usr/lib/sendmail" } },
|