12 C
Texas
angeloma
Senior Writer and partner

How to install EspoCRM on Ubuntu 20.04?

Sometimes CRMs want to cover so much that they end up being difficult to use. This situation has been understood by several companies and from there, other easier CRMs with more concrete options began to emerge. Today, you will learn how to install EspoCRM on Ubuntu 20.04 which takes this concept to a professional level making it a solid option for many SMEs.

EspoCRM is a web application that allows users to see, enter, and evaluate all your company relationships regardless of the type. People, companies, projects, or opportunities – all in an easy and intuitive interface.

This application is used by many companies in different industries worldwide and has a large number of satisfied customers. It is completely open-source which guarantees us access to the source code and the possibility to adjust it.

So, let’s install it.

Install EspoCRM on Ubuntu 20.04

- Advertisement -

EspoCRM as usual is a web-based CRM. Therefore it has to be installed on a fully functional webserver. In this case, we have chosen Apache as a web server and MariaDB as a database manager, forming then the LAMP stack.

So, read our post about it

How to install LAMP on Ubuntu 20.04?

Also, install these PHP modules needed to run EspoCRM and some important packages.

libapache2-mod-php7.4 openssl php-imagick php7.4-common php7.4-curl php7.4-gd php7.4-imap php7.4-intl php7.4-json php7.4-ldap php7.4-mbstring php7.4-mysql php-ssh2 php7.4-xml php7.4-zip unzip

1.- Configuring PHP to work with EspoCRM

Once Apache and PHP are installed, it is convenient to make some adjustments to the PHP configuration. So, open the configuration file:

sudo nano /etc/php/7.4/apache2/php.ini

And within the file it sets the following minimum values:

max_execution_time 180
max_input_time 180
memory_limit 256M
post_max_size 20M
upload_max_filesize 20M

When using the nano text editor, you can press the CTRL + W keys to perform an accurate search.

Save the changes and close the editor.

2.- Create a new database and user for MariaDB

EspoCRM handles a large amount of data thanks to the database managers, so we installed MariaDB. Now it remains, to create a new database and a new user with permissions on it. This in order not to use the root user.

So, open the MariaDB shell:

sudo mysql -u root -p

And run the following commands:

CREATE DATABASE espocrm;
GRANT ALL ON espocrm.* to 'espocrmuser'@'localhost' IDENTIFIED BY 'espocrmpss';
FLUSH PRIVILEGES;
exit;

Now we can continue.

3.- Download EspoCRM

From a computer other than your server, we will do the download. To do this, visit the EspoCRM website and go to the download section and after entering an email, you can download the file.

Then upload it to your server using the scp command.

scp [file_path] [user]@[server]:/tmp

In my case,

scp Downloads/EspoCRM-6.0.3.zip [email protected]:/tmp

Now go back to the server and decompress the file you just uploaded.

cd /tmp/
unzip EspoCRM-6.0.3.zip

Now move it to the Apache root directory. Also, we will change the name for a simpler one:

sudo mv EspoCRM-6.0.3 /var/www/html/espocrm

Now, assign the appropriate permissions and make Apache the owner of the folder:

sudo chmod 755 -R /var/www/html/spocrm/
sudo chown www-data:www-data -R /var/www/html/espocrm/

The next step is to create a new VirtualHost for EspoCRM:

sudo nano /etc/apache2/sites-available/espocrm.conf

And add the following content:

<VirtualHost *:80>
      ServerAdmin admin@your_domain.com
      DocumentRoot /var/www/html/espocrm/
      ServerName crm.osradar.test

     <Directory /var/www/html/espocrm>
            Options FollowSymlinks
            AllowOverride All
            Require all granted
     </Directory>

     ErrorLog ${APACHE_LOG_DIR}/your-domain.com_error.log
     CustomLog ${APACHE_LOG_DIR}/your-domain.com_access.log combined

</VirtualHost>
1.- Creating the new Virtualhost for EspoCRM
1.- Creating the new Virtualhost for EspoCRM

Replace ServerName with your own and make the desired settings and save the changes.

Make the new Virtualhost and Apache’s rewrite module available:

sudo ln -s /etc/apache2/sites-available/espocrm.conf /etc/apache2/sites-enabled/espocrm.conf
sudo a2enmod rewrite
sudo systemctl restart apache2

Now we can complete the installation.

4.- Install EspoCRM on Ubuntu 20.04

Now it is time to complete the installation.

On a client computer open a web browser and go to http://your-server and you will see the following:

2.- EspoCRM installer initial screen
2.- EspoCRM installer initial screen

From this screen, you can choose the language of the installation. So, click on the start button.

Then, accept the license terms.

3.- License terms
3.- License terms

Now add the database parameters:

4.- Database configuration
4.- Database configuration

Now the installer will check your entire system to see if it meets the requirements.

5.- Server requirements
5.- Server requirements

After this, you must create the administrator account.

6.- Creating the new admin account
6.- Creating the new admin account

Then configure the instance. Here you can define the time zone, currency, and time and date format.

7.- Configuring EspoCRM on Ubuntu 20.04
7.- Configuring EspoCRM on Ubuntu 20.04

Configure EspoCRM with your email server credentials.

8.- SMTP settings
8.- SMTP settings

If everything goes well, you will see the following message indicating that the installation was successful. Also, you will be prompted for the command to enter to schedule EspoCRM tasks using Crontab.

9.-EspoCRM installed on Ubuntu 20.04
9.-EspoCRM installed on Ubuntu 20.04

Go to the administration panel and you will see the login screen:

10.- Login Screen
10.- Login Screen

And finally, EspoCRM in all its glory.

11.- EspoCRM on Ubuntu 20.04
11.- EspoCRM on Ubuntu 20.04

Conclusion

EspoCRM is a fairly simple CRM that aims to be a solid alternative for SMEs. This program is not complicated to use and focuses on the basics to be much more useful to the user. After reading this post, now you know how to install it without problems.

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

1 COMMENT

  1. Thanks for this great tutorial, it worked perfectly !

    You just forgot 1 letter “e” on this line :

    sudo chmod 755 -R /var/www/html/spocrm/

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article