×
Community Blog How to Run a Ghost Blog using Alibaba Cloud Simple Application Server

How to Run a Ghost Blog using Alibaba Cloud Simple Application Server

This article describes how to run a ghost blog using Alibaba Cloud Simple Application Server.

By Kelvin Galabuzi

What Is a Ghost Blog?

Ghost is a popular, free, open-source blogging platform used to create and publish content to users worldwide. The platform is written in Node.js and is well-known for being a fast Content Management System (CMS), which is a key attraction for many businesses developing web content.

Connect to a Simple Application Server (SAS)

The following steps describe how to connect to a Simple Application Server instance on the Alibaba Cloud platform:

Note: This article assumes that you already have a running Simple Application Service instance with a domain name associated with it.

  • Step 1: Log in to your Alibaba Cloud account and go to the Simple Application Service console. Access the Connect section under the Server Maintenance blade and click Set Password:

1

  • Step 2: Set the root user's password and click OK:

2

  • Step 3: Select Yes, restart the server immediately and click OK:

3

  • Step 4: Connect to your Simple Application Server instance via SSH using the root user:

4

Install Ghost on the Simple Application Server Instance

The following steps describe how to install Ghost to the Simple Application Server on Alibaba Cloud.

  • Step 1: Add a new user running the following command:
adduser ghostuser

5

  • Step 2: Add administrative permissions to the new user:
usermod -aG sudo ghostuser
  • Step 3: Log in as the new user:
su – ghostuser

6

-Step 4: Update the packages on your system running the following commands:

sudo apt-get update

7

sudo apt-get upgrade

8

  • Step 5: Install NGINX:
sudo apt-get install nginx

9

-Step 6: Open up the firewall to allow NGINX:

sudo ufw allow 'Nginx Full'
  • Step 7: Install the MySQL server:
sudo apt-get install mysql-server

10

  • Step 8: Access your MySQL database server and change the MySQL root user password:
sudo mysql
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'ghostpass22';
Quit

11

  • Step 9: Install Node.js:
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash

12

sudo apt-get install -y nodejs

13

  • Step 10: Install the Ghost CLI:
sudo npm install ghost-cli@latest -g

14

  • Step 11: Create a directory for your Ghost installation:
sudo mkdir -p /var/www/buzzyshirts

15

  • Step 12: Change the directory owner to the previously created user and set the directory permissions:
sudo chown ghostuser:ghostuser /var/www/buzzyshirts
sudo chmod 775 /var/www/buzzyshirts/

16

  • Step 13: Navigate to the newly created directory and run the ghost install command:
ghost install

17

  • Step 14: Insert the following parameters:

    • Blog URL: Insert the URL of your blog
    • MySQL hostname
    • MySQL username
    • MySQL password
    • Ghost database name
    • Ghost MySQL user: Insert yes
    • Set up NGINX: Insert yes
    • Set up SSL: Insert yes
    • Email for SSL Certificate

18

  • Step 15: Access the Ghost admin panel using the URL provided after Ghost has started from the command line:

19
20

  • Step 16: Continue to the next step:

21

  • Step 17: After inviting some users (if you wish to), you will be directed to the administrator dashboard, where you can add some pages and posts to your blog:

22

  • Step 18: Now, visitors can access the blog via the public facing blog URL:

23

0 1 0
Share on

Alibaba Cloud Community

1,076 posts | 263 followers

You may also like

Comments