Install CMS Made Simple with Apache on Ubuntu 24.04

This article outlines the process of installing CMS Made Simple (CMSMS) on Ubuntu 24.04 using the Apache web server. It details steps for installing Apache, MariaDB, and PHP, creating a CMSMS database, downloading CMSMS files, configuring the Apache server, and setting up SSL/TLS for secure access.

This article explains installing CMS Made Simple (CMSMS) with Apache on Ubuntu 24.04.

CMSMS is a popular open-source content management system that relies on the LAMP or LEMP stack. It is designed to allow web admins and users to create powerful and dynamic content websites.

Apache2 is the world’s most widely used web server, making it an excellent choice for CMSMS. Ubuntu Linux is a secure and stable operating system commonly used in servers.

Installing CMSMS on Ubuntu Linux with Apache provides a reliable and secure platform for creating and managing websites.

Install Apache HTTP server on Ubuntu

CMSMS requires a web server. This post will install and use the Apache web server to run CMSMS.

To do that, open the Ubuntu terminal and run the commands below to install the Apache web server.

sudo apt update
sudo apt install apache2

Once Apache is installed, the commands below can start, stop, and enable the Apache web server to start automatically when your server boots up.

sudo systemctl stop apache2
sudo systemctl start apache2
sudo systemctl enable apache2

You can test that the Apache web server is running by opening your web browser and browsing to the server’s localhost or IP address.

http://localhost

When you see the Apache2 Default Page, it means the Apache HTTP server is successfully installed.

Additional help on installing Apache on Ubuntu is in the link below.

How to install Apache on Ubuntu

Install the MariaDB database server on Ubuntu

The next component required to run CMSMS is a database server. This post will install and use the MariaDB database server.

To install and use the MariaDB database server, use the instructions below.

Open the Ubuntu terminal and run the commands below to install the MariaDB database server.

sudo apt update
sudo apt install mariadb-server

Once the MariaDB database server is installed, use the commands below to stop, start, and enable the MariaDB server to start automatically when the server boots.

sudo systemctl stop mariadb
sudo systemctl start mariadb
sudo systemctl enable mariadb

Run the following commands to validate and test if the MariaDB database server is installed successfully.

sudo mariadb

Once you run the commands above, it will log you onto the MariaDB console and display a message similar to the one below.

Welcome to the MariaDB monitor.  Commands end with ; or g.
Your MariaDB connection id is 32
Server version: 10.11.2-MariaDB-1 Ubuntu 23.04

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

MariaDB [(none)]> 

The message tells you that the server is installed successfully.

Additional help on installing MariaDB.

Create a CMSMS database

Upon successfully installing the MariaDB database server, create a blank database on the server specifically for the CMSMS application.

As part of the setup, we will create a cmsmsdb database and a user account called cmsmsdbuser.

Finally, we’ll grant the cmsmsdbuser full access to the cmsmsdb database.

All the database steps above can be done using the commands below:

But first, log on to the MariaDB database server:

sudo mariadb

Then run the commands below to complete the steps:

CREATE DATABASE cmsmsdb CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER cmsmsdbuser@localhost IDENTIFIED BY 'type_your_password_here';
GRANT ALL ON cmsmsdb.* TO cmsmsdbuser@localhost WITH GRANT OPTION;
FLUSH PRIVILEGES;
exit

Ensure to replace ‘type_your_password_here ‘with your password.

Install PHP on Ubuntu Linux

The last component you will need to run CMSMS is PHP. The CMSMS application is PHP-based and supports the latest versions of PHP.

Then, run the commands below to install the latest PHP version.

sudo apt install php libapache2-mod-php php-intl php-mysql php-curl php-cli php-zip php-xml php-gd php-common php-mbstring php-xmlrpc php-bcmath php-json php-sqlite3 php-soap php-zip

Additional help on installing PHP

How to install PHP on Ubuntu Linux

Download CMSMS files

Let’s begin downloading and configuring the CMSMS files on Ubuntu Linux.

To always install the latest version, check the download page for CMSMS. If a new version is available, replace the version number in the link below.

First, navigate to the /tmp/ directory and download CMSMS files. After unzipping the file, move the content into the CMSMS folder in the Apache root directory.

The final step is to change the permissions. This will allow the Apache web server to interact safely with the files, ensuring a secure environment for your CMSMS installation.

cd /tmp/
wget https://s3.amazonaws.com/cmsms/downloads/15179/cmsms-2.2.21-install.zip
sudo unzip cmsms-2.2.21-install.zip -d /var/www/cmsms
sudo chown -R www-data:www-data /var/www/cmsms

Once you have completed all the above steps, continue configuring the Apache web server below to serve the CMSMS content.

Run the commands below to create an Apache virtual host file for CMSMS.

sudo nano /etc/apache2/sites-available/cmsms.conf

Then, copy and paste the content block below into the Apache server block.

<VirtualHost *:80>
ServerName cmsms.example.com
ServerAlias www.cmsms.example.com
ServerAdmin [email protected]
DocumentRoot /var/www/cmsms

<Directory /var/www/cmsms/>
Options FollowSymlinks
AllowOverride All
Require all granted
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Save the file.

Then, run the commands below to enable the virtual host and restart the Apache server.

sudo a2ensite cmsms.conf
sudo a2enmod rewrite
sudo systemctl restart apache2

Setup Let’s Encrypt SSL/TLS for CMSMS

You may want to install an SSL/TLS certificate to secure your CMSMS site. Secure your CMSMS installation with HTTPS from Let’s Encrypt.

Please read the post below for additional resources on installing and creating Let’s Encrypt SSL certificates for Apache.

How to set up Let’s Encrypt SSL certificate for Apache on Ubuntu Linux

Once you have restarted the Apache web server, open your browser and browse to the server hostname or IP address defined in the Apache server block.

http://cmsms.example.com/cmsms-2.2.21-install.php/

A CMSMS installation wizard page should appear. Select the installation language and continue.

Click the “Install” button to continue.

Type the database connection details created above and continue.

Create an admin account and continue.

Continue with the default settings and finish the installation.

Visit your site or admin panel and begin using your new site.

Once everything works correctly, run the command below to delete the installer.

sudo rm /var/www/cmsms/cmsms-2.2.21-install.php

That should do it!

Conclusion:

Installing CMS Made Simple (CMSMS) on Ubuntu with Apache can be broken down into manageable steps. Here are the key takeaways:

  • Prerequisites: Ensure that your server has a working installation of Ubuntu and basic server administration skills.
  • Apache Installation: Install the Apache web server, essential for hosting CMSMS.
  • MariaDB Setup: Set up the MariaDB database server to efficiently manage your website’s data.
  • Database Creation: Create a dedicated database for CMSMS and assign a user with the necessary permissions.
  • PHP Installation: Install the required PHP modules to ensure the CMS is fully functional.
  • CMSMS Download and Configuration: Download and configure the CMSMS application files correctly within the web server’s root directory.
  • Virtual Host Configuration: Set up an Apache virtual host file for more precise management of the CMSMS application.
  • SSL/TLS Security: Consider securing your site with an SSL certificate from Let’s Encrypt for enhanced security.
  • Installer Cleanup: Always remove the installation wizard after running the site to prevent unauthorized access.

Following these steps will provide a robust and secure environment for your website, enabling you to leverage CMS Made Simple’s powerful features effectively.

Richard Avatar

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *