How To Install Concrete5 CMS on Debian 9

Concrete5 is a free and open source Content Management System written in PHP language that can be used for publishing content on the Internet. It allows users to edit site content from the web interface. Concrete5 comes with rich set of features like, version tracking system, search engine optimization, server caching and much more.

In this tutorial, we will learn how to install and configure Concrete5 on Debian 9 server.

Requirements

  • A server running Debian 9
  • A non-root user with sudo privileges

Getting Started

Before starting, it is recommended to update your packages with the latest version. You can do this using the following command:

sudo apt-get update -y
sudo apt-get upgrade -y

Next, restart the system to apply all the changes. Then, install other required packages with the following command:

sudo apt-get install wget unzip curl git vim -y

Install LAMP Server

First, you will need to install the LAMP stack to run Concrete5. You can install all the packages by just running the following command:

sudo apt-get install apache2 mariadb-server php7.0 php7.0-mysql php7.0-gd php7.0-mcrypt php7.0-xml php7.0-mbstring libapache2-mod-php7.0 php7.0-zip -y

Once all the packages are installed, start the Apache and MariaDB service and enable them to start on boot time using the following command:

sudo systemctl start apache2
sudo systemctl enable apache2
sudo systemctl start mysql
sudo systemctl enable mysql

Configure MariaDB

By default, MariaDB is not secured, so you will need to secure it first. You can secure it by running the mysql_secure_installation script:

sudo mysql_secure_installation

Answer all the questions as shown below:

Change the 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

Once MariaDB is secured, log in to the MariaDB shell using the following command:

mysql -u root -p

Enter your root password when prompt, then create a database for Concrete5 with the following command:

MariaDB [(none)]> CREATE DATABASE concretedb;

Next, create a new user and grant privileges to the Concrete5 database with the following command:

MariaDB [(none)]> GRANT ALL PRIVILEGES on concretedb.* to 'user'@'localhost' identified by 'password';

Next, flush the privileges using the following command:

MariaDB [(none)]> FLUSH PRIVILEGES;

Finally, exit from the MariaDB shell with the following command:

MariaDB [(none)]> exit;

Install Concrete5

You can download the latest stable version of the Concrete5 from their official website with the following command:

wget --trust-server-names http://www.concrete5.org/download_file/-/view/99963/ -O concrete5.zip

Once the download is completed, extract the downloaded file with the following command:

unzip concrete5.zip

Next, copy the extracted directory to the Apache web root directory using the following command:

sudo cp -r concrete5-8.3.1 /var/www/html/concrete5

Next, give proper ownership and permissions to the concrete5 directory using the following command:

sudo chown -R www-data:www-data /var/www/html/concrete5
sudo chmod -R 775 /var/www/html/concrete5

Configure Apache for Concrete5

Next, you will need to create an Apache virtual host directive for Concrete5. You can do this by creating concrete5.conf file inside /etc/apache2/site-available directory:

sudo nano /etc/apache2/site-available/concrete5.conf

Add the following lines:

<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html/concrete5/
ServerName example.com
ServerAlias www.example.com
<Directory /var/www/html/concrete5/>
Options FollowSymLinks
AllowOverride All
</Directory>
ErrorLog /var/log/apache2/concrete5-error_log
CustomLog /var/log/apache2/concrete5-access_log common
</VirtualHost>

Save and close the file, then enable the virtual host with the following command:

sudo a2ensite concrete5

Next, enable Apache rewrite module and restart apache service with the following command:

sudo a2enmod rewrite
sudo systemctl restart apache2

Access Concrete5 Web Interface

Next, open your web browser and type the URL http://example.com, you will be redirected to the following page:

Concrete 5

Here, select your language and click on the Arrow button, you should see the following page:

Select language

Make sure all the required libraries are installed, then click on the Continue to Installation button, You should see the following page:

Set admin username and DB settings

Here, provide Admin username, password, database username, password and database name, then click on the Install Concrete5 button to start the installation. Once the installation is completed, you should see the following page:

Concrete 5 installation finished

Now, click on Edit Your Site button, you should see the Concrete5 dashboard on the following page:

Concrete 5 installed

Hitesh Jethva

About Hitesh Jethva

Over 8 years of experience as a Linux system administrator. My skills include a depth knowledge of Redhat/Centos, Ubuntu Nginx and Apache, Mysql, Subversion, Linux, Ubuntu, web hosting, web server, Squid proxy, NFS, FTP, DNS, Samba, LDAP, OpenVPN, Haproxy, Amazon web services, WHMCS, OpenStack Cloud, Postfix Mail Server, Security etc.

Share this page:

Suggested articles

0 Comment(s)

Add comment