In this article, I will take you through the steps to install Zikula CMS on Ubuntu 20.04 LTS. Today many of the modern websites runs on a Content Management System(CMS) because of the number of useful features it provides. There are many open source CMS out there available to use in Linux based Systems. Zikula is one such open source software which allows you to build simple to complex websites using different types of extensions. It contains all of the Symfony features. It also provides a Centralized site administration Interface for better control. More on Zikula Official website.
What is Content Management System(CMS)
Content Management System or CMS is a powerful platform that allows a user to manage and build their website without having the need to write entire source code from scratch. It does the basic infrastructure building for you. CMS allows you to easily install and manage plugins as and when required. It also allows you to store and manage contents like web pages, posts and images.
How to Install Zikula CMS on Ubuntu 20.04 LTS
Step 1: Prerequisites
a) You should have a running
Ubuntu 20.04 LTS Server.
b) You should have
root access to run privileged commands.
c) You should have
apt-get utility available in your System.
d) You should also have
wget utility available in your System.
Step 2: Update Your Server
First, Let's warm up the Package Cache with all the package information from all the enabled repositories and install all the latest available updates using
apt update or
apt-get update command as shown below.
root@localhost:~# apt update Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB] Hit:2 http://in.archive.ubuntu.com/ubuntu focal InRelease Get:3 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB] Get:4 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB] Ign:5 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 InRelease Hit:6 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 Release Get:7 http://in.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [562 kB] Get:8 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1,344 kB] Get:9 http://in.archive.ubuntu.com/ubuntu focal-updates/main Translation-en [276 kB] Get:10 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [279 kB]
Step 3: Install tasksel
Zikula CMS requires Apache, MySQL and PHP to be pre installed. You can choose to install all the components individually or you can also do it by installing just one application which has all the components pre packed inside it. That application is LAMP Server. But to install LAMP Server you need
tasksel utility so if you don't have this utility already available in your System then install it by using
apt-get install tasksel -y command as shown below.
root@localhost:~# apt-get install tasksel -y Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: tasksel-data The following NEW packages will be installed: tasksel tasksel-data 0 upgraded, 2 newly installed, 0 to remove and 207 not upgraded. Need to get 0 B/34.0 kB of archives. After this operation, 289 kB of additional disk space will be used. Preconfiguring packages ... Selecting previously unselected package tasksel-data. (Reading database ... 204049 files and directories currently installed.) .......................................................
Step 4: Install LAMP Server
Instead of installing all the components of LAMP Server individually using apt or apt-get package manager, you can use tasksel to install Apache, MySQL and PHP in just one single command. This can be done by using
tasksel install lamp-server command as shown below.
root@localhost:~# tasksel install lamp-server
Step 5: Check PHP Version
After installing LAMP Server, you can check the currently installed PHP version by using
php -v command. As you can see, current version is
root@localhost:~# php -v PHP 7.4.3 (cli) (built: Oct 25 2021 18:20:54) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies
Step 6: Check MySQL Service
By default, MySQL service will be active and running post LAMP Server installation. You can verify the same by using
systemctl status mysql command as shown below.
root@localhost:~# systemctl status mysql ● mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2021-11-12 11:40:39 IST; 10min ago Main PID: 22285 (mysqld) Status: "Server is operational" Tasks: 38 (limit: 2299) Memory: 356.3M CGroup: /system.slice/mysql.service └─22285 /usr/sbin/mysqld
Step 7: Create a Database
By default, MySQL Server does not ask for password when you try to login with root user account. So you can login to MySQL server using
mysql -u root command as shown below.
root@localhost:~# mysql -u root Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8 Server version: 8.0.27-0ubuntu0.20.04.1 (Ubuntu) Copyright (c) 2000, 2021, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
After login to MySQL Server, you need to first create a database to store all the data. Here we are creating a database called
create database zikulacms_db query.
mysql> create database zikulacms_db; Query OK, 1 row affected (0.06 sec)
Then we need to create a user that will have complete access of
zikulacms_db database. Here we are creating a user called
cmsuser and setting his password using
create user 'cmsuser'@'localhost' identified by 'cms123' query.
mysql> create user 'cmsuser'@'localhost' identified by 'cms123'; Query OK, 0 rows affected (0.54 sec)
Next, you need to grant complete access of
zikulacms_db database to
grant all privileges on zikulacms_db.* to 'cmsuser'@'localhost' query.
mysql> grant all privileges on zikulacms_db.* to 'cmsuser'@'localhost'; Query OK, 0 rows affected (0.02 sec)
Finally, you need to run
flush privileges to update all the changes and then quit the database using
mysql> flush privileges; Query OK, 0 rows affected (0.30 sec) mysql> exit; Bye
Step 8: Download Zikula
You can go to Download section and download the latest Zikula package using
wget command as shown below. This will download the package in current directory. Check more about
wget command on What is wget and How to Use wget command in Linux(20 Popular wget examples).
root@localhost:~# wget https://github.com/zikula/core/releases/download/3.0.3/zikula.tar.gz --2021-11-12 18:12:14-- https://github.com/zikula/core/releases/download/3.0.3/zikula.tar.gz Resolving github.com (github.com)... 220.127.116.11 Connecting to github.com (github.com)|18.104.22.168|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/781544/a7cfdf00-eeb9-11ea-8b3f-4b5ea7c76b54?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20211112%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20211112T124215Z&X-Amz-Expires=300&X-Amz-Signature=b81848ef230562bd0db85582d5956900921a02005667c66dd3ec1732f0c2ccc8&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=781544&response-content-disposition=attachment%3B%20filename%3Dzikula.tar.gz&response-content-type=application%2Foctet-stream [following] --2021-11-12 18:12:15-- https://objects.githubusercontent.com/github-production-release-asset-2e65be/781544/a7cfdf00-eeb9-11ea-8b3f-4b5ea7c76b54?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20211112%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20211112T124215Z&X-Amz-Expires=300&X-Amz-Signature=b81848ef230562bd0db85582d5956900921a02005667c66dd3ec1732f0c2ccc8&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=781544&response-content-disposition=attachment%3B%20filename%3Dzikula.tar.gz&response-content-type=application%2Foctet-stream Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 22.214.171.124, 126.96.36.199, 188.8.131.52, ... Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|184.108.40.206|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 56487136 (54M) [application/octet-stream] Saving to: ‘zikula.tar.gz’ zikula.tar.gz 100%[============================================================================>] 53.87M 8.09MB/s in 14s 2021-11-12 18:12:34 (3.82 MB/s) - ‘zikula.tar.gz’ saved [56487136/56487136]
Step 9: Extract Package
After downloading Zikula package, you need to extract by using tar -xvf zikula.tar.gz command. This will extract the package in
zikula directory under current location.
root@localhost:~# tar -xvf zikula.tar.gz
Step 10: Setup Directory
Next comes the setup of directory where you need to keep all the zikula files so that it can be served to the Apache web server. You can create a directory called
/var/www/html path using mkdir /var/www/html/zikula command as shown below.
root@localhost:~# mkdir /var/www/html/zikula
After creating the directory now you need to copy all the files from local zikula directory using
cp -rvf zikula/* /var/www/html/zikula/ command as shown below.
root@localhost:~# cp -rvf zikula/* /var/www/html/zikula/
Please ensure to change the ownership of
zikula directory and all its files to
www-data user and
www-data group using
chown -R www-data:www-data /var/www/html/zikula command as shown below.
root@localhost:~# chown -R www-data:www-data /var/www/html/zikula
Step 11: Setting FQDN
Since I don't have any fully qualified domain name yet to use in the apache configuration, so I will first set up my FQDN. This can be easily done by mapping your local IP with your chosen domain name in
/etc/hosts file. For the moment, I am going to use
zikulacms.example.com as my FQDN so I will map my local IP with this FQDN in
/etc/hosts file as shown below. Here my local IP Address is 192.168.29.194. This could be different for you so you need to map it accordingly.
root@localhost:~# nano /etc/hosts 127.0.0.1 localhost 192.168.29.194 zikulacms.example.com # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters
To verify, you can run ping command and check if this FQDN is working fine.
root@localhost:~# ping zikulacms.example.com PING zikulacms.example.com (192.168.29.194) 56(84) bytes of data. 64 bytes from zikulacms.example.com (192.168.29.194): icmp_seq=1 ttl=64 time=0.028 ms 64 bytes from zikulacms.example.com (192.168.29.194): icmp_seq=2 ttl=64 time=0.050 ms 64 bytes from zikulacms.example.com (192.168.29.194): icmp_seq=3 ttl=64 time=0.042 ms 64 bytes from zikulacms.example.com (192.168.29.194): icmp_seq=4 ttl=64 time=0.046 ms 64 bytes from zikulacms.example.com (192.168.29.194): icmp_seq=5 ttl=64 time=0.050 ms 64 bytes from zikulacms.example.com (192.168.29.194): icmp_seq=6 ttl=64 time=0.051 ms 64 bytes from zikulacms.example.com (192.168.29.194): icmp_seq=7 ttl=64 time=0.042 ms 64 bytes from zikulacms.example.com (192.168.29.194): icmp_seq=8 ttl=64 time=0.041 ms ^C --- zikulacms.example.com ping statistics --- 8 packets transmitted, 8 received, 0% packet loss, time 7174ms rtt min/avg/max/mdev = 0.028/0.043/0.051/0.007 ms
Step 12: Configure Apache Server
Next you need to setup the Apache configuration file for Zikula CMS under
/etc/apache2/sites-available path. This can be done by creating a file called
nano /etc/apache2/sites-available/zikulacms.conf command and putting all the below contents.
root@localhost:~# nano /etc/apache2/sites-available/zikulacms.conf <VirtualHost *:80> ServerAdmin firstname.lastname@example.org DocumentRoot /var/www/html/zikula/public ServerName zikulacms.example.com <Directory /var/www/html/zikula/public> Options FollowSymLinks AllowOverride All Order allow,deny allow from all </Directory> ErrorLog /var/log/apache2/zikulacms_error CustomLog /var/log/apache2/zikulacms_access common </VirtualHost>
Step 13: Reload Apache
Then enable Zikula CMS configuration by using
a2ensite zikulacms.conf command as shown below.
root@localhost:~# a2ensite zikulacms.conf Enabling site zikulacms. To activate the new configuration, you need to run: systemctl reload apache2
Finally, reload the apache2 service by using systemctl reload apache2 command to take the new configuration.
root@localhost:~# systemctl reload apache2
Step 14: Access Zikula CMS
It is now time to access Zikula CMS GUI Dashboard by going to your favorite browser and using URL
http://zikulacms.example.com. Click on Install Zikula and follow the entire process to complete the installation.