Composr is a robust and open-source content management system (CMS) that boasts advanced social, interactive, and dynamic functionalities. Developed in PHP, it leverages MariaDB for data storage. By combining elements of web content management and online community software, Composr delivers a comprehensive range of features right out of the box:
Key Features
- Support for images, videos, audio, and more.
- Multiple display modes for category contents using tables and boxes.
- Capabilities for event reminders and RSS/Atom support.
- Ability to create personalized galleries.
This guide will walk you through installing Composr CMS on an Ubuntu 18.04 LTS server.
Prerequisites
- An Ubuntu 18.04 server.
- A static IP address, for example, 192.168.0.104, assigned to your server.
- A non-root user with sudo privileges.
Initial Setup
First, update your system to ensure all software is current. Run the following command:
sudo apt-get update -y sudo apt-get upgrade -y
After updating, restart your system to enforce the changes.
Install LAMP Stack
Subsequently, install Apache, MariaDB, PHP, and necessary PHP libraries. Execute the command below:
sudo apt-get install apache2 mariadb-server unzip wget php7.2 libapache2-mod-php7.2 php7.2-common php7.2-sqlite php7.2-curl php7.2-intl php7.2-mbstring php7.2-xmlrpc php7.2-mysql php7.2-gd php7.2-xml php7.2-cli php7.2-zip -y
Once installed, modify the default PHP configuration:
sudo nano /etc/php/7.2/apache2/php.ini
Update the following settings:
memory_limit = 300M upload_max_filesize = 200M max_execution_time = 400 date.timezone = Asia/Kolkata
Save the file and exit. Restart Apache and MariaDB services to apply the changes. Also, enable them to start on boot:
sudo systemctl restart apache2 sudo systemctl restart mariadb sudo systemctl enable apache2 sudo systemctl enable mariadb
Secure and Configure MariaDB
Initially, MariaDB is not secure. To remedy this, execute:
sudo mysql_secure_installation
Answer the following prompts:
Enter current password for root (enter for none): Set root password? [Y/n]: N Remove anonymous users? [Y/n]: Y Disallow root login remotely? [Y/n]: Y Remove test database and access to it? [Y/n]: Y Reload privilege tables now? [Y/n]: Y
After securing MariaDB, log in to its shell:
mysql -u root -p
Enter your root password, then create a database and user:
CREATE DATABASE composrdb; CREATE USER 'composr'@'localhost' IDENTIFIED BY 'mypassword';
Grant privileges for the new user on the database:
GRANT ALL PRIVILEGES ON composrdb.* TO 'composr'@'localhost'; FLUSH PRIVILEGES; exit
Installing Composr
Download the latest Composr version from the official site using this command:
cd /tmp wget https://compo.sr/site/dload.php?id=519 -O composr.zip
Following the download, extract the file to the Apache web root directory:
unzip composr.zip -d /var/www/html/composr
Set the proper ownership and permissions:
sudo chown -R www-data:www-data /var/www/html/composr/ sudo chmod -R 755 /var/www/html/composr/
Create an Apache virtual host file for Composr:
sudo nano /etc/apache2/sites-available/composr.conf
Add the following configuration:
<VirtualHost *:80> ServerAdmin admin@example.com DocumentRoot /var/www/html/composr ServerName 192.168.0.104 <Directory /var/www/html/composr/> Options FollowSymlinks AllowOverride All Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/composr_error.log CustomLog ${APACHE_LOG_DIR}/composr_access.log combined </VirtualHost>
Replace “example.com” with your domain. Then save and close the file. Disable the default Apache site and enable the new configuration:
sudo a2dissite 000-default sudo a2ensite composr
Activate the Apache rewrite module and restart the service to apply changes:
sudo a2enmod rewrite sudo systemctl restart apache2
Accessing Composr
With Composr installed, access its web interface by navigating to:
http://192.168.0.104/install.php
Adjust the IP address as needed, or use your chosen domain name. The following page will appear:
Select your language and proceed. Continue following the installation prompts, agreeing to licenses, and entering database details until installation completes:
Enter necessary credentials:
Finish the setup by configuring your CMS:
Congratulations! Composr CMS is now successfully installed on Ubuntu 18.04. You’re ready to host your website. Comment below if you have questions.
Frequently Asked Questions (FAQ)
- What is Composr CMS?
- Composr CMS is an open-source content management and online community software, designed with PHP and using MariaDB for storage.
- What are the key features of Composr CMS?
- Key features include support for media files, multiple display modes, event reminders, RSS/Atom support, and customizable galleries.
- What are the system requirements to install Composr CMS?
- You need a server running Ubuntu 18.04 with a static IP address and a non-root user with sudo privileges.
- How do I set up Composr?
- Follow this guide to update your system, install a LAMP stack, configure MariaDB, and set up Composr from their official site.
- How can I secure my MariaDB setup?
- Execute the `mysql_secure_installation` command to configure security settings for your MariaDB installation.