Introduction
Ghost is a popular open-source content management system (CMS) that focuses on providing a simple yet powerful platform for blogging and publishing. In this guide, you will learn how to deploy Ghost CMS on Rocky Linux 9, which can be effectively hosted on a Windows VPS UK for optimal performance.
Prerequisites
- A Rocky Linux 9 server with root access
- Node.js installed on your server
- MySQL or SQLite installed for the database
- Basic knowledge of Linux commands
Step 1: Update Your System
Begin by updating your package index and upgrading existing packages:
sudo dnf update -y
Step 2: Install Required Dependencies
Install necessary dependencies:
sudo dnf install -y gcc-c++ make
Step 3: Install Node.js
Ghost requires Node.js. You can install Node.js by running the following commands:
curl -sL https://rpm.nodesource.com/setup_16.x | sudo bash -
sudo dnf install -y nodejs
Step 4: Install MySQL
Install MySQL or MariaDB as your database:
sudo dnf install -y mariadb-server
Start and enable the MySQL service:
sudo systemctl start mariadb
sudo systemctl enable mariadb
Step 5: Secure MySQL Installation
Run the security script to secure your MySQL installation:
sudo mysql_secure_installation
Step 6: Create a Database for Ghost
Log in to MySQL and create a database for Ghost:
sudo mysql -u root -p
Run the following SQL commands:
CREATE DATABASE ghost_db;
CREATE USER 'ghost_user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON ghost_db.* TO 'ghost_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Step 7: Install Ghost CLI
Install Ghost Command Line Interface (CLI) globally:
sudo npm install -g ghost-cli
Step 8: Create a Directory for Ghost
Create a directory for Ghost and navigate into it:
mkdir -p /var/www/ghost
cd /var/www/ghost
Step 9: Install Ghost
Run the following command to install Ghost:
ghost install
During the installation, you will be prompted to provide your database information and configure Ghost.
Step 10: Start Ghost
After installation, start Ghost using the following command:
ghost start
Step 11: Access Ghost Admin
You can now access your Ghost admin interface by navigating to http://your_domain.com/ghost
in your web browser.
Step 12: Conclusion
You have successfully deployed Ghost CMS on Rocky Linux 9, providing a powerful platform for blogging. This setup can greatly benefit from being hosted on a Windows VPS. For additional options, explore various VPS UK Windows solutions, including Windows Virtual Private Server Hosting and Windows VPS Hosting UK for optimal performance.