SugarCRM is a popular customer relationship management system that has an open source version, SugarCRM Community Edition, with many devoted Linux users. This guide will walk you through the installation of SugarCRM Community Edition on Ubuntu 16.
SugarCRM requires a few specific PHP modules to be installed on your server.
apt-get install php-cli php-common php-dev php-mysql php-curl php-gd php-pear php-imap php-mcrypt php-xmlrpc php-xsl php-zip php-mbstring
You’ll need to also adjust some settings in your php.ini. Open up the file and edit these two variables.
First, find upload_max_filesize and increase it to 16M.
; Maximum allowed size for uploaded files.
upload_max_filesize = 16M
Next, find post_max_filesize and increase it to 24M. Just to be safe, it should be higher than the value you entor for upload_max_filesize.
; Maximum size of POST data that PHP will accept.
; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enable_post_data_reading.
post_max_size = 24M
Save and close the file. Now, restart Apache so that the changes you made to php.ini will take effect.
service apache2 restart
The required php modules will need to be manually enabled.
SugarCRM will need its own database, so create that now. Make sure to remember the name and password for later on in the guide.
mysql -u root -p
create database sugarcrm;
grant all privileges on sugarcrm.* to 'globotech'@'localhost' identified by 'globotech1234';
Finally, we can download SugarCRM itself. Unzip the archive and copy the content to the Document root directory on the server, make sure that you don’t have already something inside the html folder or it will be overwritten.
cp -R * /var/www/html/
rm -rf /var/www/html/SugarCE-Full-6.5.23*
You’ll need to modify the permissions of some directories and files and grant Apache write permissions in order for SugarCRM to work correctly.
chown -R www-data:www-data /var/www/html/
Create a .htaccess file with the following rules:
# BEGIN SUGARCRM RESTRICTIONS
RedirectMatch 403 (?i).*\.log$
RedirectMatch 403 (?i)/+not_imported_.*\.txt
RedirectMatch 403 (?i)/+(soap|cache|xtemplate|data|examples|include|log4php|metadata|modules)/+.*\.(php|tpl)
RedirectMatch 403 (?i)/+emailmandelivery\.php
RedirectMatch 403 (?i)/+upload
RedirectMatch 403 (?i)/+custom/+blowfish
RedirectMatch 403 (?i)/+cache/+diagnostic
RedirectMatch 403 (?i)/+files\.md5$
# END SUGARCRM RESTRICTIONS
Naturally, you’ll need to grant Apache write permissions to .htaccess for it to take effect.
chown www-data:www-data .htaccess
Now restart Apache once again.
service apache2 restart
The rest of the installation takes place through a web interface. Visit the following URL for the final steps:
Now simply enter all the information that the form requests of you. This will include your name, email address, and the database name and password that you set earlier in the guide.
Once you’re all finished with that, you should remove the installation directory for security reasons.
rm -rf install/ install.php
With the successful installation of SugarCRM, you will now have access to a premier, affordable customer relations solution. If you found this article helpful, feel free to share it with your friends and let us know in the comments below!