How to install the SuiteCRM client resource manager on the Ubuntu server


If your business needs a client resource management platform, Jack Wallen has an open source solution that just might do the trick. Here it will guide you through the installation of SuiteCRM.

Image: Jirsak, Getty Images / iStockphoto

As your business grows, you will likely need to manage the customer relationship. With such a platform available to your business, your staff can better manage their customers, clients, opportunities, prospects, and more.

SEE: Checklist: How to Manage Your Backups (TechRepublic Premium)

What you will need

You might be thinking, “Why don’t you just go for a paid service for this?” If your budget is tight, you should consider deploying such a service yourself. Not only will it save you money, but it will also keep all your important data internally. In this day of constant security breaches, having this data within the confines of your data center can be a must-have security blanket (as long as your network is secure).

I’ll walk you through the process of installing the open source SuiteCRM platform, which focuses on sales, marketing, and service administration.

The only things you need for this to work are a running instance of Ubuntu Server and a user with sudo privileges. With these things in hand, let’s get to work.

How to install NGINX and MariaDB

We will be using NGINX and MariaDB as web and database servers. To install these items, log into your Ubuntu server and run the command:

sudo apt install nginx mariadb-server -y

Once these two elements are installed, start and activate the services with:

sudo systemctl start nginx
sudo systemctl start mariadb
sudo systemctl enable nginx
sudo systemctl enable mariadb

Give the MariaDB root user a password with the command:

sudo mysql_secure_installation

Make sure to use a secure / unique password, and then answer the remaining questions there. Finally, install the necessary dependencies with:

sudo apt install php-imagick php7.4-fpm php7.4-mysql php7.4-common php7.4-gd php7.4-imap php7.4-json php7.4-curl php7.4-zip php7.4-xml php7.4-mbstring php7.4-bz2 php7.4-intl php7.4-gmp -y

How to create the database

Next, we will create the database. Log in to the MariaDB console with:

sudo mysql -u root

Create the database with:

CREATE DATABASE suitecrm;

Create the suitecrm database user with:

GRANT ALL ON suitecrm.* TO 'suitecrm'@'localhost' IDENTIFIED BY 'PASSWORD';

Where PASSWORD is a strong / unique password.

Dump the privileges and exit the console with:

FLUSH PRIVILEGES;
exit

How to download and unzip SuiteCRM

The next step is to download and unzip the latest version of SuiteCRM. Download the file with:

wget https://suitecrm.com/files/147/SuiteCRM-8.0/589/SuiteCRM-8.0.0.zip

Unzip the file with:

sudo unzip SuiteCRM-8.0.0.zip -d /var/www/

Rename the newly created directory with:

sudo mv /var/www/SuiteCRM-8.0.0/ /var/www/suitecrm

Give the new directory the appropriate ownership and permissions with:

sudo chown -R www-data:www-data /var/www/suitecrm/
sudo chmod -R 755 /var/www/suitecrm/

How to configure PHP and NGINX

The first thing we need to do is change the maximum PHP upload file size from 2MB to 20MB. Open the file needed for editing with:

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

In this file, modify the line:

upload_max_filesize = 2M

at

upload_max_filesize = 20M

Restart PHP-FM and NGINX with the commands:

sudo systemctl restart php7.4-fpm
sudo sytemctl restart nginx

Create an NGINX configuration file with:

sudo nano /etc/nginx/conf.d/suitecrm.conf

In this file, paste the following (by changing the deposited server_name by the IP address of your hosting server):

server {
    listen 80;
    listen [::]:80;
    server_name 192.0.2.11;
    root /var/www/suitecrm;
    error_log /var/log/nginx/suitecrm.error;
    access_log /var/log/nginx/suitecrm.access;
    client_max_body_size 20M;
    index index.php index.html index.htm index.nginx-debian.html;
    location / {

        # try to serve file directly, fallback to app.php
        try_files $uri /index.php$is_args$args;
    }

    location ~ .php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php7.4-fpm.sock;

        #Note: If you install SuiteCRM on iRedMail server, you should use the TCP socket instead.
        #fastcgi_pass 127.0.0.1:9999
    }

    location ~* ^/index.php {
        # try_files $uri =404;
        fastcgi_split_path_info ^(.+.php)(/.+)$;

        # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;

        #Note: If you install SuiteCRM on iRedMail server, you should use the TCP socket instead.
        #fastcgi_pass 127.0.0.1:9999
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
        fastcgi_buffer_size 128k;
        fastcgi_buffers 256 16k;
        fastcgi_busy_buffers_size 256k;
        fastcgi_temp_file_write_size 256k;
    }

    # Don't log favicon
    location = /favicon.ico {
        log_not_found off;
        access_log off;
    }

    # Don't log robots
    location = /robots.txt  {
        access_log off;
        log_not_found off;
    }

    # Deny all attempts to access hidden files/folders such as .htaccess, .htpasswd, .DS_Store (Mac), etc...
    location ~ /. {
        deny all;
        access_log off;
        log_not_found off;
    }
}

Top up NGINX with:

sudo systemctl reload nginx

How to access the SuiteCRM web installer

Open a web browser and point it to http: //SERVER/install.php (where SERVER is the IP address or domain of your hosting server). You will be greeted with a license agreement window. Accept the license and click Next. Click Next in the resulting window (everything should be checked with the installation), and you will be greeted by the database setup window (Figure A).

Figure A

suitecrma.jpg

Make sure you fill in all the necessary information, including the Admin user bits.

One thing to note in the database configuration section: you will need to change the IP address of the hosting database server to localhost. The rest of the information will come from the configuration we created in the MariaDB Console.

When you are finished filling out the information, click Next. Once the installation is complete, you will be greeted by the login screen, where you can log in with your new administrator user.

There you go, you now have a working instance of SuiteCRM to use. Take the time to customize the platform for your business and you are good to go.

Subscribe to How to Make TechRepublic Technology Work on YouTube for all the latest tech tips for professionals at Jack Wallen’s business.

Also look


Comments are closed.