{"id":5124,"date":"2018-06-26T18:57:02","date_gmt":"2018-06-26T14:57:02","guid":{"rendered":"https:\/\/www.howtoforge.com\/tutorial\/debian-espocrm\/"},"modified":"2018-06-26T18:57:02","modified_gmt":"2018-06-26T14:57:02","slug":"how-to-install-espocrm-open-source-crm-software-on-debian-9","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/how-to-install-espocrm-open-source-crm-software-on-debian-9\/","title":{"rendered":"How to Install EspoCRM Open Source CRM Software on Debian 9"},"content":{"rendered":"<p>In this guide we\u2019ll show you how to install and configure the latest version of the EspoCRM software on Debian 9 on top of a LAMP stack, in order to create a free online Customer Relationship Management platform for your company.<\/p>\n<p>EspoCRM is a flexible and easy-to-use open source customer relationship management (CRM) platform designed to be fast, simple, and customizable. The software is mainly written in the PHP programming language and can be easily deployed in Linux on top of an Apache or a Nginx web server, PHP programming language and MySQL or MariaDB database management system. EspoCRM supports a large array of languages and can be deployed in call-centers, banks, education, healthcare, tourism, retail, real estate or on e-commerce business.<\/p>\n<h2 id=\"requirements\">Requirements<\/h2>\n<ul>\n<li>Minimal installation on a virtual machine or physical server of Debian 9 operating system<\/li>\n<li>Root account privileges or an account with root privileges via sudo command (local access via console or remote access via SSH)<\/li>\n<li>One of server NICs configured with a static IP address<\/li>\n<li>A public registered domain name so you perform the installation via web interface and access the application website. In intranets, you can access the app via a local domain or via your server IP address<\/li>\n<li>A mail server configured at your premises or access to a public email service, such as Gmail, Outlook, Yahoo!<\/li>\n<\/ul>\n<h2 id=\"prerequirements\">Pre-Requirements<\/h2>\n<p>First, log in to your Debian server console and make sure you update the system repositories, kernel and software packages by issuing the following\u00a0commands.<\/p>\n<p class=\"command\">apt update<\/p>\n<p class=\"command\">apt upgrade<\/p>\n<p>Next, configure machine hostname by executing the following command. Make sure you replace the hostname value used in this topic with your own notation.<\/p>\n<p class=\"command\">hostnamectl set-hostname www.mycrm.org<\/p>\n<p>Issue the commands below to check if the machine hostname has been correctly configured.<\/p>\n<p class=\"command\">hostnamectl<\/p>\n<p class=\"command\">cat \/etc\/hostname<\/p>\n<p class=\"command\">hostname \u2013s<\/p>\n<p class=\"command\">hostname \u2013f<\/p>\n<p>Finally, reboot Debian server in order to apply kernel updates and the hostname changes properly.<\/p>\n<p class=\"command\">systemctl reboot<\/p>\n<p>Next, you should install the LAMP software bundle in Debian system. On the first step, install the Apache web server and a PHP processing gateway interpreter alongside with all required PHP modules needed by the application to run properly by running the following command in your server console.<\/p>\n<p class=\"command\">apt install apache2 libapache2-mod-php7.0 php7.0 php7.0-gd php7.0-opcache php7.0-mbstring php7.0-xml php7.0-json php7.0-zip php7.0-curl php7.0-imap php7.0-soap php7.0-mcrypt php-mailparse<\/p>\n<p>Next, install an RDBMS database backend. In this guide, we\u2019ll configure the EspoCRM application to use the MariaDB database as backend. Issue the following command to install the MariaDB database and the PHP module needed to access the MySQL database.<\/p>\n<p class=\"command\">apt install mariadb-server php7.0-mysql mariadb-client<\/p>\n<p>After Apache, MySQL database and PHP has been installed, open the PHP default configuration file for editing and modify the following PHP variables as described below. Assure that initially, you make a backup of PHP configuration file.<\/p>\n<p class=\"command\">cp \/etc\/php\/7.0\/apache2\/php.ini{,.backup}<\/p>\n<p class=\"command\">nano \/etc\/php\/7.0\/apache2\/php.ini<\/p>\n<p>Search, edit and change the following variables in the\u00a0<strong>php.ini<\/strong> configuration file:<\/p>\n<pre>file_uploads = On<br\/>default_charset = UTF-8<br\/>memory_limit = 256M<br\/>post_max_size = 50M<br\/>upload_max_filesize = 50M<br\/>memory_limit = 256M<br\/>max_input_time = 180<br\/>max_execution_time = 180<br\/>zend.assertions = 0<br\/>date.timezone = Europe\/London<\/pre>\n<p>Replace the <strong><em>time.zone<\/em><\/strong> variable accordingly to your physical time by consulting the list of time zones provided by PHP docs at the following link <a href=\"http:\/\/php.net\/manual\/en\/timezones.php\" target=\"_blank\" rel=\"noopener\">http:\/\/php.net\/manual\/en\/timezones.php<\/a><\/p>\n<p>In order to increase the load speed of your application pages via OPCache plugin available in PHP7, insert the following OPCache code lines at the bottom of the PHP interpreter configuration file, below the <strong><em>[opcache]<\/em><\/strong> statement, as detailed below:<\/p>\n<pre>opcache.enable=1 <br\/>opcache.enable_cli=1 <br\/>opcache.interned_strings_buffer=8 <br\/>opcache.max_accelerated_files=10000 <br\/>opcache.memory_consumption=128 <br\/>opcache.save_comments=1<br\/>opcache.revalidate_freq=1<\/pre>\n<p>Close the <strong><em>php.ini<\/em><\/strong> configuration file and check if the variables have been correctly added, something which you can do by issuing the below command.<\/p>\n<p class=\"command\">grep opcache \/etc\/php\/7.0\/apache2\/php.ini| grep -v &#8220;;&#8221;<\/p>\n<p>Next, add the following\u00a0UFW firewall application rule in your system, in order to allow HTTP traffic to pass through firewall, by issuing the following command.<\/p>\n<p class=\"command\">ufw allow WWW<\/p>\n<p>or<\/p>\n<p class=\"command\">ufw allow 80\/tcp<\/p>\n<p><strong\/><strong\/>Some sysadmins prefer <strong>iptables<\/strong> raw rules to manage the Firewall rules in Debian server. In case of iptables, issue the below commands to install the firewall and add the following rules to allow port 80 and 22\u00a0 (in case of SSH remote connections) inbound traffic so that you can access the system and browse the application via a web browser.<\/p>\n<p class=\"command\">apt-get install -y iptables-persistent<\/p>\n<p class=\"command\">iptables -I INPUT -p tcp &#8211;destination-port 80 -j ACCEPT<\/p>\n<p class=\"command\">iptables -I INPUT -p tcp &#8211;destination-port 22 -j ACCEPT<\/p>\n<p class=\"command\">netfilter-persistent save<\/p>\n<p class=\"command\">systemctl restart netfilter-persistent<\/p>\n<p class=\"command\">systemctl status netfilter-persistent<\/p>\n<p class=\"command\">systemctl enable netfilter-persistent.service<\/p>\n<p>Finally, open a browser and visit your Debian machine IP address or your domain name via HTTP protocol. If you don\u2019t know your machine IP address, execute <strong>ifconfig<\/strong> or <strong>ip a<\/strong> command\u00a0to get the IP address of your server. If the connection to the web server is established, you should be able to view Apache web server default web page in your browser.<\/p>\n<p><em><strong>http:\/\/your_domain.tld<\/strong><\/em><\/p>\n<p>On the next step, enable Apache rewrite, and deflate SSL modules required by the EspoCRM to properly run, by issuing the below command.<\/p>\n<p class=\"command\">a2enmod rewrite deflate ssl<\/p>\n<p>SSL module requires that you also enable default SSL configuration file in order to visit the application via HTTPS protocol. The HTTPS protocol is used for securing the traffic between the server and clients. Execute the following command to enable the Apache SSL site configuration file.<\/p>\n<p class=\"command\">a2ensite default-ssl.conf<\/p>\n<p>Afterwards, open Apache default SSL site configuration file with a text editor and insert the following lines of code after <strong><em>DocumentRoot<\/em><\/strong> directive, as shown in the below sample, in order to activate the rules placed in the .htaccess file. The .htaccess file is usually located on top of your domain webroot.<\/p>\n<p class=\"command\"><em>nano \/etc\/apache2\/sites-enabled\/default-ssl.conf<\/em><\/p>\n<p><strong><em\/><\/strong>SSL site configuration file excerpt:<\/p>\n<pre>&lt;Directory \/var\/www\/html&gt;<br\/>\u00a0 Options +FollowSymlinks<br\/>\u00a0 AllowOverride All<br\/>\u00a0 Require all granted<br\/>&lt;\/Directory&gt;<\/pre>\n<p><strong><em\/><\/strong>You should also open the\u00a0<strong>\/etc\/apache2\/sites-enabled\/000-default.conf<\/strong> file for editing and add the same URL rewrite rules as inserted in SSL configuration file. Add the lines of code after <strong>DocumentRoot<\/strong> statement as shown in the below example.<\/p>\n<pre>&lt;Directory \/var\/www\/html&gt;<br\/>\u00a0 Options +FollowSymlinks<br\/>\u00a0 AllowOverride All<br\/>\u00a0 Require all granted<br\/>&lt;\/Directory&gt;<\/pre>\n<p>Finally, restart the Apache daemon to apply all rules configured so far and visit your domain via the HTTPS protocol. Because you\u2019re using the automatically Self-Signed certificates pairs issued by Apache at installation, certificate that is untrusted by the browser, an insecure connection error warning should be displayed in the browser.\u00a0 Accept the warning in order to accept the untrusted certificate and continue to be redirected to the Apache default web page.<\/p>\n<p class=\"command\">systemctl restart apache2<\/p>\n<p><em><strong>https:\/\/yourdomain.tld<\/strong><\/em><\/p>\n<p><a class=\"fancybox\" id=\"img-image001\" href=\"https:\/\/www.howtoforge.com\/images\/install_espocrm_in_debian_9\/big\/image001.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/06\/how-to-install-espocrm-open-source-crm-software-on-debian-9.png\" alt=\"SSL self signed certificate warning\" width=\"550\" height=\"434\" title=\"\"><\/a><\/p>\n<p>If you plan to expose your EspoCRM platform for production in the internet, you should consider buying a certificate issued by a trusted Certificate Authority or get a free certificate pair from Let\u2019s Encrypt CA, so that clients can visit the application without errors displaying in their browsers.<\/p>\n<p>In case the UFW firewall application blocks incoming network connections to HTTPS port, you should add a new rule to allow HTTPS traffic to pass through the firewall by issuing the following command.<\/p>\n<p class=\"command\">ufw allow HTTPS<\/p>\n<p>or<\/p>\n<p class=\"command\">ufw allow 443\/tcp<\/p>\n<p>For iptables firewall, add the following rule to allow port 443 inbound traffic in the firewall so that you can browse the domain name. Save and restart the iptables service in order to apply the rules after system reboot.<\/p>\n<p class=\"command\">iptables -I INPUT -p tcp &#8211;destination-port 443 -j ACCEPT<\/p>\n<p class=\"command\">netfilter-persistent save<\/p>\n<p class=\"command\">systemctl restart netfilter-persistent<\/p>\n<p class=\"command\">systemctl status netfilter-persistent<\/p>\n<p>Finally, create a PHP info file in your domain webroot path by executing the following command.<\/p>\n<p class=\"command\">echo &#8216;&lt;?php phpinfo(); ?&gt;&#8217;| tee \/var\/www\/html\/info.php<\/p>\n<p>Check PHP settings and the time zone configuration by visiting the PHP info script file from a browser at the following URL, as illustrated in the below image. Scroll down to the\u00a0<strong>date<\/strong> setting to check the PHP timezone configuration.<\/p>\n<p><em><strong>https:\/\/domain.tld\/info.php<\/strong><\/em><\/p>\n<p>On the next step, log in to the MySQL server console and secure MariaDB root account by executing the below commands. Type <em>exit<\/em> to leave database console.<\/p>\n<p class=\"command\">mysql -h localhost<\/p>\n<pre readability=\"14\">Welcome to the MariaDB monitor.\u00a0 Commands end with ; or \\g.<p>Your MariaDB connection id is 2<\/p><p>Server version: 10.1.26-MariaDB-0+deb9u1 Debian 9.1<\/p><p>Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.<\/p><p>Type 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.<\/p><\/pre>\n<p class=\"command system\">MariaDB [(none)]&gt; use mysql;<\/p>\n<pre readability=\"5\">Reading table information for completion of table and column names<p>You can turn off this feature to get a quicker startup with -A<\/p><p>Database changed<\/p><\/pre>\n<p class=\"command system\">MariaDB [mysql]&gt; update user set plugin=&#8221; where user=&#8217;root&#8217;;<\/p>\n<pre readability=\"5\">Query OK, 1 row affected (0.00 sec)<p>Rows matched: 1\u00a0 Changed: 1\u00a0 Warnings: 0<\/p><\/pre>\n<p class=\"command system\">MariaDB [mysql]&gt; flush privileges;<\/p>\n<pre>Query OK, 0 rows affected (0.00 sec)<p>MariaDB [mysql]&gt; exit<\/p><p>Bye<\/p><\/pre>\n<p><strong><em\/><\/strong>Also, execute the\u00a0<strong>mysql_secure_installation<\/strong>\u00a0script in order to further secure the MariaDB daemon. While running the script you will be asked a series of questions designed to secure the MariaDB database, such as: to change MySQL root password, to remove anonymous users, to disable remote root logins and delete the test database. Type \u201cyes\u201d\u00a0 for all questions asked, as illustrated in the below excerpt.<\/p>\n<p class=\"command\"><em>mysql_secure_installation<\/em><\/p>\n<pre readability=\"83\">NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB<p>\u00a0\u00a0\u00a0\u00a0\u00a0 SERVERS IN PRODUCTION USE!\u00a0 PLEASE READ EACH STEP CAREFULLY!<\/p><p>In order to log into MariaDB to secure it, we'll need the current<\/p><p>password for the root user.\u00a0 If you've just installed MariaDB, and<\/p><p>you haven't set the root password yet, the password will be blank,<\/p><p>so you should just press enter here.<\/p><p>Enter current password for root (enter for none):<\/p><p>OK, successfully used password, moving on...<\/p><p>Setting the root password ensures that nobody can log into the MariaDB<\/p><p>root user without the proper authorisation.<\/p><p>You already have a root password set, so you can safely answer 'n'.<\/p><p>Change the root password? [Y\/n] y<\/p><p>New password:<\/p><p>Re-enter new password:<\/p><p>Password updated successfully!<\/p><p>Reloading privilege tables..<\/p><p>\u00a0... Success!<\/p><p>By default, a MariaDB installation has an anonymous user, allowing anyone<\/p><p>to log into MariaDB without having to have a user account created for<\/p><p>them.\u00a0 This is intended only for testing, and to make the installation<\/p><p>go a bit smoother.\u00a0 You should remove them before moving into a<\/p><p>production environment.<\/p><p>Remove anonymous users? [Y\/n] y<\/p><p>\u00a0... Success!<\/p><p>Normally, root should only be allowed to connect from 'localhost'.\u00a0 This<\/p><p>ensures that someone cannot guess at the root password from the network.<\/p><p>Disallow root login remotely? [Y\/n] y<\/p><p>\u00a0... Success!<\/p><p>By default, MariaDB comes with a database named 'test' that anyone can<\/p><p>access.\u00a0 This is also intended only for testing, and should be removed<\/p><p>before moving into a production environment.<\/p><p>Remove test database and access to it? [Y\/n] y<\/p><p>\u00a0- Dropping test database...<\/p><p>\u00a0... Success!<\/p><p>\u00a0- Removing privileges on test database...<\/p><p>\u00a0... Success!<\/p><p>Reloading the privilege tables will ensure that all changes made so far<\/p><p>will take effect immediately.<\/p><p>Reload privilege tables now? [Y\/n] y<\/p><p>\u00a0... Success!<\/p><p>Cleaning up...<\/p><p>All done!\u00a0 If you've completed all of the above steps, your MariaDB<\/p><p>installation should now be secure.<\/p><p>Thanks for using MariaDB!<\/p><\/pre>\n<p><em\/>Verify MariaDB server security issue by trying to login to the database via console with no root password. The access to the database should be denied if no password is provided for the root account, as illustrated in the below command excerpt:<\/p>\n<p class=\"command\">mysql -h localhost -u root<\/p>\n<pre class=\"system\">ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)<\/pre>\n<p><strong\/>Now, try to login to the database with a root password. You should be able to access MySQL console, as shown in the below command sample:<\/p>\n<p class=\"command\">mysql -h localhost -u root -p<\/p>\n<pre readability=\"16\">Enter password:<p>Welcome to the MariaDB monitor.\u00a0 Commands end with ; or \\g.<\/p><p>Your MariaDB connection id is 15<\/p><p>Server version: 10.1.26-MariaDB-0+deb9u1 Debian 9.1<\/p><p>Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.<\/p><p>Type 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.<\/p><p>MariaDB [(none)]&gt; exit<\/p><p>Bye<\/p><\/pre>\n<h2 id=\"install-espocrm\">Install EspoCRM<\/h2>\n<p>After the Apache HTTP server, MariaDB daemon and PHP interpreter have been properly configured for installing EspoCRM application in your Debian system. Execute the following command in order to install the command line utilities mentioned in it.<\/p>\n<p class=\"command\">apt install wget bash-completion zip unzip curl<\/p>\n<p><strong\/>On the next step, visit the EspoCRM official download page at <a href=\"https:\/\/www.espocrm.com\/download\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.espocrm.com\/download\/<\/a> and grab the latest zip package compressed archive in your system via wget utility. The current release of EspoCRM at the time of writing this tutorial is <span><strong>EspoCRM-5.0.3<\/strong><\/span><\/p>\n<p class=\"command\">wget https:\/\/www.espocrm.com\/downloads\/EspoCRM-5.0.3.zip<\/p>\n<p class=\"command\">ls<\/p>\n<p><strong\/>After the zip archive download finishes, extract the zip archive file to your current working directory and list the extracted files by issuing the below commands. The installation files of the application are located in <strong>EspoCRM-5.0.3 <\/strong>directory.<\/p>\n<p class=\"command\">unzip EspoCRM-5.0.3.zip<\/p>\n<p class=\"command\">ls<\/p>\n<p class=\"command\">ls -al EspoCRM-5.0.3<\/p>\n<p><strong\/>Next, make sure to delete the index.html and info.php files from webroot directory:<\/p>\n<p class=\"command\">rm \/var\/www\/html\/index.html<\/p>\n<p class=\"command\">rm \/var\/www\/html\/info.php<\/p>\n<p><strong\/>Copy all the files located in the extracted directory to your web server document root path by issuing the following command. Also, make sure you copy the hidden file .htaccess to the webroot path.<\/p>\n<p class=\"command\">cp -rf EspoCRM-5.0.3\/* \/var\/www\/html\/<\/p>\n<p class=\"command\">cp EspoCRM-5.0.3\/.htaccess \/var\/www\/html\/<\/p>\n<p>Next, execute the below commands in order to grant the Apache <em>www-data<\/em> account with full write permissions to the web root path. Use the\u00a0<strong>ls<\/strong> command to list permissions for EspoCRM installed files located in the \/var\/www\/html\/ directory.<\/p>\n<p class=\"command\">chown -R www-data:www-data \/var\/www\/html\/<\/p>\n<p class=\"command\">ls \u2013al \/var\/www\/html\/<\/p>\n<p><strong\/>Next, log in to the MariaDB database console and create an EspoCRM database. Use a descriptive name for the database and create a user with a strong password to manage this database. Replace the database name, user and password used in this example with your own values.\u00a0 The commands used for this step are shown in the below excerpt.<\/p>\n<p class=\"command\">mysql \u2013u root -p<\/p>\n<pre readability=\"14\">Welcome to the MariaDB monitor.\u00a0 Commands end with ; or \\g.<p>Your MariaDB connection id is 2<\/p><p>Server version: 10.1.26-MariaDB-0+deb9u1 Debian 9.1<\/p><p>Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.<\/p><p>Type 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.<\/p><\/pre>\n<p class=\"system command\">MariaDB [(none)]&gt; create database espocrm_db;<\/p>\n<pre class=\"system\">Query OK, 1 row affected (0.00 sec)<\/pre>\n<p class=\"system command\">MariaDB [(none)]&gt; grant all privileges on espocrm_db.* to &#8216;crm_user&#8217;@&#8217;localhost&#8217; identified by &#8216;password1234&#8217;;<\/p>\n<pre class=\"system\">Query OK, 0 rows affected (0.00 sec)<\/pre>\n<p class=\"system command\">MariaDB [(none)]&gt; flush privileges;<\/p>\n<pre>Query OK, 0 rows affected (0.00 sec)<p>MariaDB [(none)]&gt; exit<\/p><p>Bye<\/p><\/pre>\n<p><strong\/>Now, open a browser and navigate your server\u2019s IP address or domain name via HTTPS protocol in order to proceed with EspoCRM platform installation process. On the first installation screen, EspoCRM installer will display a welcome message and a list from where you can select the installation language. Select your appropriate language from the presented list and hit on Start button in order to start the installation process, as illustrated in the below image.<\/p>\n<p><em><strong>https:\/\/yourdomain.tld<\/strong><\/em><\/p>\n<p><a class=\"fancybox\" id=\"img-image002\" href=\"https:\/\/www.howtoforge.com\/images\/install_espocrm_in_debian_9\/big\/image002.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/06\/how-to-install-espocrm-open-source-crm-software-on-debian-9-1.png\" alt=\"EspoCRM Welcome screen\" width=\"550\" height=\"375\" title=\"\"><\/a><\/p>\n<p>In the next screen, read the license agreement statements and check &#8220;<em>I accept the agreemen<\/em>t&#8221; checkbox and hit on Next button to move to the next step.<\/p>\n<p><a class=\"fancybox\" id=\"img-image003\" href=\"https:\/\/www.howtoforge.com\/images\/install_espocrm_in_debian_9\/big\/image003.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/06\/how-to-install-espocrm-open-source-crm-software-on-debian-9-2.png\" alt=\"Accept license agreement\" width=\"550\" height=\"367\" title=\"\"><\/a><\/p>\n<p>In the next installation screen, setup MySQL database connection settings. Supply MySQL database host address (127.0.0.1 or localhost), the database name, username and the password configured for EspoCRM application. After completing all required database fields, hit on Next button to move to the next installation step. Use the below screenshot as a guide to complete this step.<\/p>\n<p><a class=\"fancybox\" id=\"img-image004\" href=\"https:\/\/www.howtoforge.com\/images\/install_espocrm_in_debian_9\/big\/image004.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/06\/how-to-install-espocrm-open-source-crm-software-on-debian-9-3.png\" alt=\"Database details\" width=\"550\" height=\"380\" title=\"\"><\/a><\/p>\n<p>In the next screen, EspoCRM installer will check your server environment configurations in order to determine if all recommended MySQL variables and PHP modules and settings are properly configured. If all configurations are passed, hit on Install button to start the EspoCRM installation process.<\/p>\n<p><a class=\"fancybox\" id=\"img-image005\" href=\"https:\/\/www.howtoforge.com\/images\/install_espocrm_in_debian_9\/big\/image005.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/06\/how-to-install-espocrm-open-source-crm-software-on-debian-9-4.png\" alt=\"Recommended settings\" width=\"527\" height=\"550\" title=\"\"><\/a><\/p>\n<p>In the next step, add an administrator account for EspoCRM and set up a strong password for this admin account. When you finish, hit on Next button to continue further with the installation process.<\/p>\n<p><a class=\"fancybox\" id=\"img-image006\" href=\"https:\/\/www.howtoforge.com\/images\/install_espocrm_in_debian_9\/big\/image006.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/06\/how-to-install-espocrm-open-source-crm-software-on-debian-9-5.png\" alt=\"Set a username and password\" width=\"550\" height=\"396\" title=\"\"><\/a><\/p>\n<p>Next, setup EspoCRM system settings by selecting your appropriate Date Format and Time Format. Also, choose your application appropriate Time Zone setting by selecting your nearest Continent\/City from the provided timezone list. Setup the first day of the week, application default currency, thousand and decimal separator marks and the system language. When all the above settings are configured, hit on Next button to continue with the installation process.<\/p>\n<p><a class=\"fancybox\" id=\"img-image007\" href=\"https:\/\/www.howtoforge.com\/images\/install_espocrm_in_debian_9\/big\/image007.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/06\/how-to-install-espocrm-open-source-crm-software-on-debian-9-6.png\" alt=\"Date and time settings\" width=\"550\" height=\"370\" title=\"\"><\/a><\/p>\n<p>On the next step, configure the EspoCRM outgoing mail settings. Add a name for &#8220;From Name&#8221; email header and the email contact address of the admin account. This address will be used for sending emails to outside clients. Also, make sure you add the email server address, the port number of the mail server and check Auth checkbox and supply server authentication credentials and the security level, if that\u2019s the case. When you finish completing this step, hit on next button to complete the installation process.<\/p>\n<p><a class=\"fancybox\" id=\"img-image008\" href=\"https:\/\/www.howtoforge.com\/images\/install_espocrm_in_debian_9\/big\/image008.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/06\/how-to-install-espocrm-open-source-crm-software-on-debian-9-7.png\" alt=\"SMTP settings\" width=\"550\" height=\"404\" title=\"\"><\/a><\/p>\n<p>After the database structure has been imported and all platform settings are written to the application configuration file, the installation process will complete. The installer will display notifying you that the installation has been successfully completed and will display a note about the EspoCRM scheduled\u00a0job you need to add into your server crontab file.<\/p>\n<p><a class=\"fancybox\" id=\"img-image009\" href=\"https:\/\/www.howtoforge.com\/images\/install_espocrm_in_debian_9\/big\/image009.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/06\/how-to-install-espocrm-open-source-crm-software-on-debian-9-8.png\" alt=\"EspoCRM installation complete\" width=\"550\" height=\"421\" title=\"\"><\/a><\/p>\n<p>In order to access and manage your CRM application, open a browser and navigate to your server IP address or domain name via HTTPS. Use the credentials configured during the installation process in order to log in into EspoCRM backend panel, as shown in the below screenshot.<\/p>\n<p><em><strong>https:\/\/yourdomain.tld<\/strong><\/em><\/p>\n<p><a class=\"fancybox\" id=\"img-image010\" href=\"https:\/\/www.howtoforge.com\/images\/install_espocrm_in_debian_9\/big\/image010.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/06\/how-to-install-espocrm-open-source-crm-software-on-debian-9-9.png\" alt=\"Log in to the CRM dashbaord\" width=\"550\" height=\"377\" title=\"\"><\/a><\/p>\n<p>The default EspoCRM dashboard should contain no data so far. A preview on EspoCRM initial dashboard is illustrated in the below screenshot.<\/p>\n<p><a class=\"fancybox\" id=\"img-image011\" href=\"https:\/\/www.howtoforge.com\/images\/install_espocrm_in_debian_9\/big\/image011.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/06\/how-to-install-espocrm-open-source-crm-software-on-debian-9-10.png\" alt=\"EspoCRM Dashboard\" width=\"550\" height=\"404\" title=\"\"><\/a><\/p>\n<p>In order to further configure EspoCRM platform settings, hit on top right icon with three horizontal lines and hit on Administration link from the top-down menu, as shown in the below image.<\/p>\n<p><a class=\"fancybox\" id=\"img-image012\" href=\"https:\/\/www.howtoforge.com\/images\/install_espocrm_in_debian_9\/big\/image012.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/06\/how-to-install-espocrm-open-source-crm-software-on-debian-9-11.png\" alt=\"Administration section\" width=\"550\" height=\"423\" title=\"\"><\/a><\/p>\n<p>In order to force visitors to securely access EspoCRM backend interface via HTTPS protocol that encrypts the traffic between the server and client browsers, return to your server terminal and edit the <em>.htaccess<\/em> file located in your website document root path, by issuing the below command.<\/p>\n<p class=\"command\">nano \/var\/www\/html\/.htaccess<\/p>\n<p>In .htaccess file, search for the\u00a0<strong><em>&lt;IfModule mod_rewrite.c&gt; <\/em><\/strong>line and add the below rules after <strong><em>RewriteEngine On <\/em><\/strong>statement in order to automatically redirect all domain traffic to HTTPS.<\/p>\n<pre># Redirect to HTTPS<br\/>&lt;IfModule mod_rewrite.c&gt;<br\/>RewriteEngine On<br\/>RewriteCond %{HTTPS} off<br\/>RewriteRule (.*) https:\/\/%{SERVER_NAME}\/$1 [R,L]<\/pre>\n<p>At the top, the file you can change the native PHP server settings, such as increased values for <em>upload_max_filesize<\/em> and <em>post_max_size<\/em>\u00a0 PHP variables, in order to support large file uploads into application storage. Modify these PHP settings with great caution. Make sure that these variables match your server resources and configurations.<\/p>\n<pre># Modify PHP settings<br\/>php_value session.use_trans_sid 0<br\/>php_value register_globals 1<br\/>php_value upload_max_filesize 100M<br\/>php_value post_max_size 100M <\/pre>\n<p>Next, test the scheduled job before adding it to run into crontab daemon file, by issuing the below command. The crontask job should be executed with Apache HTTP server runtime account privileges.<\/p>\n<p class=\"command\">sudo -u www-data \/usr\/bin\/php7.0 -f \/var\/www\/html\/cron.php<\/p>\n<p>Finally, add the following\u00a0crontab job owned by Apache <em>www-data<\/em> account, by issuing the below command.<\/p>\n<p class=\"command\">crontab -u www-data \u2013e<\/p>\n<p>\u00a0Crontab file excerpt:<\/p>\n<pre>*\u00a0\u00a0\u00a0 *\u00a0\u00a0\u00a0 *\u00a0\u00a0\u00a0 *\u00a0\u00a0\u00a0 *\u00a0\u00a0\u00a0\u00a0 \/usr\/bin\/php7.0 -f \/var\/www\/html\/cron.php &gt; \/dev\/null 2&gt;&amp;1<\/pre>\n<p>That\u2019s all! You have successfully installed and configured EspoCRM platform in Debian 9. For other settings concerning EspoCRM platform, visit the documentation page at the following address: \u00a0<a href=\"https:\/\/www.espocrm.com\/documentation\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.espocrm.com\/documentation\/<\/a><\/p>\n<div>\n<p><b>Share this page:<\/b><\/p>\n<p>\n<a href=\"https:\/\/www.facebook.com\/sharer.php?u=https%3A%2F%2Fwww.howtoforge.com%2Ftutorial%2Fdebian-espocrm%2F\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/06\/how-to-install-espocrm-open-source-crm-software-on-debian-9-12.png\" height=\"20\" alt=\"\" title=\"\"><\/a><br \/>\n<a href=\"https:\/\/twitter.com\/intent\/tweet?url=https%3A%2F%2Fwww.howtoforge.com%2Ftutorial%2Fdebian-espocrm%2F&amp;text=How+to+Install+EspoCRM+Open+Source+CRM+Software+on+Debian+9&amp;via=howtoforgecom&amp;related=howtoforgecom\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/06\/how-to-install-espocrm-open-source-crm-software-on-debian-9-13.png\" height=\"20\" alt=\"\" title=\"\"><\/a><br \/>\n<a href=\"https:\/\/twitter.com\/howtoforgecom\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/06\/how-to-install-espocrm-open-source-crm-software-on-debian-9-14.png\" height=\"20\" alt=\"\" title=\"\"><\/a><br \/>\n<a href=\"https:\/\/plus.google.com\/share?url=https%3A%2F%2Fwww.howtoforge.com%2Ftutorial%2Fdebian-espocrm%2F\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/06\/how-to-install-espocrm-open-source-crm-software-on-debian-9-15.png\" height=\"20\" alt=\"\" title=\"\"><\/a>\n<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this guide we\u2019ll show you how to install and configure the latest version of the EspoCRM software on Debian 9 on top of a LAMP stack, in order to create a free online Customer Relationship Management platform for your company. EspoCRM is a flexible and easy-to-use open source customer relationship management (CRM) platform designed [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"class_list":["post-5124","post","type-post","status-publish","format-standard","hentry","category-36"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/5124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=5124"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/5124\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=5124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=5124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=5124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}