Skip to main content
  1. Posts/

Install SuiteCRM

··230 words·2 mins·
Install SuiteCRM

Requirements #

apt install apache2 python3-certbot-apache php-fpm mariadb-server unzip php-curl php-mysql php-xml php-gd php-json php-mbstring php-soap php-xml php-zip php-imap php-ldap php-intl

SuiteCRM #

Download the files from Github:

wget 'https://github.com/salesagility/SuiteCRM-Core/releases/download/v8.8.0/SuiteCRM-8.8.0.zip'

Create the folder for the files:

mkdir /var/www/crm.example.com

Unzip the files into that directory:

unzip -d /var/www/crm.example.com SuiteCRM-8.8.0.zip

Set permissions:

find /var/www/crm.example.com -type d -not -perm 2755 -exec chmod 2755 {} \;
find /var/www/crm.example.com -type f -not -perm 0644 -exec chmod 0644 {} \;
find /var/www/crm.example.com ! -user www-data -exec chown www-data:www-data {} \;
chmod +x /var/www/crm.example.com/bin/console

PHP-PM #

Edit php.ini:

nano /etc/php/8.2/fpm/php.ini
...
memory_limit = 256M
...
upload_max_filesize = 100M
...

MariaDB #

mysql
CREATE DATABASE suitecrm;
CREATE USER 'suitecrm'@'localhost' IDENTIFIED BY 'PASSWORD';
GRANT ALL PRIVILEGES ON suitecrm.* TO 'suitecrm'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Lets Encrypt #

Obtain SSL certiicate with Certbot:

certbot certonly --apache -d crm.example.com --key-type rsa --rsa-key-size 4096

Apache #

Create the site config:

nano /etc/apache2/sites-available/crm.example.com.conf
<VirtualHost *:443>
        ServerName crm.example.com

        Protocols h2 http/1.1

        SSLCertificateFile /etc/letsencrypt/live/crm.example.com/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/crm.example.com/privkey.pem
        Include /etc/letsencrypt/options-ssl-apache.conf

        DocumentRoot /var/www/crm.example.com/public

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        <Directory />
                Options FollowSymLinks
                AllowOverride All
        </Directory>

        <Directory /var/www/crm.example.com/public>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Require all granted
                Order allow,deny
                allow from all
        </Directory>
        Timeout 600
        Include /etc/apache2/conf-available/php8.2-fpm.conf

</VirtualHost>

<VirtualHost *:80>

        ServerName crm.example.com

        RewriteEngine On
        RewriteCond %{HTTPS} off
        RewriteRule ^(.*)$ https://crm.example.com$1 [L,R=301]
</VirtualHost>

Enable required modules:

a2enmod ssl rewrite proxy proxy_fcgi

Enable required configs:

a2enconf php8.2-fpm

Enable site config:

a2ensite crm.example.com.conf

Restart apache2:

systemctl restart apache2