Successful Install Suitecrm8 onto Linux Mint Script

Hope this helps…
Note: I am not an expert. This script was developed by trial and error. Mostly error. However, it works on my machine.
Note: I am using Linux Mint. The php version installed was 7.4
Note: I needed to install Suitecrm in the html directory as it didn’t work in the www directory. I dont know why.
Note: The directory for vhost is /etc/apache2/sites-enabled/suitecrm.conf This is quite different than a lot of guides.
Note: I used separate command lines to make is easier to find issues.
Note: I restart Apache after every change to php.ini and vhost files. I keep a separate terminal window open just for this.
Note: In php.ini I tried to edit cookie lifetimes to solve the being logged out problem, but eventually those changes bit me.
Note: I did not create a new root password for mariadb and it was assigned the linux Mint root (log in password.) I’m a single user so its not an issue.

–Update packages: --Install mariadb,apache and PHP modules.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install apache2 apache2-utils libapache2-mod-php libpcre3 libpcre3-dev zlib1g zlib1g-dev mariadb-server unzip
sudo apt-get install php
sudo apt-get install php-cli
sudo apt-get install php-curl
sudo apt-get install php-common <–already the newest…MX Linux…Linux Mint
sudo apt-get install php-intl
sudo apt-get install php-json
sudo apt-get install php-gd
sudo apt-get install php-mbstring
sudo apt-get install php-mysqli
sudo apt-get install php-pdo_mysql <–unable to locate package…MX Linux…Linux Mint
sudo apt-get install php-openssl <–unable to locate package…MX Linux…Linux Mint
sudo apt-get install php-soap
sudo apt-get install php-xml
sudo apt-get install php-zip
sudo apt-get install php-imap
sudo apt-get install php-ldap
sudo apt-get install php-mysqli <—Already installed …Linux Mint
sudo apt-get install php-pdo_mysql <— Unable to locate package…Linux Mint

–Start the Apache service and enable Apache and MariaDB to enable on system start

sudo systemctl start apache2 <—MX Linux won’t start apache unless Systemd is enabled at boot
sudo systemctl start mysql
sudo systemctl enable apache2
sudo systemctl enable mariadb

–Edit php.ini located at /etc/php/7.4/apache2/php.ini

upload_max_filesize = 8M             <--Note this must be > 6M  as 6M gives error.
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE & ~E_WARNING                 <-Line 110

–Secure and harden MariaDB.

sudo mysql_secure_installation

–Create database

sudo mysql -u root -p
MariaDB [(none)]> CREATE DATABASE suitecrm;
MariaDB [(none)]> CREATE USER ‘larry’@‘localhost’ IDENTIFIED BY ‘secretpassword’;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON suitecrm.* TO ‘larry’@‘localhost’;
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> exit;

–Restart Apache

sudo systemctl restart apache2

--------------------------- this block is for Suitecrm7 install ------------------------------------
–Download the latest SuiteCRM files
Create a directory here /var/www/html/suitecrm

– Unzip the downloaded file into the suitecrm directory
– Open a root terminal in the suitecrm directory
– Assign appropriate permission to the unzipped folder

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

–Open your internet browser and enter URL:

http://localhost/suitecrm/install.php

–complete installation

-------------------------------end Suitecrm7 install -----------------------

-----------------------------this block is for Suitecrm8 install ----------------------------

–Create suitecrm folder located at /var/www/html/suitecrm

–Download and unzip Suitecrm8 into the suitecrm folder var/www/html/crm/suitecrm
–Open a root terminal from suitecrm folder. Set permissions for crm folder and all sub folders.

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

–Configure URL re-writes. (Specific to Linux Mint, Possibly Debian and Ubuntu )

–create this document. /etc/apache2/sites-enabled/suitecrm.conf

–insert following

DocumentRoot /var/www/html/suitecrm/public
<Directory /var/www/html/suitecrm/public>
AllowOverride All
Order Allow,Deny
Allow from All
Require all granted

–enable rewrites and restart apache. Typos in suitecrm.conf will result in errors in restarting apache.

sudo a2enmod rewrite
sudo systemctl restart apache2

–To start install, enter this address into browser. Note that a bug in suitecrm8 will create a formatting error in public/legacy/.htaccess.

localhost/suitecrm/public

–Accept License, then click on configuration,

–Fill in the form with


URL = https://localhost/suitecrm ← This one worked. Note. different URLs may cause different errors elsewhere.

DataBase User = larry ← I had to reinstall larry as a user using the admin account.
Password = secret password
Host name = 127.0.0.1 <–Use of name localhost is not supported yet
Database Name = suitecrm
DataBasePort = 3306 ← This is default for mariadb and mysql

Application Admin Name = admin
Admin User password = secret password <Is not entered twice, so susceptible to error.


–Edit /var/www/html/suitecrm/public/legacy
–Correct formatting error caused by wrong pathing in the .htaccess under rtewrite rules. Thank you to Maintainers Mac-Rae for identifying these.
–Look for these two lines

RewriteEngine On
RewriteBase /crm/SuiteCRM-8.0.1legacy/ <------- This line is malformed.

– edit second (malformed) line to

RewriteBase /suitecrm/public/legacy/

–and save.

–Logon using browser.

http://localhost/suitecrm/public/#/home < Note. Login using my database user name “larry” does not work. Login using name admin" does work.

http://127.0.0.1/suitecrm/public/#/Login


1 Like

Thanks for this.

Since you mention “hardening” security, a simple improvement you can make is use “0” world permissions:

find . -type d -not -perm 2750 -exec chmod 2750 {} ;
find . -type f -not -perm 0640 -exec chmod 0640 {} ;

This won’t make any difference for you, since the ownerships are correct (www-data). But it will keep other users from having the unneeded access.

Another note: I never create the database manually. I always let the installer do that. For some reason (mysterious to me) there are tons of instructions out there on the Internet recommending manual creation, but I never understood why…

Hi @larry,

Thank you for sharing!