Cerb è un'applicazione open source per la collaborazione e l'automazione basate sul web. Cerb può anche essere utilizzato per inviare un elevato volume di e-mail. Cerb è scritto in PHP e utilizza MySQL / MariaDB per archiviare i suoi dati. In questo tutorial imparerai come installare Cerb su CentOS 7.
Prerequisiti
Passaggio 1: aggiornamento del sistema
Prima di installare eventuali pacchetti su un'istanza del server CentOS, si consiglia di aggiornare il sistema. Accedi usando l'utente sudo ed esegui i seguenti comandi per aggiornare il sistema.
sudo yum -y install epel-release
sudo yum -y update
sudo shutdown -r now
Una volta terminato il riavvio del sistema, accedere nuovamente come utente sudo e procedere al passaggio successivo.
Passaggio 2: installare il server Web Apache
Eseguire il comando seguente per installare il server Web Apache.
sudo yum -y install httpd
Una volta installato Apache, eseguire il comando seguente per avviare Apache e abilitarlo ad avviarsi automaticamente all'avvio.
sudo systemctl start httpd.service
sudo systemctl enable httpd.service
Passaggio 3: installa PHP 7
Cerb è compatibile con qualsiasi versione di PHP superiore a 5.5. Puoi utilizzare l'ultima versione di PHP 7 per ottenere le massime prestazioni. Aggiungi e abilita il repository Remi sul tuo sistema.
sudo rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum -y install yum-utils
sudo yum-config-manager --enable remi-php71
Installa l'ultima versione di PHP con i moduli richiesti di Cerb.
sudo yum -y install php php-curl php-dom php-gd php-imap php-json php-mbstring php-mysqli php-openssl php-pcre php-session php-simplexml php-xml php-spl php-mailparse
Modifica /etc/php.iniusando il tuo editor preferito.
sudo nano /etc/php.ini
Aggiorna le seguenti righe.
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
Salvare il file ed uscire dall'editor di testo. Quindi, riavvia Apache.
sudo systemctl restart httpd.service
Passaggio 4: installare MariaDB
Installa MariaDB usando il seguente comando. MariaDB è un fork di MySQL.
sudo yum -y install mariadb mariadb-server
Una volta installato MariaDB, eseguire il comando seguente per avviare MariaDB e abilitarlo per l'avvio automatico all'avvio.
sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service
Ora proteggi l'installazione di MariaDB usando il seguente comando.
sudo mysql_secure_installation
Ti verrà chiesta la password di root corrente. Poiché abbiamo appena installato MariaDB, la password di root non è impostata. Premere il tasto "Invio" per procedere. Imposta una password di root sicura per il tuo server MySQL e rispondi Ya tutte le altre domande poste. Tutte le domande poste sono autoesplicative.
Passaggio 5: creare un database per Cerb
Accedi alla shell MySQL come utente root usando il seguente comando.
mysql -u root -p
Fornire la password per l'utente root appena impostato in precedenza.
Ora esegui le seguenti query per creare il database e l'utente del database per l'installazione di Cerb.
CREATE DATABASE cerb_data;
CREATE USER 'cerb_user'@'localhost' IDENTIFIED BY 'StrongPassword';
GRANT ALL PRIVILEGES ON cerb_data.* TO 'cerb_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Make sure that you use a semicolon at the end of each query above. You can replace the database name cerb_data and database username cerb_user according to your needs. Be sure to change StrongPassword with a very strong password.
Step 6: Install Cerb
Install git if you do not have it already installed.
sudo yum -y install git
Now, switch to the webroot directory of Apache and clone the latest version of Cerb using the following command.
cd /var/www/html
sudo git clone git://github.com/wgm/cerb.git cerb
Provide appropriate ownership and file permissions using the following commands.
cd /var/www/html/cerb
sudo chown -R apache:apache .
sudo chmod -R u+w framework.config.php storage
You may also need to allow HTTP traffic on port 80 through the system firewall.
sudo firewall-cmd --zone=public --permanent --add-service=http
sudo firewall-cmd --reload
Now complete the installation using a web browser.
Step 7: Finish installation
Go to the following link using your favorite web browser.
http://192.0.2.1/cerb
Replace 192.0.2.1 with the IP address of your server. If you have followed the tutorial correctly, you should have all of the requirements satisfied. On the "Database Setup" interface, choose the driver MySQLi and engine InnoDB. Also provide the database name and credentials that you have created earlier. Once the database connection is checked, it will ask to provide details of your SMTP server to send outgoing emails. Finally, create the administrator user.
Cerb is now installed on your server.
Run the following command to delete the install directory before using it.
sudo rm -rf /var/www/html/cerb/install
You can now use Cerb through your web browser.