Bludit CMS is a versatile and user-friendly web application that allows you to build and manage your website or blog easily. It is a free and open-source CMS that utilizes JSON files for content storage, eliminating the need for a separate database. In this comprehensive guide, we will walk you through the step-by-step process of installing Bludit CMS on AlmaLinux 8. By the end of this tutorial, you will have a fully functional Bludit CMS installation running on your AlmaLinux server.
Prerequisites
Before we begin, make sure you have the following prerequisites in place:
- A system with AlmaLinux 8 installed and running.
- Root access to the system.
- Let’s Encrypt installed. If you haven’t installed Let’s Encrypt with Nginx on AlmaLinux 8, you can refer to our guide on installing Let’s Encrypt with Nginx on AlmaLinux 8.
Once you have met these prerequisites, we can proceed with the installation and configuration of Bludit CMS.
Step 1: Install Nginx & PHP
The first step is to install Nginx and PHP on your AlmaLinux 8 server. You can easily do this by running the following commands:
yum install nginx php php-curl php-gd php-dom php-mbstring php-zip php-json -y
After the installation is complete, enable and start the Nginx service:
systemctl enable nginx systemctl start nginx
To verify that Nginx is up and running, you can check its status:
systemctl status nginx
Step 2: Configure Nginx Server Blocks
Next, we need to configure Nginx server blocks to host our Bludit CMS website. Open the nginx.conf
file for editing:
nano /etc/nginx/nginx.conf
Replace the contents of nginx.conf
with the following configuration:
# For more information on configuration, see: # * Official English Documentation: http://nginx.org/en/docs/ # * Official Russian Documentation: http://nginx.org/ru/docs/ user nginx; worker_processes auto; error_log /var/log/nginx/error.log; pid /run/nginx.pid; # Load dynamic modules. See /usr/share/doc/nginx/README.dynamic. include /usr/share/nginx/modules/*.conf; events { worker_connections 1024; } http { log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; include /etc/nginx/mime.types; default_type application/octet-stream; # Load modular configuration files from the /etc/nginx/conf.d directory. # See http://nginx.org/en/docs/ngx_core_module.html#include # for more information. include /etc/nginx/conf.d/*.conf; }
Save and exit the file by pressing Ctrl+O
, followed by Ctrl+X
.
Next, create a new Nginx configuration file called dev.conf
for your domain:
vi /etc/nginx/conf.d/dev.conf
In the dev.conf
file, add the following configuration:
server { listen 80; server_name dev.domainhere.info; root /var/www/html/bludit/bludit; index index.php index.html index.htm; location / { try_files $uri $uri/ /index.php?$args; } location = /favicon.ico { log_not_found off; access_log off; } location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { expires max; log_not_found off; } location = /robots.txt { allow all; log_not_found off; access_log off; } location ~ \.php$ { include /etc/nginx/fastcgi_params; fastcgi_pass unix:/run/php-fpm/www.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } listen 443 http2 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/dev.domainhere.info/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/dev.domainhere.info/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot }
Save and exit the file by pressing the Esc
key, followed by :wq!
, and then press Enter
.
If you have SELinux enabled on your system, run the following command to allow the HTTPD service to connect to the network:
setsebool -P httpd_can_network_connect1
Finally, restart Nginx to apply the changes:
systemctl restart nginx systemctl status nginx
Step 3: Enable HTTP and HTTPS (Ports 80/443)
To allow HTTP and HTTPS connections through the firewall, run the following commands:
firewall-cmd --permanent --zone=public --add-service=http firewall-cmd --permanent --zone=public --add-service=https firewall-cmd --reload
Step 4: Install Bludit CMS
Now that we have set up the Nginx server blocks, we can proceed with installing Bludit CMS. Follow these steps:
- Download the latest version of Bludit CMS from the official websitehere.
- Change to the HTML directory:
cd /var/www/html
- Create a directory named
bludit
:
mkdir bludit cd bludit
- Download the Bludit CMS zip file:
wget https://www.bludit.com/releases/latest.zip
- Unzip the downloaded file:
unzip latest.zip
- Rename the extracted directory to
bludit
:
mv bludit-3-13-1 bludit
- Remove the downloaded zip file:
rm latest.zip
Step 5: Set File Permissions
To ensure that the necessary folders are readable by the web server, run the following commands:
chmod -R 755 /var/www/html/bludit/bludit chown -R nginx:nginx /var/www/html/bludit/bludit chcon -R -t httpd_sys_content_rw_t /var/www/html/bludit/bludit
Step 6: Configure Bludit CMS
Now that Bludit CMS is installed, you can configure it by accessing your server’s IP address or domain name in your web browser. For example, if your server’s IP address is dev.domainhere.info
, you would visit https://dev.domainhere.info
in your browser.
Follow the on-screen instructions to configure Bludit CMS, providing the necessary database details that you configured earlier.
Congratulations! You have successfully installed Bludit CMS with Nginx on AlmaLinux 8. You can now start building your website or blog using this powerful and user-friendly CMS.