If you visit this page intentionally, I think you know what “Ghost” is about and what we can use with that. However, to brief about about this new guy – actually not that new as the first release suppose to happen back in 2013/2014 – I think its a worth while.
Built on NodeJS, its a same kind of Content Management System as “WordPress”, but intention is more biased on blogs rather hosting common web site content. Ghost uses MySQL as a backend data store as does in WordPress, though when it comes to creating posts Ghost uses “Markdown” rather than visual WYSIWYG. Yes, both platforms are open source and free to download.
Note that through out the document, I will stick to Ubuntu 18.04 OS version.
Step 01 — Required Package Installation
# apt-get update
# apt-get install -y nginx mariadb-server
Step 02 — Create standard user which Ghost CMS can be used with
# useradd --home-dir /home/blog -m --shell /bin/bash blog
# usermod -aG sudo blog # passwd blog
Step 03 — Modify mysql default configuration
# sudo mysql
MariaDB [(none)]> UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE user = 'root' AND plugin = 'unix_socket'; MariaDB [(none)]> FLUSH PRIVILEGES; MariaDB [(none)]> exit
# sudo mysql_secure_installation
while going through the interactive mysql configuration, make sure to set the mysql root password.
Step 04 — NodeJS Installation
# curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash # apt-get install -y nodejs
Optionally, you can install specific nodeJS version by
# apt-get install npm # npm install n -g # n latest or # n 6.9.1 # node -v
Step 05 — Ghost installation
# sudo npm install [email protected] -g OR need a specific version do; # sudo npm install [email protected] -g
Create directory structure to host the Ghost instance
# sudo mkdir -p /var/www/ghost # sudo chown blog.blog /var/www/ghost # sudo chmod 775 /var/www/ghost
Install the ghost instance
# cd /var/www/ghost/ # ghost install OR # ghost install 1.0.0
? Enter your blog URL: https://blog.osradar.com ? Enter your MySQL hostname: localhost ? Enter your MySQL username: root ? Enter your MySQL password: [hidden] ? Enter your Ghost database name: ghost_prod ? Do you wish to set up "ghost" mysql user? Yes ? Do you wish to set up Nginx? Yes ? Do you wish to set up SSL? Yes ? Do you wish to set up Systemd? Yes ? Do you want to start Ghost? Yes
Step 06 — Make sure responsible daemons are up & running
# systemctl status mariadb.service # systemctl status nginx.service # systemctl status ghost_blog-osradar-com.service
Fire up your favorite browser and visit http://blog.osradar.com
In the up coming posts, I will be working on..
“Hope this has been informative for you”