Concrete5 is one of the most popular content management systems available on thhe Internet. It is written in PHP and uses MySQL to store its data. It comes with an easy to use website builder through which you can easily create pages and content. Concrete5 is flexible, secure and mobile ready. There are numerous websites running this CMS.
In this tutorial we will learn to install Concrete5 along with all it's dependencies.
Concrete5 does not have any special hardware requirements. You will only need a CentOS 7.x server with root or sudo access. In this tutorial we will use the root user account to execute the commands, if you are logged in as non root user, run
sudo -i command to switch to root user or you can add
sudo command at the start of all the administrative commands.
Before installing any package oo your system it is recommended to update the system and available packages. Run the following command to do so.
yum -y update
Once the system is updated, you can install the dependencies required. To install Concrete5 you will need to install the Apache web server along with MySQL and PHP with a few extensions.
Run the following command to install the Apache web server.
yum -y install httpd
Now you can start Apache and enable it to start at boot time, using the following commands.
systemctl start httpd
systemctl enable httpd
You can check the status of MySQL using the following command.
systemctl status httpd
To install MySQL, you will need to add the MySQL yum repository to your system, run the following command to do so.
rpm -Uvh http://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
Once the repository is added, run the following command to install MySQL community server.
yum -y install mysql-community-server
Now you can start MySQL server and enable it to start at boot time, using the following commands.
systemctl start mysqld
systemctl enable mysqld
You can check the status of MySQL using the following command.
systemctl status mysqld
During installation of MySQL, the installer automatically uses a random password for the MySQL root user, you can obtain the password using the following command.
grep 'temporary password' /var/log/mysqld.log
You will see the following output containing the current root password.
[root@ip-172-31-21-154 ~]# grep 'temporary password' /var/log/mysqld.log 2016-12-08T05:35:25.414777Z 1 [Note] A temporary password is generated for root@localhost: TiQ2b(LSWxvk
Now you can run the following command to harden the security of your MySQL server.
You will be asked about your current root password, enter the password obtained through the command above. Now it will prompt to change your root password, and provide
y for all the questions asked.
After installation of MySQL you will need to install the PHP programming language. Concrete5 recommendeds PHP version 5.6 or 7. The default CentOS 7 repository contains PHP 5.4, thus you will need to add webtatic repository in your server. To install webtatic repository, you will need to add EPEL repository also.
yum -y install epel-release
yum -y update
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum -y update
yum clean all
Now you can install any of the PHP versions. To install PHP v5.6 with required extensions, run the following command.
yum -y install php56w php56w-mysql php56w-dom php56w-xml php56w-gd php56w-fileinfo php56w-curl php56w-mcrypt php56w-zip php56w-mbstring
To install PHP 7.0 with the required extensions, run the following command.
yum -y install php70w php70w-mysql php70w-dom php70w-xml php70w-gd php70w-fileinfo php70w-curl php70w-mcrypt php70w-zip php70w-mbstring
Once done you can check the PHP version using the following command.
You should see following output.
[root@ip-172-31-24-129 html]# php -v PHP 7.0.13 (cli) (built: Nov 10 2016 22:33:41) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
Although Concrete5 recommends a 64MB PHP memory limit, you can increase it to make the processing of the application faster. To process large images, it also needs lots of memory.
To increase PHP memory limit, edit the
/etc/php.ini file with your favorite text editor.
Scroll down to find the following lines.
; Maximum amount of memory a script may consume (128MB) ; http://php.net/memory-limit memory_limit = 128M
memory_limit according to the memory available on your system.
Now you will need to restart Apache web server in order use PHP with Apache, run the following command to do so.
systemctl restart httpd
Now you will have to create the the database required to store the Concrete5 data. Login to MySQL shell using the following command and providing the required password when prompted.
mysql -u root -p
Now execute the following query to create a new database.
CREATE DATABASE concrete5_data;
The above query will create a database named
concrete5_data. For the database you can use any name you prefer in the place of
concrete5_data. Make sure that you use semicolon at the end of each query as a MySQL query always ends with a semicolon. Once the database is created you can create a new user and grant the required permissions to the user for the database.
CREATE USER 'concrete5_user'@'localhost' IDENTIFIED BY 'StrongPassword';
The above query will create a user with username
concrete5_user. You can use any preferred username instead of
StrongPassword with a strong password.
Now provide the appropriate privileges to your database user over the database you have created. Run the following query to do so.
GRANT ALL ON concrete5_data.* TO 'concrete5_user'@'localhost';
Now run the following query to immediately apply the changes on the database privileges.
Now you can exit from MySQL prompt using following command.
Now you can download the Concrete5 files using the following command.
Or you can check the link below for the latest version of Concrete5 on the download page.
Now unzip the archive using the following command.
If you do not have unzip installed, you can run
yum -y install unzip.
Once the files are unzipped, you can move them to the web root directory of Apache using the following command.
mv concrete5-8.0.1/* .
Now provide the appropriate permissions to the web root directory using the follow command.
chown -R apache.apache /var/www/html/
Adjust SELinux settings using the following commands.
chcon -R -t httpd_sys_content_rw_t /var/www/html/
If you have firewall running then you will need to configure the firewall rules to allow traffic through port 80, which is the default port for HTTP. Run the following commands for the same.
firewall-cmd --permanent --zone=public --add-service=http
Now you can go to the web browser to further install the software using web interface. Go to the following web address using your favorite web browser.
You should see the following screen.
Choose a language to install Concrete5.
Now it will show you the list of dependencies, if any of the dependencies are not installed, you won't be able to proceed. If you have followed the tutorial, then you will have all the dependencies installed.
Click Continue to installation button. Now provide your site name, administrator email, and the administrator password.
Now choose the starting point of the website, if you choose Empty Site, then it will install and empty site with no theme, homepage, or any other elements. If you choose Full Site, them the installer will install a full website with theme, homepage, multiple page types, portfolio, contact forms, blogs and more. If you want to quickly start your website you can choose Full Site option.
In the database section, provide
localhost as Server address, your MySQL username and password and database name which we have created earlier. In Advanced settings, you can configure the conical domain name and SSL domain also, you can leave these settings as it is to get your site up and running quickly.
If the database information is correct, it will immediately start the installation after clicking, Install Concrete5 button. Once the installation is complete, you will be shown a success message, press Edit the Site button and you will be taken to your website. The system will also automatically log you in.
Now we have our Concrete5 website up and running.
Working with Concrete5
It is very easy to edit and create a new content on Concrete5 CMS as it provides an WYSIWYG editor. To edit any page, you can simply click on the edit icon on the top bar. In edit mode, you can select any block which you wish to edit.
In edit block you will see the different options which you can use to configure the block. To configure the page settings, you can click on the settings icon.
To add new content to your page, click on the add icon from the left of the top bar. It will put your website in edit mode, and you will get different blocks to add into your site.
To access the global settings of your website, click on the settings icon at the rightmost corner of your website.
To create a new empty page, blog entry or portfolio project, click on pages icon at the right corner of top bar. Once you have selected to create an empty page or blog entry, you will be prompted to provide different information accordingly. Finally you can use the add button from the left corner of top bar to add the desired content to your website.
Concrete5 contains various system settings like, email settings, cache and speed settings, SEO and environment settings. You can find these settings by going to Settings > System & Settings.
In this tutorial we have learnt how to install Concrete5 CMS on a CentOS server. You can now successfully deploy the CMS after installing the required dependencies. To learn more about Concrete5 CMS, you can visit the website here.