Learn How To Install Concrete5 on Ubuntu 16.04 LTS

March 22, 2019

Table of Contents

If you are using a different system, please check our other tutorials.

Concrete5 is an open source CMS which offers many distinctive and useful features to assist editors in producing contents easily and quickly.

This article will cover the process of installing Concrete5 on an 16.04 LTS x64 server.

Prerequisites

  • An Ubuntu 16.04 LTS x64 server instance.
  • https://www.itweb.services/tutorials/linux-guides/how-to-use-sudo-on-debian-centos-and-freebsd”>sudo (or root account) user.

Step 1: Update the system

Update the system to the latest stable status as follows.

apt-get update && apt-get upgrade 

Step 2: Install Apache

Deploying a Concrete5 website requires you to setup a web server. On Ubuntu 16.04, you can install the Apache web server using apt.

apt-get install apache2 -y

Remove the Apache welcome page.

sudo sed -i 's/^/#&/g' /etc/apache2/sites-available/000-default.conf

Disable Apache’s public directory and file listing.

sed -i "s/Options Indexes FollowSymLinks/Options FollowSymLinks/" /etc/apache2/apache2.conf

Start the Apache service and enable it on system boot.

systemctl start httpd.service
systemctl enable httpd.service

Step 3: Install MariaDB 10

Another component that Concrete5 requires is database software. On Ubuntu 16.04 LTS, you can install MariaDB 10 as follows in order to get better performance.

Install MariaDB 10.1.

apt-get install software-properties-common
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://mirror.jmu.edu/pub/mariadb/repo/10.1/ubuntu xenial main'
apt update -y

Install MariaDB 10.1 using apt.

apt install -y mariadb-server

Start the MariaDB service.

systemctl start mariadb.service
systemctl enable mariadb.service

Next secure the installation of MariaDB.

/usr/bin/mysql_secure_installation

Reply to questions as below, and be sure to choose a strong MariaDB root password.

Enter current password for root (enter for none): Enter
Set root password? [Y/n]: Y
New password: <your-password>
Re-enter new password: <your-password>
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

Setup a database for Concrete5. Log into the MySQL shell as root.

mysql -u root -p

Type the MariaDB root password you set earlier and then press “Enter” in order to log in.

In the MySQL shell, create a database concrete5, a database user concrete5user, and its password yourpassword as follows.

Note: For security purposes, you should replace these sample parameters with your own ones.

CREATE DATABASE concrete5;
CREATE USER 'concrete5user'@'localhost' IDENTIFIED BY 'yourpassword';
GRANT ALL PRIVILEGES ON concrete5.* TO 'concrete5user'@'localhost' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;

Step 4: Install PHP 7

As required by Concrete5, install PHP 7 and necessary PHP extensions.

apt-get install -y php7.0 libapache2-mod-php7.0 php7.0-cli php7.0-common php7.0-mbstring php7.0-gd php7.0-intl php7.0-xml php7.0-mysql php7.0-mcrypt php7.0-zip

Step 5: Install Concrete5

Download the latest stable release of Concrete5 from its official download page.

cd /tmp
wget https://core-releases.s3.amazonaws.com/9314/8193/0256/concrete5-8.0.3.zip
apt-get install unzip -y
unzip concrete5-8.0.3.zip
mv concrete5-8.0.3 /var/www/html
chown -R www-data:www-data /var/www/html

Setup an Apache virtual host for Concrete5.

nano /etc/apache2/sites-enabled/concrete5.conf
<VirtualHost *:80>
    ServerAdmin admin@example.com
    DocumentRoot /var/www/html/concrete5-8.0.3/
    ServerName concrete5.example.com
    ServerAlias www.concrete5.example.com
    <Directory /var/www/html/concrete5-8.0.3/>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>
    ErrorLog /var/log/apache2/concrete5.example.com-error_log
    CustomLog /var/log/apache2/concrete5.example.com-access_log common
</VirtualHost>

Restart Apache.

systemctl restart apache2.service

Modify and enable the firewall rules to allow HTTP connections.

ufw allow 22/tcp
ufw allow 80/tcp

Next enable the firewall.

ufw enable

Don’t worry if you get a warning. If you added port 22, you will not have any issues.

root@itweb.services:~# ufw enable
Command may disrupt existing ssh connections. Proceed with operation (y|n)? y
Firewall is active and enabled on system startup

Point your web browser to http://203.0.113.1, and then continue the installation.

On the Choose Language page, choose your favorite language and then click the Right Arrow button.

On the Testing Environment page, make sure that all requests are satisfied, and then click the Continue to Installation button.

On the Site Information page, input information as below, and then click the Install Concrete5 button.

Site:

* Name: example.com
* Administrator Email Address: admin@example.com
* Administrator Password: <your-admin-password>
* Confirm Password: <your-admin-password>

Start Point:

* Decide to create a Empty Site or a Full Site.

Database:

* Server: localhost
* MySQL Username: concrete5user
* MySQL Password: yourpassword
* Database Name: concrete5

You will receive the Installation Complete message on the screen. Click the Edit Your Site button to start using Concrete5.

Need help?

Do you need help setting up this on your own service?
Please contact us and we’ll provide you the best possible quote!