Looking to install SuiteCRM on your machine running Rocky Linux?
If you’re new to Rocky Linux 9, you might find installing and setting up SuiteCRM intimidating because of the complexity involved with the various commands.
But worry not, as we’ve got you covered.
In this post, we will guide you step-by-step on installing SuiteCRM on Rocky Linux 9 painlessly.
Let’s dive right in!
What You’ll Need
For a seamless installation and setup of SuiteCRM, it is important to have the prerequisites below.
- A working Rocky Linux 9 system (guide)
- A non-root user with sudo privileges (guide)
- A Fully Qualified Domain Name (FQDN)
You’re ready to proceed further if you have all the above prerequisites.
How to Install SuiteCRM on Rocky Linux 9: Step-by-Step
Step 1: Getting your device ready
These are the basic ones, but perform the following steps before you proceed with the installation.
- By entering the following command, ensure that everything is updated and your device is ready for the SuiteCRM installation:
sudo dnf update
- After everything is updated, install a few packages that will assist the installation using the following command:
sudo dnf install wget curl nano unzip yum-utils policycoreutils-python-utils -y
Step 2: Configure the Firewall
For the proper functioning of SuiteCRM, it is important to get the firewall of Rocky Linux 9 ready. Here are steps on how to do so.
- Start by verifying if the firewall is running using the following command. Ensure that it is running.
sudo firewall-cmd –state
- If the firewall is running, verify which services and ports are active on the firewall using the following command:
sudo firewall-cmd --permanent --list-services

- You can see that the “http” and “https” ports are already functioning and are enabled. If this isn’t the case, enter the following commands on the terminal:
sudo firewall-cmd --permanent --add-service=http sudo firewall-cmd --permanent --add-service=https
- Once added, reload the firewall for the changes to apply using the following command:
sudo firewall-cmd –reload
You have successfully configured the default Firewalld Firewall. Make sure that you verify both http and https ports are active on the firewall before proceeding.
Step 3: Install NGINX
SuiteCRM makes use of Nginx for URL redirects. Hence, ensure that Nginx is installed on your device. If it isn’t installed, follow the below steps.
- The first thing that you need to do is create a repo file for Nginx. Enter the following command to get it done:
sudo nano /etc/yum.repos.d/nginx.repo
- After the empty nano file is open, type in the below text and save it by pressing the Ctrl + X keys and entering ‘Y’ when prompted.
[nginx-stable] name=nginx stable repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=1 enabled=1 gpgkey=https://nginx.org/keys/nginx_signing.key module_hotfixes=true [nginx-mainline] name=nginx mainline repo baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/ gpgcheck=1 enabled=0 gpgkey=https://nginx.org/keys/nginx_signing.key module_hotfixes=true
- After saving the repo file, you can proceed with the Nginx installation server using the following command:
sudo dnf install -y nginx

- After the installation, verify it is done properly using the following command:
nginx -v

- Now that you have successfully installed the Nginx server, you can proceed further by enabling it using the following command:
sudo systemctl enable nginx –now
- After you have enabled the NGINX server, check its status using the following command:
sudo systemctl status nginx

The output indicates that the Nginx service is active and running. If you have encountered an error or find that the server is not running, do not proceed further and repeat Step 2.
Step 4: Install PHP and its Extensions
For SuiteCRM to operate seamlessly, it’s crucial to have PHP 8.1 installed for proper interaction with databases. Here are steps on how to do so:
- Before working on PHP, you need to get the Epel repository, as it is required for PHP. Use the command below to achieve this:
sudo dnf install epel-release –y

- Once you have the Epel repository, install the Remi repository using the following command:
sudo dnf install https://rpms.remirepo.net/enterprise/remi-release-9.rpm

- Now, use the following command to check for the available PHP streams:
dnf module list php –y

- The default PHP version you’ll need is 8.1. Enable Remi’s PHP 8.1 repository using the following commands to set this up:
sudo dnf module reset php –y sudo dnf module enable php:remi-8.1
- As we aim for the seamless installation of SuiteCRM, ensure you download PHP and its extensions with the command below:
sudo dnf install -y php-fpm php-mysql php-bcmath php-xml php-zip php-curl php-mbstring php-gd php-tidy php-intl php-cli php-opcache php-soap php-imap php-ldap

- After installing PHP and its extensions, verifying the Installation using the below command is important:
php --version

- Lastly, ensure the PHP-FPM service is enabled and started with the following command:
sudo systemctl enable php-fpm –now
With these steps, you have successfully installed PHP and its extensions. In the next section, we will proceed to install MySQL, which is also required for SuiteCRM.
Also read: How to Install PHP 8.2 on Debian 11
Step 5: Install MySQL
Unlike PHP and NGINX, installing MySQL is easy on Rocky Linux 9. Here are steps on how to do so.
- Open your terminal and enter the following command to install MySQL:
sudo dnf install mysql-server

- After installing MySQL, verify its version to ensure it is properly installed using the following command:
mysql --version

