How to Install Zulip Chat Server on Debian 9

SuiteCRM, a fork of SugarCRM, is an enterprise open supply Buyer Relationship Administration (CRM) platform written in PHP programming language that can be utilized for creating enterprise methods, actions, and choices.

This tutorial describes all of the steps which might be required to put in the most recent model SuiteCRM platform on a Debian 9, with the intention to deploy a strong on-line platform for what you are promoting. The CRM software can be deployed on Debian Linux below Apache HTTP server, PHP and MariaDB database engine.


  • A bare-metal server or a digital personal server with minimal 2Gb of RAM and the minimal set up of Debian 9 server.
  • Entry to the root account by way of machine console or remotely by way of SSH. In addition to root account it’s also possible to use an account with root privileges by way of sudo command.
  • The exterior community interface configured with a static IP handle or the DHCP server configured to lease a static IP handle for this interface.
  • A public registered area identify with the intention to entry the applying from web. If the applying is deployed in intranets, you may carry out the set up course of and entry the web site by way of your server IP handle.
  • A mail server configured at your premises with the intention to use web site registration or different software options. You may also use a public mail service, comparable to Gmail or Yahoo!, Microsoft Trade or others with the intention to ship and obtain mails.

Put together the server

In step one, login to your server console with the foundation account or a consumer with root privileges gained by way of sudo and setup the identify of your system with the beneath command. Ensure you change the machine hostname used on this instance accordingly.

hostnamectl set-hostname

After you’ve modified the system hostname, subject the beneath command to confirm if the machine identify has been appropriately utilized.


cat /and so forth/hostname

hostname –s

hostname –f

Subsequent, be sure you replace your system repositories, software program packages and the kernel, by issuing the beneath instructions.

apt replace

apt improve

Lastly, after the replace course of accomplished, reboot the machine with the intention to apply hostname adjustments and kernel updates, by executing the beneath command.

systemctl reboot

After machine reboot, log again in to server console and execute the beneath command with the intention to set up some command line utilities, comparable to wget, curl and zip, that can be later used for downloading software program over web and extract zip archive information.

apt set up wget curl zip unzip

Set up Apache and PHP

SuiteCRM software can be deployed in Debian on high of a LAMP stack. The primary parts of the LAMP stack we’ll set up are Apache HTTP server and PHP dynamic programming language interpreter.  Execute the beneath command to put in Apache internet server and all required PHP modules in your system.

apt set up apache2 libapache2-mod-php7.Zero php7.Zero php7.0-gd php7.0-opcache php7.0-mbstring php7.0-xml php7.0-json php7.0-zip php7.0-curl php7.0-imap

Set up MariaDB database

The subsequent part of LAMP software program bundle we’ll set up in Debian server is MariaDB database engine. The RDBMS database is required by the applying for storing completely different platform configurations, comparable to customers, classes, contacts, merchandise, catalogs and different.  To put in MariaDB database engine and the PHP module wanted to entry the database, execute the beneath command in your machine console.

apt set up mariadb-server php7.0-mysql mariadb-client

In spite of everything LAMP parts had been put in, examine if Apache internet server and MariaDB daemon are up and working and listening for community connections on port 80 and 3306 TCP by issuing one of many following instructions.  

netstat –tlpn

ss- tulpn

Netstat utility shouldn’t be current by default in Debian 9 system. To put in netstat utility in a Debian Stretch server, execute the beneath command.

apt set up net-tools

In order to securely entry the CRM web site by way of HTTPS protocol that can safe the site visitors between server and shoppers browsers, be sure you additionally allow Apache TLS module and SSL website configuration file, by issuing the beneath instructions.

a2enmod ssl

a2ensite default-ssl.conf

 Subsequent, allow Apache rewrite module by issuing the beneath command. The rewrite module is important if you wish to modify internet server configurations on-fly by way of .htaccess information positioned in your area webroot.

a2enmod rewrite

