;

How to install SugarCRM on CentOS 7

Try it in our public cloud & Get $5 Credit
CLAIM NOW

How to install SugarCRM on CentOS 7

SugarCRM is a customer relationship management software suite that helps businesses run marketing campaigns, support customers, and enable employee collaboration, among other functions. While SugarCRM has several paid editions, there is a free version called SugarCRM Community Edition (CE for short) licensed under the GNU Affero General Public License. This is the version that we will walk you through installing today in this guide.

Getting started

In order to install SugarCRM, you will need the following:
• 1 Node (Cloud Server or Dedicated Server) running a clean installation of CentOS 7.
• All commands should be run as the root user
• A full LAMP stack installed

Tutorial

Add the EPEL repository to your system and install these required packages.

yum install epel-release wget unzip nano -y

Completely disable Selinux if it is not already.

setenforce 0
sed -i 's/enforcing/disabled/' /etc/sysconfig/selinux
sed -i 's/enforcing/disabled/' /etc/selinux/config

Install these PHP modules, which are necessary for SugarCRM operation.

yum install php-mysql php-pdo php-gd php-mbstring php-imap -y

Now that all required software are installed, go ahead and create the database and user that SugarCRM will use. Save this information for later, as you’ll need to inform your CRM of the database name, user and password at the end of installation.

mysql -u root -p

create database sugarcrm;
grant all privileges on sugarcrm.* to 'globotech'@'localhost' identified by 'globotech1234';
flush privileges;
exit

Open php.ini in a text editor. Find the line upload_max_filesize and increase its value to 25M.

nano /etc/php.ini

; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 25M

In order for it to recognize the changes made, you must restart Apache at this time.

systemctl restart httpd.service

You can install SugarCRM once all of the above is complete. Download the package from the website, unzip the file and copy the content to the Document root directory on your server. Make sure that you don’t have already something inside the html folder or it will be overwritten.

wget http://liquidtelecom.dl.sourceforge.net/project/sugarcrm/1%20-%20SugarCRM%206.5.X/SugarCommunityEdition-6.5.X/SugarCE-6.5.23.zip
unzip SugarCE-6.5.23.zip
cp -R SugarCE-Full-6.5.23/* /var/www/html/

Apache will need read and write permissions on several of the new directories and files.

cd /var/www/html/
chmod 755 custom/ cache/ modules/ upload/
chmod 755 config.php config_override.php
chown -R apache. *

Now it’s time to create a .htaccess file. Add this content to it:

nano .htaccess

# 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

Apache will also need write permissions for .htaccess.

chmod 755 .htaccess
chown apache:apache .htaccess

Once it is installed, the setup will be completed online through a web browser. Visit http://your_IP/install.php and the installation page should appear.

On the installation page, you’ll be asked for the database information. Fill up all information required, such as your name, email and admin username and password. You’ll also include the database information saved from earlier.

After the installation is completed, you should remove the installation directory and file.

cd /var/www/html/
rm -rf install/ install.php

Conclusion

With SugarCRM successfully installed, you can now begin using it to manage many aspects of your business and customer relations. If this guide was helpful to you, kindly share it with others who may also be interested.