How to install Cerb based on Apache on CentOS 7

Posted by koddos on Mon, 31 Jan 2022 13:05:44 +0100

1, Software introduction

Cerb is a workflow and email automation system written in PHP and using MySQL or MariaDB as database, which is very suitable for large teams.

His main features include:

1. Mass mail management.

2. Shared mailbox.

3. Dashboard for real-time monitoring and target tracking.

4. Real time notification.

5. Task manager.

6. Adapt to mobile devices.

7. REST based API.

Cerb is developed on the basis of 15 years' feedback from the community. Although the source code can be obtained on Github, the software is distributed under a commercial open source license called Devblocks Public license(DPL). It is worth noting that the license is issued based on the maximum number of employees logging in at the same time.

2, Server configuration

In the next steps, we will learn how to install and configure the tools required by Cerb: Apache, MariaDB and PHP

First, install EPEL:

# yum -y install epel-release

Install Apache

Now we will install the web server Apache using yum

# yum install -y httpd

Start Apache and start it with systemd settings

# systemctl start httpd

# systemctl enable httpd

Inspection status:

# systemctl status httpd




httpd.service - The Apache HTTP Server

 Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)

 Active: active (running)

3, Install PHP

As mentioned in the introduction, Cerb is written in PHP language. More specifically, we need PHP5 with the following extensions 5 or later:

· curl

· dom

· gd

· imap

· pcre

· session

· simplexml

· spl

· xml

· json

· mailparse

· mbstring

· mysqli

· openssl

In this tutorial, we will use PHP7. In order to install this version, we need to add Remi warehouse with the following code:

# rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm

Open warehouse

# yum-config-manager --enable remi-php71

Now we can install PHP and its extension tools mentioned above.

# yum install -y php php-curl php-mysqli php-openssl php-dom 


php-gd php-json php-pcre php-imap php-mbstring php-session 
php-simplexml php-xml php-spl php-mailparse

We will need to modify PHP. PHP for Cerb INI file parameter file_uploads,memory_limit,upload_max_filesize and post_ max_ The size is as follows:

file_uploads = On

upload_max_filesize = 64M

memory_limit = 256M

post_max_size = 64M

upload_tmp_dir = /tmp

Save settings, exit and restart the service:

# systemctl restart httpd

4, Install MariaDB

Now we will install MariaDB using yum:

# yum install -y mariadb mariadb-server

Open MariaDB and set the root account:

# systemctl start mariadb

# mysql_secure_installation

During this process, you will be asked the following questions:

New password: 

Re-enter new password: 

Password updated successfully!

Reloading privilege tables..

 ... Success!




Remove anonymous users? [Y/n] 

 ... Success!




Disallow root login remotely? [Y/n] 

 ... Success!







Remove test database and access to it? [Y/n] 

 - Dropping test database...

 ... Success!

 - Removing privileges on test database...

 ... Success!




Reload privilege tables now? [Y/n] 

 ... Success!




Cleaning up...




All done! If you've completed all of the above steps, your MariaDB

installation should now be secure.




Thanks for using MariaDB!

5, Create a new database

Next, we will create a database for Cerb. First, log in to MariaDB from the command line:

# mysql -u root -p

Create a new user and a new database:

MariaDB [(none)]> CREATE DATABASE cerbdb;

MariaDB [(none)]> CREATE USER 'cerbusr'@'localhost' IDENTIFIED BY 'usr_strong_password';

MariaDB [(none)]> GRANT ALL PRIVILEGES ON cerbdb.* TO 'cerb'@'localhost' IDENTIFIED BY 'usr_strong_password';

MariaDB [(none)]> FLUSH PRIVILEGES;

MariaDB [(none)]> EXIT;

6, Install Cerb

Next, to download and install Cerb, you need to switch to the root directory of the Web:

# cd /var/www/html

Clone Cerb warehouse code using git command:

# git clone git://github.com/wgm/cerb.git cerb

Make sure that Cerb's files are switched to the web server group and users, and Apache's files are www data

# cd cerb

# chown -R www-data:www-data 

# chmod -R u+w framework.config.php storage

framework.config.php is a configuration file. The storage directory mainly stores third-party plug-ins, attachments and temporary files

And caching.

Now open the HTTP port 80 of the system firewall:

# firewall-cmd --zone=public --permanent --add-service=http

# firewall-cmd --reload

The last step is browser access http://localhost/cerb Complete the installation of Cerb. Once installed, Cerb is ready to use.

7, Summary

In this tutorial, we learned how easy it is to use MariaDB to install and configure Cerb on CentOS7 and Apache based servers. As long as you follow the guide step by step, you can use Cerb. In today's fast-paced and dynamic working environment, workflow and e-mail automation systems such as Cerb can work easily.

Topics: IDE