- If the version is displayed, it ensures that it is properly installed. Now enable and start the MySQL service using the following command:
sudo systemctl enable mysqld –now
- After MySQL has started, run the MySQL secure install script using the following command:
sudo mysql_secure_installation

- While securing the MySQL server deployment, you will be to install the Validate Password Component, which you must enter ‘Y‘ when prompted. Also, set the level of the password validation policy to 2, as it is the strongest.
- When asked to set a new root password, enter it according to the requirements and enter ‘Y‘ to choose it as the root password.

- The final things that must be addressed are to remove anonymous users, disallow remote root logins, remove the test database, and reload the privilege tables. For those to happen, enter ‘Y‘ once again when prompted, as shown in the screenshot below:

Installing MySQL wouldn’t be enough, you have to configure it, which we will do in the next section.
Step 6: Configure MySQL
Configuring MySQL involves creating a user and providing certain privileges. We will guide you with this below:
- Open a new terminal and log in to the MySQL shell using the following command. Enter the root password created before when prompted:
sudo mysql -u root –p

- After you’re in, create a sample database using the following command:
CREATE DATABASE suitecrm;

- Use the following command to create an SQL user account and replace the ‘your_password_here’ with your own:
CREATE USER 'suiteuser'@'localhost' IDENTIFIED BY 'your_password_here';

- After the user is created, ensure all privileges are granted on the database to the user:
GRANT ALL PRIVILEGES ON suitecrm.* TO 'suiteuser'@'localhost';

- Once the privileges are provided, flush user privileges and exit the shell using the two commands below:
FLUSH PRIVILEGES; exit
Step 7: Install SSL
For the seamless operation of SuiteCRM, it’s crucial to have a secure SSL certificate, as it enhances privacy and security.
- To generate the SSL certificate, we’ll be using Certbot. Enter the following command:
sudo snap install --classic certbot

- Rocky Linux doesn’t come with Snapd, which is used to manage and maintain installed snaps (packages). However, don’t worry, as we’ve already set up the EPEL repository for PHP; we can directly install Snapd using the following command:
sudo dnf install -y snapd

- Once Snapd is installed, enable and start its service using the following command:
sudo systemctl enable snapd --now
- Ensure your Snapd version is the latest by installing and refreshing the core package using the following command:
sudo snap install core && sudo snap refresh core

- For the Snapd to function correctly, create the necessary links using the commands below:
sudo ln -s /var/lib/snapd/snap /snap echo 'export PATH=$PATH:/var/lib/snapd/snap/bin' | sudo tee -a /etc/profile.d/snapd.sh
- To make the Certbot command accessible, create a symbolic link to the /usr/bin directory using the following command:
sudo ln -s /snap/bin/certbot /usr/bin/certbot
- After linking the certbot, check if Certbot was installed correctly using the following command:
certbot --version

- After displaying the certbot version, use the following command to obtain an SSL Certificate:
sudo certbot certonly --nginx --agree-tos --no-eff-email --staple-ocsp --preferred-challenges http -m [email protected] -d suitecrm.example.com
- After the SSL certificate is generated successfully at the /etc/letsencrypt/live/suitecrm.example.com directory, create a Diffie-Hellman Group Certificate using the following command:
sudo openssl dhparam -dsaparam -out /etc/ssl/certs/dhparam.pem 4096
- Now, inspect the Certbot renewal scheduler service using the following command. Among the services listed, you should see “snap.certbot.renew.service” as it is responsible for handling the certificates.
sudo systemctl list-timers

- The final step is to conduct a dry run using the following command to ensure the SSL renewal process works flawlessly:
sudo certbot renew --dry-run
If you find no errors, your certificate will renew on its own. You’re now ready to download SuiteCRM, which the next section will go over.
Step 8: Download SuiteCRM
Setting up the web root directory and downloading the necessary files is essential, as it can be used to store website files efficiently. Here are steps on how to do so.
- Using the following command, create the directory where SuiteCRM will reside:
sudo mkdir /var/www/html/suitecrm –p
- Once the directory is created, switch to it using the following command:
cd /var/www/html/suitecrm
- It’s crucial to have the latest version of SuiteCRM. Fetch the latest version link from the SuiteCRM downloads page and use the command below to download it:
sudo wget https://suitecrm.com/download/140/suite83/562304/suitecrm-8-3-0.zip

