SugarCRM Community Edition is an open source and web based customer relationship management (CRM) software. It provides many functions such as activity management, contacts, accounts, campaigns, web-to-lead forms, dashboards, email clients and marketing, project management, bug tracking, shared calendars etc. that allow maximum management for business and client relationships.
In this tutorial we will show you how to install SugarCRM Community Edition on an Ubuntu VPS in less than 5 minutes.
Download the latest version of SugarCRM Community Edition available at http://sourceforge.net/projects/sugarcrm/files/ to the ‘/opt’ directory on the server. Then, extract it and move the SugarCRM files and directories to the ‘/var/www/html/sugar’ directory. At the time of writing this tutorial, the latest stable version of SugarCRM Community Edition is 6.5.20.
cd /opt/ wget http://sourceforge.net/projects/sugarcrm/files/latest/download -O SugarCE-6.5.20.zip unzip SugarCE-6.5.20.zip mv SugarCE-Full-6.5.20 /var/www/html/sugar
SugarCRM Community Edition requires:
- PHP with bcmath, cURL, GD graphics library, hash, IMAP, JSON, mbstring, MySQLi, openSSL, SimpleXML, ZIP and ZLIB PHP extensions enabled.
- Apache Web Server >= 2.x+
- MySQL >= 5.x installed on your Linux VPS.
Update your OS package lists and install the software updates using the following commands:
apt-get update apt-get upgrade
Install PHP and required PHP modules:
apt-get install php5 php5-cli php5-common php5-dev php5-mysql php5-curl php5-gd php-pear php5-imap php5-mcrypt php5-xmlrpc php5-xsl
In order to improve performance, it is recommended to have JSMin PHP extension installed on your server. The JSMin PHP extension can be installed using the pecl command:
pecl install jsmin
Edit the php.ini configuration file and add ‘extension=jsmin.so’ to it:
Also, add/modify the following settings:
post_max_size = 32M upload_max_filesize = 32M memory_limit = 768M
InboundEmail and Campaigns (Email) require the IMAP libraries, so enable the IMAP module:
sudo php5enmod imap
Create a new virtual host directive in Apache. For example, create a new Apache configuration file named ‘sugar.conf’:
touch /etc/apache2/sites-available/sugar.conf ln -s /etc/apache2/sites-available/sugar.conf /etc/apache2/sites-enabled/sugar.conf vi /etc/apache2/sites-available/sugar.conf
then, add the following lines:
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/html/sugar/ ServerName your-domain.com ServerAlias www.your-domain.com <Directory /var/www/html/sugar/> Options FollowSymLinks AllowOverride All </Directory> ErrorLog /var/log/apache2/your-domain.com-error_log CustomLog /var/log/apache2/your-domain.com-access_log common </VirtualHost>
Restart the Apache web server for the changes to take effect:
service apache2 restart
The following files and directories inside the ‘/var/www/html/sugar/’ directory need to be writable from your web server:
'config.php' 'config_override.php' 'sugarcrm.log' 'cache' and all subdirectories and files 'custom' and all subdirectories and files 'data' and all subdirectories and files 'modules' and all subdirectories and files
This can easily be accomplished by executing the following command:
chown www-data:www-data -R /var/www/html/sugar/
Create a new MySQL database named ‘sugarcrm’ on your server:
mysql -u root -p mysql> CREATE DATABASE sugarcrm; mysql> CREATE USER [email protected]; mysql> SET PASSWORD FOR 'sugar'@'localhost' = PASSWORD("sugar-password"); mysql> GRANT ALL PRIVILEGES ON sugarcrm.* TO 'sugar'@'localhost' IDENTIFIED BY 'sugar-password' WITH GRANT OPTION; mysql> FLUSH PRIVILEGES; mysql> quit
Do not forget to change ‘sugar-password’ with a strong password for your ‘sugar’ MySQL user.
Open http://your-domain.com in your favorite web browser and follow the easy instructions.
In order to run Sugar Schedulers, add the following line to the crontab file:
* * * * * cd /var/www/html/sugar; php -f cron.php > /dev/null 2>&1
That is it. The SugarCRM installation is now complete. Of course you don’t have to do any of this if you use one of our Ubuntu Optimized VPS Hosting services, in which case you can simply ask our expert Linux admins to install SugarCRM for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.