Introduction
SuiteCRM is a free and open-source Customer Relationship Management (CRM) software. It gives the users a detailed summary of their customers in different aspects to help them manage marketing, sales, and so on. It's a fork of SugarCRM software because they stopped releasing its open-source community edition. It's user-friendly and suitable for both small and big businesses. Some notable features are file storage support, internal chat integration, marketing automation, social media integration, access on different devices, plugins support for extended functionality, integration with third-party apps like Gmail, multiple user accounts and roles, and so on. This article explains how to install SuiteCRM on FreeBSD 13.
Prerequisites
Perform the following steps first:
- Deploy a Rcs FreeBSD 13.0 Server.
- SSH into the server you deployed.
- Create a non-root user with sudo access.
Step 1. Install Required Packages
Update the system package list.
$ pkg updateInstall required packages.
$ pkg install -y sudo nano unzip wget bashInstall PHP 7.4, Apache, MySQL, and more modules.
$ sudo pkg install -y apache24 mysql80-server mod_php74 php74 php74-session php74-curl php74-xml php74-zip php74-mbstring php74-ctype php74-imap php74-simplexml php74-tokenizer php74-xmlreader php74-xmlwriter php74-pear php74-fileinfo php74-json php74-phar php74-exif php74-iconv php74-mysqli php74-pdo_mysql php74-dom php74-filter php74-intl php74-openssl php74-intl php74-opcache php74-gdEnable PHP-FPM service.
$ sudo sysrc php_fpm_enable=yesStart PHP-FPM service.
$ sudo service php-fpm startCopy the sample PHP configuration file.
$ sudo cp /usr/local/etc/php.ini-production /usr/local/etc/php.iniEdit the PHP configuration file.
$ sudo nano /usr/local/etc/php.iniFind the following lines and change the values like below. Finally, save and close the file.
upload_max_filesize = 100M
post_max_size = 100MRestart Apache service.
$ sudo service apache24 restartStep 2. Create SuiteCRM Database
Enable MySQL service to start on system boot.
$ sudo sysrc mysql_enable="yes"Start MySQL service.
$ sudo service mysql-server startLog in to MySQL shell. Then, at the password prompt, just press Enter to continue.
$ sudo mysql -u root -pSecure the MySQL root user by changing the password. Change the value of StrongPassword with your own secure password.
ALTER USER 'root'@'localhost' IDENTIFIED BY 'StrongPassword';Create a database named suitecrm.
CREATE DATABASE suitecrm;Create a database user suitecrmuser with a password MySecurePassword. Change the value of MySecurePassword to your own secure password.
CREATE USER 'suitecrmuser'@'localhost' IDENTIFIED WITH mysql_native_password BY 'MySecurePassword';Grant the database user full access to the database.
GRANT ALL ON suitecrm.* TO 'suitecrmuser'@'localhost' WITH GRANT OPTION;Save all the changes to take effect.
FLUSH PRIVILEGES;Exit MySQL shell.
exit;Step 3. Install SuiteCRM
Download the latest version of SuiteCRM. To find the latest version, please visit the official releases page.
$ wget https://suitecrm.com/files/147/SuiteCRM-7.12/609/SuiteCRM-7.12.4.zipExtract the downloaded archive.
$ sudo unzip SuiteCRM-7.12.4.zipRename the extracted archive directory.
$ sudo mv SuiteCRM-7.12.4 suitecrmMove the renamed directory into the document root.
$ sudo mv suitecrm /usr/local/www/apache24/data/Remove the downloaded archive.
$ sudo rm SuiteCRM-7.12.4.zipSet the ownership of the directory to the web-root user and group.
$ sudo chown -R www:www /usr/local/www/apache24/data/suitecrm/Change the access permissions.
$ sudo chmod -R 755 /usr/local/www/apache24/data/suitecrm/Step 4. Configure Apache2
Enable Apache service to start on system boot.
$ sudo sysrc apache24_enable=yesStart Apache service.
$ sudo service apache24 startCreate a configuration file to allow Apache to work with PHP.
$ sudo nano /usr/local/etc/apache24/modules.d/001_mod-php.confAdd the following lines of code to the file. Then, save and close the file.
<IfModule dir_module>
DirectoryIndex index.php index.html
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
</IfModule>Create Apache configuration file suitecrm.conf for SuiteCRM.
$ sudo nano /usr/local/etc/apache24/Includes/suitecrm.confAdd the below code to the file. Save and close the file.
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /usr/local/www/apache24/data/suitecrm
ServerName example.com
<Directory /usr/local/www/apache24/data/suitecrm/>
Options -Indexes +FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>Test the configuration.
$ sudo apachectl configtestEnable mod_rewrite by editing the apache configuration file.
$ sudo nano /usr/local/etc/apache24/httpd.confComment out the following line. Save and close the file:
LoadModule rewrite_module libexec/apache24/mod_rewrite.soRestart Apache service.
$ sudo service apache24 restartStep 5. Access SuiteCRM
To access the SuiteCRM Web Interface, go to your browser and visit http://Server_IP/. For example:
http://192.0.2.11/After the installation process is competed, set up Cron for the web user to run SuiteCRM Schedulers.
$ sudo EDITOR=nano crontab -e -u wwwAdd the following line to the file:
* * * * * cd /usr/local/www/apache24/data/suitecrm; php -f cron.php > /dev/null 2>&1Conclusion
You have installed SuiteCRM on your FreeBSD 13.0 server. Continue with the installation process, set up the database, and create an administrator account. You can now check the official documentation to learn more about using SuiteCRM.