systemctl restart apache2

 Subsequent, activate the rewrite module by inserting the required guidelines in Apache configuration information. First, we’ll apply the rewrite guidelines in Apache default configuration file. So, open /and so forth/apache2/sites-enabled/000-default.conf file for enhancing with a textual content editor and insert the beneath URL rewrite guidelines after the DocumentRoot assertion, as proven within the following excerpt.

nano /and so forth/apache2/sites-enabled/000-default.conf

 000-default.conf file excerpt:

<Listing /var/www/html>
  Choices +FollowSymlinks
  AllowOverride All
  Require all granted

 Shut the 000-default.conf  with CTRL+o, then Ctrl+x and open Apache default SSL website configuration file and insert the URL rewrite guidelines by including the next strains of code after DocumentRoot directive, as proven within the beneath pattern:

nano /and so forth/apache2/sites-enabled/default-ssl.conf

 SSL website configuration file excerpt:

<Listing /var/www/html>
  Choices +FollowSymlinks
  AllowOverride All
  Require all granted

Lastly, after you’ve made all of the above adjustments, restart Apache daemon to pick-up all new guidelines configured to this point.

systemctl restart apache2

Now, it’s best to go to your area or the server IP handle by way of HTTP protocol from a distant desktop machine. The default Debian internet web page must be displayed in your browser.


Firewall Configuration

Should you can’t see the net web page, confirm if UFW firewall software is enabled in Debian server.  If that’s the case it’s best to insert the beneath guidelines to permit HTTP and HTTPS site visitors to go by way of firewall.

ufw enable ‘WWW Full’


ufw enable 80/tcp

ufw enable 443/tcp

 The iptables firewall uncooked guidelines to permit port 80 and 443 TCP inbound site visitors to go the firewall are described beneath.

apt-get set up -y iptables-persistent

iptables -I INPUT -p tcp –destination-port 80 -j ACCEPT

iptables -I INPUT -p tcp –destination-port 443 -j ACCEPT

netfilter-persistent save

systemctl restart netfilter-persistent

systemctl standing netfilter-persistent

systemctl allow netfilter-persistent.service

 Lastly, after you’ve added the required firewall guidelines, take a look at if Apache internet server default internet web page will be displayed in a distant browser by visiting your area identify or server IP handle by way of HTTPS protocol. Execute ifconfig or ip a instructions to show the IP handle of your server.


Since you’re utilizing the robotically Self-Signed certificates issued by Apache at set up, certificates that’s untrusted by the browser, an warning saying that “Your connection is not secure” must be displayed within the browser. Settle for the untrusted certificates with the intention to bypass the error and to be redirected to Apache default internet web page, as illustrated within the beneath picture.

Apache web server on Debian

Configure MariaDB and PHP

Now, set’s begin securing MariaDB root account. Log in to MySQL console execute the beneath instructions to replace root account plugin.

mysql -h localhost

Welcome to the MariaDB monitor.  Instructions finish with ; or g.

Your MariaDB connection id is 2

Server model: 10.1.26-MariaDB-0+deb9u1 Debian 9.1


Copyright (c) 2000, 2017, Oracle, MariaDB Company Ab and others.


Sort 'assist;' or 'h' for assist. Sort 'c' to clear the present enter assertion.

MariaDB [(none)]> use mysql;

Studying desk info for completion of desk and column names

You possibly can flip off this function to get a faster startup with -A


Database modified

MariaDB [mysql]> replace consumer set plugin=” the place consumer=’root’;

Question OK, 1 row affected (0.00 sec)

Rows matched: 1  Modified: 1  Warnings: 0

MariaDB [mysql]> flush privileges;

Question OK, Zero rows affected (0.00 sec)


MariaDB [mysql]> exit


 Additionally, run the script mysql_secure_installation offered Debian stretch repositories to additional to safe MariaDB database. The script will ask you the next questions:  change MySQL root password, take away nameless customers, disable distant root logins and delete the take a look at database. Reply with sure to all questions, as illustrated within the beneath script output instance.





