Install YetiForce CRM on Ubuntu 16.04

yetiforce crm ubuntuIn this article, we will explain how to install YetiForce CRM on an Ubuntu 16.04 VPS with MariaDB, PHP-FPM and Nginx. YetiForce is an open source innovative CRM system. It is built on top of Vtiger and has hundreds of changes that help to accomplish even the most challenging tasks in the simplest way. This guide should work on other Linux VPS systems as well but was tested and written for an Ubuntu 16.04 VPS.

Login to your VPS via SSH with your sudo user

ssh user@vps_IP

Update the system and install necessary packages

[user]$ sudo apt-get update && sudo apt-get -y upgrade
[user]$ sudo apt-get install software-properties-common nano wget

Install MariaDB 10.1

To add the MariaDB repository to your sources list and install the latest MariaDB 10.1 server, run the following commands:

[user]$ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
[user]$ sudo add-apt-repository 'deb [arch=amd64,i386] http://ftp.osuosl.org/pub/mariadb/repo/10.1/ubuntu xenial main'
[user]$ sudo apt-get update
[user]$ sudo apt-get install -y mariadb-server

When the installation is complete, run the following command to secure your installation:

[user]$ mysql_secure_installation

Next, we need to create a database for the YetiForce installation.

[user]$ mysql -uroot -p
MariaDB [(none)]> CREATE DATABASE yetiforce;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON yetiforce.* TO 'yetiforce'@'localhost' IDENTIFIED BY 'strong_password';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q

Install PHP and required PHP modules

To install the latest stable version of PHP version 7.0 and all necessary modules, run:

[user]$ sudo apt-get -y install php-fpm php-cli php-json php-curl php-imap php-gd php-mysql php-xml php-zip

The following commands will set the PHP memory limit to 512MB, change the values of upload_max_filesize and post_max_size to 100M and set the timezone to UTC.

sed -i "s/memory_limit = .*/memory_limit = 512M/" /etc/php/7.0/cli/php.ini
sed -i "s/;date.timezone.*/date.timezone = UTC/" /etc/php/7.0/cli/php.ini
sed -i "s/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/" /etc/php/7.0/fpm/php.ini
sed -i "s/upload_max_filesize = .*/upload_max_filesize = 100M/" /etc/php/7.0/fpm/php.ini
sed -i "s/post_max_size = .*/post_max_size = 100M/" /etc/php/7.0/fpm/php.ini

Create a new PHP-FPM pool for your user if you already don’t have one:

[user]$ sudo nano /etc/php/7.0/fpm/pool.d/your_user_name.conf
[your_user_name]
user = your_user_name
group = your_user_name
listen = /var/run/php/php7.0-your_user_name-fpm.sock
listen.owner = your_user_name
listen.group = your_user_name
listen.mode = 0666
pm = ondemand
pm.max_children = 5
pm.process_idle_timeout = 10s
pm.max_requests = 200
chdir = /

Do not forget to change your_user_name with your username.
Restart PHP-FPM:

[user]$ sudo service php7.0-fpm restart

Download and extract YetiForce CRM

Download the latest version of YetiForce from GitHub: https://github.com/YetiForceCompany/YetiForceCRM/releases. At the time of writing, the latest version is YetiForce version 3.1.0.

[user]$ wget https://github.com/YetiForceCompany/YetiForceCRM/archive/3.1.0.zip
[user]$ unzip 3.1.0.zip
[user]$ mv YetiForceCRM-3.1.0 ~/myYetiForce.com
[user]$ rm -f 3.1.0.zip

Install and configure Nginx

To install the latest stable version of Nginx available on the Ubuntu repositories, run:

[user]$ sudo apt-get install nginx

Generate a self signed ssl certificate:

[user]$ sudo mkdir -p /etc/nginx/ssl
[user]$ cd /etc/nginx/ssl
[user]$ sudo openssl genrsa -des3 -passout pass:x -out yetiforce.pass.key 2048
[user]$ sudo openssl rsa -passin pass:x -in yetiforce.pass.key -out yetiforce.key
[user]$ sudo rm yetiforce.pass.key
[user]$ sudo openssl req -new -key yetiforce.key -out yetiforce.csr
[user]$ sudo openssl x509 -req -days 365 -in yetiforce.csr -signkey yetiforce.key -out yetiforce.crt

If you don’t want to get warnings associated with self-signed SSL Certificates, you can purchase a trusted SSL certificate.

Next, create a new Nginx server block:

[user]$ sudo nano /etc/nginx/sites-available/myYetiForce.com
server {
    listen 443;
    server_name myYetiForce.com;
    root /home/your_user_name/myYetiForce.com;

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

    ssl on;
    ssl_certificate     /etc/nginx/ssl/yetiforce.crt;
    ssl_certificate_key /etc/nginx/ssl/yetiforce.key;
    ssl_session_timeout 5m;
    ssl_ciphers               'AES128+EECDH:AES128+EDH:!aNULL';
    ssl_protocols              TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;

    access_log  /var/log/nginx/yetiforce.access.log;
    error_log   /var/log/nginx/yetiforce.error.log;

    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php/php7.0-your_user_name-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_intercept_errors off;
        fastcgi_buffer_size 16k;
        fastcgi_buffers 4 16k;
    }

    location ~ /\.ht {
        deny all;
    }
}

server {
    listen      80;
    server_name myYetiForce.com;

    add_header Strict-Transport-Security max-age=2592000;
    rewrite ^ https://$server_name$request_uri? permanent;
}

Do not forget to change your_user_name with your username.

Activate the server block by creating a symbolic link :

[user]$ sudo ln -s /etc/nginx/sites-available/myYetiForce.com /etc/nginx/sites-enabled/myYetiForce.com

Test the Nginx configuration and restart nginx:

[user]$ sudo nginx -t
[user]$ sudo service nginx restart

Install YetiForce CRM

Open https://myYetiForce.com/ in your favorite web browser and you should see the YetiForce CRM install screen. On this page you’ll need to enter the database details you created earlier, YetiForce CRM admin details and finally click on the Install button.

That’s it. You have successfully installed YetiForce CRM on your Ubuntu 16.04 VPS. For more information about how to manage your YetiForce CRM installation, please refer to the official YetiForce CRM documentation.


Of course you don’t have to do any of this if you use one of our Managed Ubuntu VPS Hosting services, in which case you can simply ask our expert Linux admins to setup this for you. They are available 24×7 and will take care of your request immediately. You can also read our guide on How to Install YetiForce on Ubuntu 18.04.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

1 thought on “Install YetiForce CRM on Ubuntu 16.04”

  1. I had to replace:

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

    With:

    location / {
    index index.php index.html index.htm;
    try_files $uri $uri/ =404;
    }

    Otherwise index.php wouldn’t load without being typed at the end of the url.

    Reply

Leave a Comment