Table of Contents
- Getting Started
- Install LAMP
- Configure MariaDB Database
- Install Concrete5
- Configure Apache for Concrete5
- Access Concrete5
Concrete5 is a free and open source content management system written in PHP that can be used for publishing content on the internet.
Concrete5 is specially designed to be easy for users with minimumal technical skills. Concrete5 allows you to customize your site by using the built-in editing toolbar. Concrete5 comes with lots of useful features such as a text editor, content scheduling, spell checker, an advanced permissions system and much more.
We will learn how to install Concrete5 on CentOS 7.
- A server running CentOS 7.
- A non-root user with
First we will update the OS with the latest release and update its installed packages and repositories using the command:
sudo yum update -y
Next we will install the EPEL repository on your system:
sudo yum install epel-release -y
Now we will install the Apache web server, MariaDB, PHP7, and other PHP modules.
You can install all of them by running the following command:
sudo yum install httpd mariadb mariadb-server -y
You will also need to install PHP 7 as a prerequisite of Concrete5. You can install PHP 7 and other required extensions with these commands.
This one will add and enable the webtatic repository:
sudo rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
This installs PHP 7.1 and several PHP modules.
sudo yum install mod_php71w php71w-mysqlnd php71w-xml php71w-common php71w-gd php71w-mbstring php71w-mcrypt php71w-cli php71w-xmlrpc -y
Configure MariaDB Database
By default a new MariaDB installation is not secured. We will need to secure it first.
To do so, run the following script:
Answer all the questions as shown, being sure to set a secure
root password for MariaDB.
Enter current password for root (enter for none): Enter Set root password? [Y/n]: Y 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
Log in to the MariaDB shell with the following command:
mysql -u root -p
Enter the root password when asked, then create a database for Concrete5:
MariaDB [(none)]>CREATE DATABASE concretedb;
Create a database user and password for the
MariaDB [(none)]>CREATE USER 'concrete_user'@'localhost' IDENTIFIED BY 'password'; MariaDB [(none)]>GRANT ALL PRIVILEGES ON concretedb.* TO 'concrete_user'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION; MariaDB [(none)]>FLUSH PRIVILEGES; MariaDB [(none)]>exit;
Now we can proceed to install Concrete5.
You can download the latest stable release of Concrete5 from its official download page. Otherwise, you can download it with the following command:
Once the download is complete, extract the downloaded archive with the following command:
Move the extracted directory to the Apache web root directory:
sudo mv concrete5-8.0.3 /var/www/html/concrete
Give proper permissions to the
sudo chown -R apache:apache /var/www/html/concrete
Configure Apache for Concrete5
Let's configure an Apache virtual host directive for Concrete5. You can do this by creating
sudo nano /etc/httpd/conf.d/concrete.conf
Add the following lines:
<VirtualHost *:80> ServerAdmin email@example.com DocumentRoot /var/www/html/concrete ServerName example.com <Directory /var/www/html/concrete/> Options FollowSymLinks AllowOverride All Order allow,deny allow from all </Directory> ErrorLog /var/log/httpd/concrete-error_log CustomLog /var/log/httpd/concrete-access_log common </VirtualHost>
Save and close the file, then restart Apache service:
sudo systemctl restart httpd
We should allow HTTP traffic on port 80 through
firewalld. You can do this by running the following command:
sudo firewall-cmd --zone=public --add-service=http --permanent sudo firewall-cmd --reload
Once everything is set up properly, lets finish the Concrete5 install through a web browser.
Open your favourite web browser and type the URL http://your-server-ip, you should see the following page:
Choose your language and then click on the
Right Arrow button, you should see the
Testing Environment Page:
Make sure that all requirements are satisfied, then click the
Continue to Installation button, you should see the Site Information page:
Fill out all the details such as site name, admin username, database username, password and the name of the database then click on the
Install concrete5 button.
If everything went fine, you will receive the "Installation Complete" message on the screen.
Edit Your Site button to start using Concrete5 as shown in below image:
You have successfully installed Concrete5 content management system on CentOS 7 server. You can now customize your website, install plugins, themes, and make the site look as per your requirements. You are welcome to leave feedback in the comments section below.