I have successfully installed SuiteCRM 8.1.2 on Fedora 35. These instructions should work similarly on later versions. This worked in my particular environment; yours may differ.
This assumes you have a server with Fedora already installed, and you have full access to it. Run all commands as root or using sudo.
- Configure a database. I’ll use MariaDB on the same server in this example, but of course you can do things differently.
- dnf install mariadb-server mariadb
- systemctl enable --now mariadb.service
- mysql_secure_installation
- (replace put-database-name-here, put-username-here and put-password-here!)
echo "
CREATE DATABASE put-database-name-here;
CREATE USER put-username-here@localhost IDENTIFIED BY 'put-password-here';
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, INDEX, DROP, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES
ON put-database-name-here.* TO 'put-username-here'@'localhost';
" | mysql
- Configure PHP. The stock PHP packages provided with Fedora do not have IMAP support, so I use the Remi repository. As of this writing, SuiteCRM has some issues running under PHP 8, so I use PHP 7.
- dnf install https://rpms.remirepo.net/fedora/remi-release-$(rpm -E %fedora).rpm
- dnf module reset php -y
- dnf module install php:remi-7.4
- dnf install ImageMagick pcre php-fpm php-gd php-imap php-intl php-mbstring php-mysqlnd php-pear-Net-Curl php-pecl-zip php-soap php-xml
- Configure a web server. I’ll use Apache HTTP Server in this example.
- dnf install httpd mod_ssl php memcached
- firewall-cmd --zone=public --add-service=http --permanent
- firewall-cmd --zone=public --add-service=https --permanent
- firewall-cmd --reload
- setsebool -P httpd_can_network_memcache 1
- systemctl enable --now httpd.service php-fpm.service memcached.service
- Choose the website to run SuiteCRM. I recommend a separate website (a subdomain). If you want to run it securely, get an SSL certificate for it (Let’s Encrypt is a great way to do so). Create a basic configuration for it (the SuiteCRM documentation gives examples). Here’s an example (replace the website name and document root path):
<VirtualHost *:80>
ServerName subdomain.example.com
RewriteEngine on
RewriteCond %{SERVER_NAME} =subdomain.example.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<VirtualHost *:443>
SSLEngine on
RewriteEngine on
ServerName subdomain.example.com
DocumentRoot /PATH/TO/DEPLOYMENT/public
# Remove extra slashes at start of URL
RewriteCond %{THE_REQUEST} //+
RewriteRule (.*) $1 [R,L]
<Directory /PATH/TO/DEPLOYMENT/public>
AllowOverride All
Options FollowSymLinks
Require all granted
DirectoryIndex index.html index.php
</Directory>
# Add SSL certificate information here
</VirtualHost>
-
Download the latest version ZIP archive from Download - SuiteCRM and unzip it into /PATH/TO/DEPLOYMENT.
-
From that directory, update permissions:
- find . -type f -exec chmod 0644 {} ;
- find . -type d -exec chmod 2755 {} ;
- chmod a+x bin/console
- chown -R root:apache .
- chown -R apache:apache cache logs public
- chmod -R g+w public/legacy/modules
- find cache logs public -type f -exec chmod 0664 {} ;
- find cache logs public -type d -exec chmod 2775 {} ;
- If your deployment is not in the standard location, you will need additional SELinux configuration (it should be possible to narrow this down more, but it’s nontrivial):
- semanage fcontext -a -t httpd_sys_rw_content_t “/PATH/TO/DEPLOYMENT(/.*)?”
- Make the configuration take effect:
- restorecon -R -v /PATH/TO/DEPLOYMENT
- systemctl reload httpd
-
Configure SuiteCRM. Go to your new site (https://subdomain.example.com/) and follow the prompts. Use “localhost” as the database server and leave port blank. You may need to press Proceed more than once. If you have problems, check SELinux denials, the Apache logs, the PHP-FPM logs, and /PATH/TO/DEPLOYMENT/logs/install.log, and see the SuiteCRM install documentation.
-
Configure SuiteCRM settings. Log in to the site as the admin user you created in the previous step. Choose the Admin menu item, and under Email Settings, configure your email server (if you’re using postfix locally, you can use “localhost” and port 25 with no authentication), then select the button to send a test.
-
Schedule the SuiteCRM scheduler job.
- Edit /PATH/TO/DEPLOYMENT/public/legacy/config.php and change “allowed_cron_users” to contain “apache”.
- While you can install a cron daemon and run a cron job, Fedora uses systemd timers natively, which work fine (this sets it to run every minute, you can use whatever schedule you prefer):
cat >/etc/systemd/system/suitecrm.service <<EOF
[Unit]
Description=Run SuiteCRM Scheduler
After=php-fpm.service
Wants=suitecrm.timer
[Service]
Type=oneshot
ExecStart=php -f /PATH/TO/DEPLOYMENT/public/legacy/cron.php
User=apache
Group=apache
[Install]
WantedBy=multi-user.target
EOF
cat >/etc/systemd/system/suitecrm.timer <<EOF
[Unit]
Description=Run SuiteCRM Scheduler Every Minute
Requires=suitecrm.service
[Timer]
Unit=suitecrm.service
OnCalendar=*:0/1
[Install]
WantedBy=timers.target
EOF
systemctl enable --now suitecrm.timer
You’re on your own now.