- After downloading, use the following command to extract the files from the archive:
sudo unzip -q suitecrm*.*
- Removing the zip file using the following command after extraction is a good practice to maintain a neat directory:
sudo rm suitecrm-8-3-0.zip
- For SuiteCRM to work properly, setting the right file permissions and ensuring the Nginx user has the correct ownership is important. Additionally, ensure the “bin/console” file is executable for running the SuiteCRM console. Execute the following commands in sequence as written below:
sudo find . -type d -not -perm 2755 -exec chmod 2755 {} \; sudo find . -type f -not -perm 0644 -exec chmod 0644 {} \; sudo find . ! -user nginx -exec chown nginx:nginx {} \; sudo chmod +x bin/console
With these steps completed, you’ve successfully set up the environment for SuiteCRM. Make sure that the commands above execute without any errors. If no errors persist, continue to the next section.
Step 9: Configure SELinux
It’s crucial to set up SELinux correctly, as it acts as a protective agent on servers, which is extremely useful while using SuiteCRM. Here are steps on how to configure SELinux.
- Begin by adjusting and setting the File Security Context for SuiteCRM using the following command:
sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/suitecrm(/.*)?"
- Once the context is set, apply the policy using the following command to ensure it takes effect:
sudo restorecon -Rv /var/www/html/suitecrm/
- It’s essential for Nginx to communicate with MySQL. To allow this, apply the policy using the command below:
sudo setsebool -P httpd_can_network_connect_db 1
- SuiteCRM might need to connect to external hosts, especially for functionalities like sending emails. To ensure this, apply the following policy:
sudo setsebool -P httpd_can_network_connect 1
You’ve successfully configured SELinux for SuiteCRM on Rocky Linux 9 with these steps. Ensure all policies are applied correctly before proceeding with NGINX and PHP configurations.
Step 10: Configure NGINX and PHP
1. Configure PHP
For the optimal performance of SuiteCRM on Rocky Linux 9, it’s crucial to configure PHP settings appropriately. Here are steps on how to do so.
- Start by opening the PHP configuration file using the command. In this file, you must set the Unix user/group for PHP processes to NGINX. Locate the lines “user=www-data and group=www-data” and replace them with “user=nginx and group=nginx.”
sudo nano /etc/php-fpm.d/www.conf
- In the same file, uncomment and modify the relevant lines as shown. Additionally, comment out the line “listen.acl_users = apache,nginx” by placing a semi-colon at its beginning and save your changes by pressing Ctrl + X and then confirming with ‘Y.’
listen.owner = nginx listen.group = nginx listen.mode = 0660
- To ensure smooth operations, increase the execution time for both PHP-FPM and PHP-CLI to 60 seconds using the following command:
sudo sed -i 's/max_execution_time = 30/max_execution_time = 60/' /etc/php.ini
- Elevate the memory limit for PHP-FPM from 128 MB to 256 MB using the following command for better performance.
sudo sed -i 's/memory_limit = 128M/memory_limit = 256M/' /etc/php.ini
- By default, PHP restricts the file size limit for the media library to 2MB. To enhance this limit to 25MB, execute the following commands:
sudo sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 25M/g' /etc/php.ini sudo sed -i 's/post_max_size = 8M/post_max_size = 25M/g' /etc/php.ini
- For the changes to apply, restart the PHP-FPM service using the following command:
sudo systemctl restart php-fpm
- Lastly, modify the group of the PHP sessions directory to nginx for better compatibility using the following command:
sudo chgrp -R nginx /var/lib/php/session
These configuration changes makes PHP optimally configured for SuiteCRM on Rocky Linux 9. Now, work on the NGINX configuration using the steps below.
2. Configure NGINX
- Begin by creating and opening the configuration file for SuiteCRM using the command.
sudo nano /etc/nginx/conf.d/suitecrm.conf
- Now, open the link provided, copy the file’s contents, and paste it into the “suitecrm.conf” file. Once done, save the file by pressing the Ctrl + X keys and entering ‘Y‘ when prompted once finished.
- Open the main Nginx configuration file with the following command:
sudo nano /etc/nginx/nginx.conf
- In the nginx.conf file opened, before the line “include /etc/nginx/conf.d/*.conf;” add the specified line – “server_names_hash_bucket_size 64;” to ensure the server names are correctly hashed. When done, save the file by pressing the Ctrl + X keys and entering ‘Y‘ when prompted once finished.
- It is common to make mistakes while dealing with the config files. Hence, it’s always a good practice to check if the configuration syntax is correct using the following command:
sudo nginx –t

The output indicates that the Nginx configuration file’s syntax is correct, and the test was successful. Now restart the NGINX server using the command – sudo systemctl restart nginx and proceed with the SuiteCRM installation.
Step 11: Install SuiteCRM
After installing and configuring the multiple software and tools which we’ve discussed above, we are at the final step: installing SuiteCRM.
Here are steps on how to install SuiteCRM through the web browser.
- Open your web browser and navigate to the below URL, which opens the SuiteCRM setup:
https://suitecrm.example.com/

- Ensure you fill in all the details; most importantly, enter “localhost” as the hostname and 3306 as the database port. Click the PROCEED button for the installation to begin.
- Once the installation is done, you’re redirected to the login screen, enter your account details, and you’re done.

Note: The installations and configurations performed throughout the article act as a foundation for the functioning of SuiteCRM. We end the article here, but you can proceed to explore with all the below operations.

Conclusion
Congratulations on installing SuiteCRM on Rocky Linux 9!
While the installation process is extremely lengthy, we broke it down into easy-to-understand steps. Ensure you don’t skip any step and address any error immediately by repeating the steps or troubleshooting as necessary..
If you’re stuck with any step or the tool isn’t working as expected, you may reach out to the SuiteCRM Forums or Rocky Linux forum for better assistance.