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.
Requirements
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.
Installing Concrete5
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.
mysql_secure_installation
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.
php -v
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.
nano /etc/php.ini
Scroll down to find the following lines.
; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 128M
Increase the 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 concrete5_user
. Replace 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.
FLUSH PRIVILEGES;
Now you can exit from MySQL prompt using following command.
exit
Now you can download the Concrete5 files using the following command.
cd /var/www/html
wget https://core-releases.s3.amazonaws.com/4214/8115/2764/concrete5-8.0.1.zip
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.
unzip concrete5-8.0.1.zip
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
firewall-cmd --reload
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.
http://server-IP-address
You should see the following screen.
HP_NO_IMG/data/uploads/users/470c8527-5e11-484f-a9ee-17508abe67ed/1525530508.jpg” alt=”” />
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.
HP_NO_IMG/data/uploads/users/470c8527-5e11-484f-a9ee-17508abe67ed/1890098772.jpg” alt=”” />
Click Continue to installation button. Now provide your site name, administrator email, and the administrator password.
HP_NO_IMG/data/uploads/users/470c8527-5e11-484f-a9ee-17508abe67ed/150800270.jpg” alt=”” />
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.
HP_NO_IMG/data/uploads/users/470c8527-5e11-484f-a9ee-17508abe67ed/1464043276.jpg” alt=”” />
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.
HP_NO_IMG/data/uploads/users/470c8527-5e11-484f-a9ee-17508abe67ed/1192288307.jpg” alt=”” />
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.
HP_NO_IMG/data/uploads/users/470c8527-5e11-484f-a9ee-17508abe67ed/1420176255.jpg” alt=”” />
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.
HP_NO_IMG/data/uploads/users/470c8527-5e11-484f-a9ee-17508abe67ed/2134765513.jpg” alt=”” />
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.
HP_NO_IMG/data/uploads/users/470c8527-5e11-484f-a9ee-17508abe67ed/528456770.jpg” alt=”” />
To access the global settings of your website, click on the settings icon at the rightmost corner of your website.
HP_NO_IMG/data/uploads/users/470c8527-5e11-484f-a9ee-17508abe67ed/826772538.jpg” alt=”” />
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.
HP_NO_IMG/data/uploads/users/470c8527-5e11-484f-a9ee-17508abe67ed/1037636691.jpg” alt=”” />
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.
HP_NO_IMG/data/uploads/users/470c8527-5e11-484f-a9ee-17508abe67ed/163184781.jpg” alt=”” />
Conclusion
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.