How to Install EspoCRM on macOS

EspoCRM is a powerful open-source Customer Relationship Management software that offers a wide range of features to help businesses manage their customers efficiently. In this tutorial, we will walk you through the steps on how to install EspoCRM on macOS.

Prerequisites

Step 1: Download EspoCRM

Start by downloading EspoCRM from the official website at https://www.espocrm.com/. You can download the latest version as a .zip file or clone the Git repository.

Step 2: Extract EspoCRM

Next, extract the downloaded file to your desired folder. We recommend extracting the files to the /var/www directory.

sudo unzip espocrm-x.x.x.zip -d /var/www/

Alternatively, you can extract the files using the GUI by right-clicking on the file and selecting "Extract".

Step 3: Set File Permissions

Once the files have been extracted, you need to configure the file permissions for EspoCRM to work correctly. Run the following command on the extracted folder:

sudo chmod -R 777 /var/www/espocrm

This will give read, write, and execute permissions to everyone for the EspoCRM folder.

Step 4: Create a MySQL Database

Create a MySQL database for EspoCRM by running the following command:

CREATE DATABASE espocrm;

Next, create a MySQL user for EspoCRM with the following command:

CREATE USER 'espouser'@'localhost' IDENTIFIED BY 'password';

Replace espouser and password with your desired username and password.

Grant user permissions over the created database by running the following command:

GRANT ALL ON espocrm.* TO 'espouser'@'localhost';

Step 5: Configuring EspoCRM

Copy the data/config.php.template file to data/config.php and edit the file to connect EspoCRM to the MySQL database.

sudo cp /var/www/espocrm/data/config.php.template /var/www/espocrm/data/config.php
sudo nano /var/www/espocrm/data/config.php

Change the values of the following parameters in the file:

'host' => 'localhost',
'port' => '3306',
'username' => 'espouser',
'password' => 'password',
'dbName' => 'espocrm'

You can also configure additional settings in this file.

Step 6: Configure Web Server

If you are using Apache, create a new virtual host by creating a new file in the /etc/apache2/sites-available directory:

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

Then copy the following configuration into espocrm.conf

<VirtualHost *:80>
ServerName espocrm.local
DocumentRoot /var/www/espocrm
<Directory /var/www/espocrm>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

Save and close the file, then restart Apache:

sudo apachectl restart

If you are using Nginx, you can use the following configuration as a starting point:

sudo nano /etc/nginx/espocrm.conf
server {
listen 80;
server_name espocrm.local;

root /var/www/espocrm;
index index.php;

location / {
try_files $uri $uri/ /index.php?$args;
}

location ~ \.php$ {
proxy_pass http://127.0.0.1:9000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
fastcgi_param SCRIPT_FILENAME /var/www/espocrm$fastcgi_script_name;
include fastcgi_params;
}
}

Save and close the file, then restart Nginx:

sudo service nginx restart

Step 7: Run Installation

Now that the configuration and permissions are set up correctly, you can run the EspoCRM installation script by browsing to http://espocrm.local/install/ in your web browser. From here on, follow the on-screen instructions to complete the installation process.

Conclusion

Congratulations! You have successfully installed EspoCRM on your macOS machine. You can now start exploring the features and customizing your CRM according to your preferences.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!