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.
2. Create a MySQL database for Ghost
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.
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
Logging Into Your Account via SSH using Terminal in Mac OS
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:
npminstall ghost-cli@latest -g
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
dbuser: the MySQL user you created at step 2
dbpass: the password for the MySQL user
dir: the directory where Ghost should be installed. It must be an empty subdirectory of the private directory on your account. If the directory does not exist, the installer will create it for you.
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.
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.
For 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" } },
For the change to take effect, restart the Web App by clicking the green 'Disable the app' button, and then the red 'Enable the app' button.
All prices are in USD. No setup fees. Minimum contract period for shared hosting services - 12 months. Full prepayment for the contract period. 100-day money-back guarantee. No automatic renewal. Fees for domain registrations and SSL certificates cannot be refunded in case of an early contract termination.
ICDSoft 2001-2024 © All rights reserved
Terms of Use
|
Legal notice
|
Privacy
|
Reseller terms