With the intention to log into MariaDB to safe it, we'll want the present

password for the foundation consumer.  Should you've simply put in MariaDB, and

you have not set the foundation password but, the password can be clean,

so it's best to simply press enter right here.


Enter present password for root (enter for none):

OK, efficiently used password, transferring on...


Setting the foundation password ensures that no person can log into the MariaDB

root consumer with out the correct authorisation.


You have already got a root password set, so you may safely reply 'n'.

Change the foundation password? [Y/n] y

New password:

Re-enter new password:

Password up to date efficiently!

Reloading privilege tables..

 ... Success!


By default, a MariaDB set up has an nameless consumer, permitting anybody

to log into MariaDB with out having to have a consumer account created for

them.  That is meant just for testing, and to make the set up

go a bit smoother.  It's best to take away them earlier than transferring right into a

manufacturing setting.


Take away nameless customers? [Y/n] y

 ... Success!


Usually, root ought to solely be allowed to attach from 'localhost'.  This

ensures that somebody can not guess on the root password from the community.


Disallow root login remotely? [Y/n] y

 ... Success!


By default, MariaDB comes with a database named 'take a look at' that anybody can

entry.  That is additionally meant just for testing, and must be eliminated

earlier than transferring right into a manufacturing setting.


Take away take a look at database and entry to it? [Y/n] y

 - Dropping take a look at database...

 ... Success!

 - Eradicating privileges on take a look at database...

 ... Success!


Reloading the privilege tables will be certain that all adjustments made to this point

will take impact instantly.


Reload privilege tables now? [Y/n] y

 ... Success!

Cleansing up...

All performed!  Should you've accomplished all the above steps, your MariaDB

set up ought to now be safe.

Thanks for utilizing MariaDB!

Check if all safety measures had been utilized by making an attempt to login to MySQL console with root account and no password equipped. The entry to the database must be denied if no password is offered for the foundation account, as illustrated within the beneath command excerpt:

mysql -h localhost -u root

ERROR 1045 (28000): Entry denied for consumer 'root'@'localhost' (utilizing password: NO)

Now, attempt to log in to MySQL console with root account and the password, as proven in beneath instance. It’s best to be capable of log in to MySQL console. Sort exit to go away MySQL database.

mysql -h localhost -u root -p

Enter password:

Welcome to the MariaDB monitor.  Instructions finish with ; or g.

Your MariaDB connection id is 15

Server model: 10.1.26-MariaDB-0+deb9u1 Debian 9.1

Copyright (c) 2000, 2017, Oracle, MariaDB Company Ab and others.

Sort 'assist;' or 'h' for assist. Sort 'c' to clear the present enter assertion.

MariaDB [(none)]> exit


On the following step, change the next PHP variables in php.ini configuration file as described beneath. Open /and so forth/php/7.0/apache2/php.ini file for enhancing and modify the next strains. First, be sure you backup the preliminary PHP configuration file.

cp /and so forth/php/7.0/apache2/php.ini{,.backup}

nano /and so forth/php/7.0/apache2/php.ini

Search, edit and alter the next variables in php.ini configuration file:

file_uploads = On
default_charset = UTF-8
memory_limit = 128M
post_max_size = 60M
upload_max_filesize = 60M
memory_limit = 256M
max_input_time = 60
max_execution_time = 6000
date.timezone = Europe/London

Change the timezone variable in PHP configuration file in response to your server geographical location.  The PHP timezone record will be discovered on the following hyperlink

To extend the load velocity of your web site pages, allow  OPCache plugin accessible for PHP7.  Insert the next OPCache strains on the backside of the PHP interpreter configuration file, after the [opcache] assertion, as proven within the following excerpt:


Lastly, shut the php.ini configuration file and restart Apache daemon to use adjustments by issuing the beneath command.

systemctl restart apache2

