Contents

Ghost CMS on Debian 10

Install

Create user for Ghost

1
2
adduser [GHOSTUSER]
usermod -aG sudo [GHOSTUSER]

Requirements

Nginx

Install nginx:

1
apt install nginx -y

MariaDB

Install MariaDB

1
apt install mariadb-server mariadb-client -y

Initialize MariaDB:

1
mysql_secure_installation

Create database for Ghost:

1
mysql -u root -p
1
2
3
4
5
CREATE USER [GHOSTUSER]@localhost IDENTIFIED BY "Str0ngP4ss";
CREATE DATABASE  [GHOSTDB]; 
GRANT ALL ON [GHOSTDB].* TO [GHOSTUSER]@localhost;
FLUSH PRIVILEGES;
QUIT;

NodeJS 12.x

Install NodeJS 12.x:

1
2
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash
apt install nodejs -y

Create directory

1
2
3
mkdir -p /var/www/ghost
chown [GHOSTUSER]:[GHOSTUSER] /var/www/ghost
chmod 775 /var/www/ghost

Ghost CLI

1
npm install ghost-cli@latest -g

Ghost

Change user to [GHOSTUSER]:

1
2
su - [GHOSTUSER]

Install our Ghost:

1
2
cd /var/www/ghost
ghost install