In this tutorial, we will show you how to install and configure Cerb on your CentOS 7 server. For those of you who didn’t know, Cerb is an open-source application for web-based collaboration and automation. Cerb can also be used for sending a high volume of emails. Cerb is written in PHP and uses MySQL/MariaDB to store its data
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo
‘ to the commands to get root privileges. I will show you the step-by-step installation of Cerb on a CentOS 7 server.
Prerequisites
- A server running one of the following operating systems: CentOS 7.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- SSH access to the server (or just open Terminal if you’re on a desktop).
- An active internet connection. You’ll need an internet connection to download the necessary packages and dependencies for Cerb.
- A
non-root sudo user
or access to theroot user
. We recommend acting as anon-root sudo user
, however, as you can harm your system if you’re not careful when acting as the root.
Install Cerb on CentOS 7
Step 1. First, let’s start by ensuring your system is up-to-date.
yum clean all yum -y install epel-release yum -y update
Step 2. Install the LAMP server.
A CentOS 7 LAMP stack server is required. If you do not have a LAMP installed, you can follow our guide here. Also, install the required PHP modules:
yum install install php70w-cli php70w-pear php70w-gd php70w-xml php70w-curl php70w-gmp php70w-pdo php70w-mysql php70w-zip php70w-mbstring php70w-mcrypt
Once the installation is finished, you will need to modify the php.ini configuration file:
nano /etc/php.ini
Change the following line:
memory_limit = 128M # 128M or Higher according to the memory available upload_max_filesize = 2M # 32M or Higher post_max_size = 8M # 32M or Higher ;upload_tmp_dir = # Uncomment and change it to upload_tmp_dir = /tmp
Step 3. Configuring MariaDB for Cerb.
By default, MariaDB is not hardened. You can secure MariaDB using the mysql_secure_installation
script. you should read and below each step carefully which will set a root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB:
mysql_secure_installation
Configure it like this:
- Set root password? [Y/n] y - 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
Next, we will need to log in to the MariaDB console and create a database for Cerb. Run the following command:
mysql -u root -p
This will prompt you for a password, so enter your MariaDB root password and hit Enter. Once you are logged in to your database server you need to create a database for Cerb installation:
CREATE DATABASE cerb_data; CREATE USER 'cerb_user'@'localhost' IDENTIFIED BY 'Your-Strong-Password'; GRANT ALL PRIVILEGES ON cerb_data.* TO 'cerb_user'@'localhost'; FLUSH PRIVILEGES; EXIT;
Step 4. Installing Cerb on CentOS Linux.
Once the Database is configured, you will need to install Cerb. You can download the latest version of Cerb from the GitHub repository with the following command:
yum -y install git cd /var/www/html git clone git://github.com/wgm/cerb.git cerb
Next, you’ll have to change proper ownership and provide file permissions, you can do so using the following command:
cd /var/www/html/cerb chown -R apache:apache . chmod -R u+w framework.config.php storage
Step 5. Configure Firewall for Cerb.
You may also need to allow HTTP traffic on the port 80
through the system firewall:
firewall-cmd --zone=public --permanent --add-service=http firewall-cmd --reload
Step 6. Accessing Cerb Web UI.
Cerb will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://your-domain.com/cerb
or http://server-ip/cerb
and complete the required steps to finish the installation.
Congratulations! You have successfully installed Cerb. Thanks for using this tutorial for installing Cerb on CentOS 7 system. For additional help or useful information, we recommend you check the official Cerb website.