To show all PHP settings in a browser, create a PHP information file in your area webroot path by executing the next command.

echo ‘<?php phpinfo(); ?>’| tee /var/www/html/information.php

Go to the PHP information script file from a distant browser on the following URL. Scroll right down to date setting to confirm if PHP time zone configuration and different settings had been efficiently utilized.


Set up SuiteCRM

After we’ve configured all of the required LAMP settings for putting in SuiteCRM software, go to SuiteCRM official obtain web page at and seize the most recent zip file archive in your system by issuing the beneath command. On the time of scripting this information, the most recent launched model of SuiteCRM was file.



After SuiteCRM zip file archive obtain completes, extract the zip archive file to your present working listing and record the extracted information by issuing the beneath instructions.



ls –al SuiteCRM-7.9.9

Earlier than copying the set up information to your area webroot, be sure you take away the default index.html file put in by Apache bundle to internet server doc root path and likewise delete the data.php file created earlier.

rm /var/www/html/index.html

rm /var/www/html/information.php

The set up information of SuiteCRM software are positioned in your present working listing below SuiteCRM-7.9.9/ listing. Concern ls command to record this listing information. Copy all of the content material of the SuiteCRM-7.9.9/ listing to your internet server doc root path by issuing the next command.

cp -rf SuiteCRM-7.9.9/* /var/www/html/

Subsequent, grant Apache runtime consumer (www-data) with full write permissions to Apache doc root path, by issuing the beneath command.  Run ls command to record the permissions for the put in information positioned below /var/www/html/ listing.

chown -R www-data:www-data /var/www/html/

ls –al /var/www/html/

Subsequent, log in to MariaDB database console, and create SuiteCRM database. Select a reputation for this database and a consumer with a powerful password to handle the applying database, by issuing the next instructions. Ensure you change the database identify, consumer, and password used on this tutorial with your personal settings.

mysql –u root -p

Welcome to the MariaDB monitor.  Instructions finish with ; or g.

Your MariaDB connection id is 2

Server model: 10.1.26-MariaDB-0+deb9u1 Debian 9.1


Copyright (c) 2000, 2017, Oracle, MariaDB Company Ab and others.


Sort 'assist;' or 'h' for assist. Sort 'c' to clear the present enter assertion.

MariaDB [(none)]> create database mycrm_db;

Question OK, 1 row affected (0.00 sec)

MariaDB [(none)]> grant all privileges on mycrm_db.* to ‘crm_user’@’localhost’ recognized by ‘password1234’;

Question OK, Zero rows affected (0.00 sec) 

MariaDB [(none)]> flush privileges;

Question OK, Zero rows affected (0.00 sec)


MariaDB [(none)]> exit


Now, let’s begin the set up technique of SuiteCRM software. Open a browser and navigate your server’s IP handle or area identify by way of HTTPS protocol.


On the primary set up display screen, SuiteCRM installer will show the license settlement. Verify ‘I Settle for’ checkbox with the intention to agree with license phrases and situations, select the language for putting in the applying and hit on Subsequent button with the intention to begin the set up course of, as illustrated within the beneath screenshot.

SuiteCRM setup wizard

Within the subsequent set up display screen, SuiteCRM installer will examine your system setting necessities and can show and OK message if all PHP and server configurations are handed. With the intention to proceed the set up course of, hit on Subsequent button, as proven within the beneath screenshot.

System environment

Subsequent, the installer will show the Database Connection settings and Web site Configuration web page. Within the left pane, choose MySQL with MySQLi Extension as database kind and supply the MySQL database identify created for putting in SuiteCRM software, database server host handle, database username and the password wanted to entry SuiteCRM database. Additionally, choose “Same as Admin user” in “SuiteCRM Database user /”. On the correct aircraft, add an software administrator username and set a powerful password for admin account. Verify the URL handle of SuiteCRM occasion to match your area identify by way of HTTPS protocol, on port 443 and add the e-mail handle of the admin account. Use the next picture as a information to configure this step.

Database and site configuration

Subsequent, in the identical set up display screen, hit on “Choose Demo” information from “More options” menu, and select to not populate the SuiteCRM database with demo information.  Then, click on on State of affairs Choice menu and choose to allow the next SuiteCRM modules: Gross sales, Advertising, Finance, Service and Mission administration. Should you don’t want a module whereas putting in the applying, you may depart it unchecked and allow it after the set up course of completes utilizing the applying administration web page.

Choose demo data import

Subsequent, scroll down and hit on SMTP Server Specification menu to allow SuiteCRM emails choice. Add the identify and electronic mail handle you need to seem in “ From” electronic mail header. Then, select your electronic mail service supplier and specify the mail server settings. On this information, we’ll use Gmail service supplier to ship e-mail, and the mail server settings will be discovered illustrated within the beneath screenshot. After you’ve accomplished the required settings for enabling your mail service supplier, hit on Branding menu and add a reputation to be displayed in browser title bar for SuiteCRM software and add your personal web site brand picture.

SMTP server settings

Subsequent, scroll down once more and hit on System Locale Settings menu and specify how the time format, time zone and foreign money settings must be displayed in SuiteCRM software. Lastly, depart the Web site Safety choices unchecked for now and hit on Subsequent button to finish the set up course of. You should utilize the beneath picture to finish this step.

Locale settings and site security

After the set up course of finishes, you’ll be redirected to SuiteCRM login web page. With the intention to entry the applying admin panel, log in to SuiteCRM with the admin account credentials configured in the course of the set up course of, as proven within the beneath picture.

SuiteCRM Login

Earlier than logging in to SuiteCRM admin panel, first, return to the server console and subject the next command with the intention to take away the set up listing which is not wanted and might signify a safety breach.

rm -rf /var/www/html/set up/

You may also go to SuiteCRM dashboard by navigating to your server IP handle or area identify by way of HTTPS protocol. A view of SuiteCRM admin dashboard is introduced in beneath screenshot.


SuideCRM Dashboard

Lastly, with the intention to robotically redirect guests to HTTPS, in order that they will securely entry SuiteCRM interface from their browsers, return to your server terminal and edit the autogenerated .htaccess file positioned in your area doc root path, by issuing the beneath command.

nano /var/www/html/.htaccess

In .htaccess file, seek for <IfModule mod_rewrite.c> line and insert the beneath line guidelines after RewriteEngine On assertion with the intention to robotically redirect area site visitors to HTTPS.

.htaccess file excerpt:

# Redirect to HTTPS
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]

On the backside of the file, you may modify internet server native PHP server settings by including different strains with the settings to replicate your personal server sources and configurations.

# Modify PHP settings
php_value session.use_trans_sid 0
php_value register_globals 1
php_value upload_max_filesize 100M
php_value post_max_size 100M

With the intention to execute SuiteCRM Schedulers, edit your internet server runtime account crontab file with the beneath command and add the next cron job to run every minute.

crontab -e -u www-data

crontab file instance:

*    *    *    *    *     /usr/bin/php7.0  -f  /var/www/html/cron.php > /dev/null 2>&1

If you wish to circumvent browser warnings which might be generated every time a shopper visits your software, it’s best to take into account shopping for a certificates issued by a trusted Certificates Authority or subject a free certificates from Let’s Encrypt CA.

That’s all! SuiteCRM internet software has been efficiently put in and configured in a Debian 9 server on high of a LAMP stack.

With the intention to additional customise SuiteCRM platform, be sure you go to the applying wiki web page on the following handle:

Find out how to Set up Newest Zpanel Ver. 10.1.1 on CentOS 6.5 Half -1

Previous article

Suggestions for Empowering Non-Technical Customers to Keep a WordPress Website

Next article

You may also like


Leave a reply

Your email address will not be published. Required fields are marked *

More in Apache