SugarCRM is a popular customer relationship management system that offers advanced customer and business management features. It offers sales force, automation, marketing campaigns, collaboration, customer support, and other features that can be self-hosted on a private server. This article will explain how to install SugarCRM on Ubuntu 20.04.
Prerequisites
- Deploy a Ubuntu 20.04 Server on Rcs.
- Setup a domain name on the server.
- SSH and Login to the server
- Install Apache, MySQL, PHP (LAMP Stack).
- Install vsFTPd
Step 1: Create the SugarCRM Database
Login to MySQL.
$ mysql -u root -pCreate a new database.
CREATE DATABASE sugardb;Create a new database user with a strong password.
CREATE USER ‘admin’@’localhost’ IDENTIFIED BY ‘Password’;Grant the user full rights to the SugarCRM database.
GRANT ALL PRIVILEGES ON sugardb.* TO `admin`@`localhost`;Refresh MySQL Privileges.
FLUSH PRIVILEGESExit the MySQL shell.
EXITStep 2: Configure Apache
Create a new SugarCRM webroot directory.
$ sudo mkdir /var/www/SugarCRMThen, create a new Apache virtual host configuration file.
$ sudo touch /etc/apache2/sites-available/sugarcrm.confOpen and edit the file.
$ sudo nano /etc/apache2/sites-available/sugarcrm.confPaste the following configuration lines:
<VirtualHost *:80>
ServerName example.com
DocumentRoot /var/www/sugarcrm
<Directory /var/www/sugarcrm>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>Save and close the file.
Enable the configuration file.
$ sudo a2ensite sugarcrm.confRestart Apache.
$ sudo systemctl restart apache2Step 3: Configure SSL
Install Certbot.
$ sudo apt install certbotRequest a free Let’s Encrypt SSL Certificate, replacing example.com with your active domain name.
$ certbot --apache --redirect -d example.com -d www.example.com -m admin@example.com --agree-tosVerify that automatic certificate renewal is turned on.
$ sudo certbot renew --dry-runStep 4: Configure Firewall
Open Port 21 to allow FTP connections on the server.
$ sudo ufw allow 21/tcpOpen Port 80 to allow HTTP traffic.
$ sudo ufw allow 80/tcpOpen Port 443 to allow HTTPS traffic.
$ sudo ufw allow 443/tcpReload the Firewall.
$ sudo ufw reloadStep 5: Install SugarCRM
Visit the SugarCRM Support website, log in, and click Downloads in the top right corner of your account. Depending on your SugarCRM license, select your target edition, then download the latest .zip release file to your computer.
Open your FTP client, and make a connection to your server, then upload the SugarCRM**.zip file to the FTP user home directory.
Next, through your server terminal session, unzip the uploaded SugarCRM file.
$ unzip SugarCRM-11.0.3.zipMove all extracted files to the SugarCRM webroot directory.
$ sudo mv SugarCRM/* /var/www/sugarcrmNow, grant Apache full ownership permissions to files in the SugarCRM directory.
$ sudo chown -R www-data:www-data /var/www/sugarcrmChange to the directory.
$ cd /var/www/sugarcrmSet proper directory and file permissions.
$ sudo find . -type d -exec chmod 755 {} \;
$ sudo find . -type f -exec chmod 644 {} \;The above command will apply permissions mode 755 on all subdirectories, and 644 on all files in the directory.
Then, through a web browser, visit your SugarCRM domain to complete the installation and setup process.
On the database setup page, select MySQL (mysqli extension) as your database type, then enter the database name, username, and password created on step 1 of this article. Once validated, create an administrative user account to complete your SugarCRM Installation.
Conclusion
You have successfully installed SugarCRM on a Ubuntu 20.04 server running the Apache, MySQL, PHP (LAMP) Stack. For further information on how to set up SugarCRM, visit the official documentation page.