Updated on Jul 13, 2018
In this tutorial we will guide you through the installation process of Ghost using the CLI auto-installer script. The script is featured on the great website AllAboutGhost. We are extremely grateful for the wonderful work done by Andy Boutte and David Balderston to make our life a little bit easier and bring this wonderful script to us so more people can easily install the Ghost blogging platform on their own. A BIG Thank you from us!
In short, you can install Ghost on a clean Ubuntu or CentOS system by running the following command:
wget -O - https://raw.github.com/howtoinstallghost/installghost.sh/master/installGhost.sh | sudo bash
If the following error occurs:
-bash: wget: command not found
most probably you run a minimal OS install and you need to install wget first. This can be easily done on CentOS using the following command:
sudo yum -y install wget
When the installation process is over you can access your Ghost blog using your server IP address or domain name in case it is pointed to your server IP address by directly entering the address in your browser. Don't forget to Configure your Ghost blog URL after the installation process by following our tutorial.
Let's explain what the auto installer does. The Ghost setup might be a little complicated for most users who are used to the standard installation process of most LAMP-based applications. For example, Ghost required Node.js installation and several reconfigurations to make sure it is fully accessible when you point your domain name.
This auto installer setup Node.js as well as Forever which is a nice way to make sure that your Ghost blog process will run constantly without interruption. Furthermore, the one-click installer downloads and reconfigures the Ghost installation package to make sure it is fully accessible on port 80 which is the default HTTP port. In case you have Apache, nGinx or other web service running you might need to stop them prior the setup. In case you would like to have both your web server and Ghost running but still access your Ghost on port 80, please check our tutorial on how to run Ghost with Apache and nGinx here.
Last but not least, the one-click auto installer creates a Ghost start script and adds it to your server crontab to make sure that the Ghost blog process is automatically started upon server reboot. This way you will not need to manually start your Ghost when your server is restarted. For additional information on Forever or the Ghost start up script, please check our Forever tutorial or the Ghost Start up Script guide.