How to Install Backdrop CMS with LEMP Stack on AlmaLinux 8

The Backdrop is a full-featured content management system that allows non-technical users to manage a wide variety of content. It can be used to create all kinds of websites including blogs, image galleries, social networks, intranets, and more. In this article, we are going to learn how to install Backdrop CMS on AlmaLinux 8. So, let’s get started.

Checkout the Backdrop CMS Project Here.

Try this wiki on our VPS. Starting at just $5/month with 24x7 In-house customer support.

Pre-requisites

Once you're all set, we'll proceed with Backdrop CMS installation and configuration.

Create Database

Let us begin with creating a Database and a user. We will then grant the required privileges to the user so it can interact with the Database.

mysql -u root

CREATE DATABASE crowncloud;

CREATE USER 'crowncloud'@'localhost' IDENTIFIED BY 'YOUR-PASSWORD-HERE';

GRANT ALL PRIVILEGES ON crowncloud.* TO 'crowncloud'@'localhost';

FLUSH PRIVILEGES;

quit

The above commands will give complete access to the user crowncloud. Replace YOUR-PASSWORD-HERE with a safe and secure password.

Create a new Nginx configuration file dev.conf for the domain with the following command:

vi /etc/nginx/conf.d/dev.conf

Add the following codes:

Replace dev.domainhere.info with Your Domain Name and Change SSL Path according to your SSL Path.

And also replace the root path, /var/www/html/backdrop with the actual path where your website's data are stored.

server {
        listen 80;
        listen [::]:80;

        root /var/www/html/backdrop/;
        index index.php index.html index.htm index.nginx-debian.html;

        server_name cms.domainhere.info cms.domainhere.info;

        location / {
                try_files $uri $uri/ =404;
        }

location ~ \.php$ {
    fastcgi_pass unix:/run/php-fpm/www.sock;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;

  }

    access_log /var/log/nginx/cms.domainhere.info.access.log;
    error_log /var/log/nginx/cms.domainhere.info.error.log;

}

Now, press the Esc key, and type in :wq! and press the Enter key to save and exit the file.

For SELinux enabled systems, Run the below command

setsebool -P httpd_can_network_connect 1

Now, restart & check the Nginx with the following commands:

systemctl restart nginx

systemctl status nginx

Enable http and https ( 80/443 )

To enable http and https connection through the firewall, follow the commands:

firewall-cmd --permanent --zone=public --add-service=http

firewall-cmd --permanent --zone=public --add-service=https

firewall-cmd --reload

Install Backdrop CMS

Download Backdrop CMS from the official website : Click here.

Let's install Backdrop CMS using below command:

cd /var/www/html

wget https://github.com/backdrop/backdrop/archive/refs/heads/1.x.zip

unzip 1.x.zip

mv backdrop-1.x backdrop

rm 1.x.zip

Setting up File Permissions

Let's make the folders readable.

chmod -R 755 /var/www/html/backdrop

chown -R nginx:nginx /var/www/html/backdrop

chcon -R -t httpd_sys_content_rw_t /var/www/html/backdrop

Now, restart & check Nginx with the following commands:

systemctl restart nginx

systemctl status nginx

Configuring Backdrop CMS

Now open the IP address from your browser, this will redirect you to configuring the final parts of the Backdrop CMS installation.

https://dev.domainhere.info

Replace the dev.domainhere.info with the actual IP or domain configured on the server.

Input the Database details which was configured earlier. Follow the below steps:

Now you have successfully installed Backdrop CMS with LEMP Stack on AlmaLinux 8.


CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME for 10% off!

1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month

Available Locations: LAX | MIA | ATL | FRA | AMS