Ghost is a modern, open-source platform for building websites and blogs. This tutorial will guide you through installing Ghost on AlmaLinux, Rocky Linux, Debian, and Ubuntu.
Prerequisites:
Before starting the installation, ensure the following:
- A server running AlmaLinux, Rocky Linux, Debian, or Ubuntu.
- Root or sudo access to your server.
- Node.js and NPM installed (Ghost requires Node.js).
- A LAMP stack or NGINX (depending on your choice of web server).
- A domain or subdomain pointing to your server.
Step 1: Update the System
Start by updating your system to ensure all packages are up-to-date.
- On Ubuntu/Debian:
- On AlmaLinux/Rocky Linux:
Step 2: Install Required Software
- Install Node.js and NPM (Required for Ghost)
- For Ubuntu/Debian:
- For AlmaLinux/Rocky Linux:
- Install NGINX (or Apache) for web server (optional if you already have one installed).
- For Ubuntu/Debian:
- For AlmaLinux/Rocky Linux:
Step 3: Install Ghost
- Install Ghost-CLI, a command-line tool for managing Ghost:
- Create a directory for Ghost and navigate to it:
- Install Ghost using the Ghost-CLI tool:
This command will install Ghost, configure NGINX (or Apache), and set up a systemd service for Ghost to run in the background.
Step 4: Configure NGINX (Optional)
If you are using NGINX, you’ll need to configure it for Ghost.
- Create an NGINX configuration file:
- Add the following content to the file:
- Enable the NGINX site and restart the service:
Step 5: Set Up Ghost for Autostart
Ghost should start automatically on boot. To enable this, use the following command:
This will ensure that Ghost runs as a service.
Step 6: Complete the Web Installation
-
Open your browser and visit your domain (e.g.,
http://yourdomain.com
). -
Follow the on-screen instructions to set up your Ghost admin user, database, and website details.
Step 7: Secure Your Site with SSL (Optional)
To secure your Ghost site with SSL, you can use Let’s Encrypt.
- Install Certbot:
- For Ubuntu/Debian:
- For AlmaLinux/Rocky Linux:
- Obtain an SSL certificate for your domain:
Conclusion
You have successfully installed Ghost on your AlmaLinux, Rocky Linux, Debian, or Ubuntu server. You can now log in to the Ghost admin panel at http://yourdomain.com/ghost
to start creating content.