Skip to content

Instantly share code, notes, and snippets.

@ronbeltran
Created June 22, 2015 05:47
Show Gist options
  • Save ronbeltran/20d8f8bdc12fef028d02 to your computer and use it in GitHub Desktop.
Save ronbeltran/20d8f8bdc12fef028d02 to your computer and use it in GitHub Desktop.
Install Sugar 7 CRM in Ubuntu 12.04

Sugar 7.5 Installation and Upgrade Guide

Download needed packages

  1. Sugar 7 CRM Install zip file

  2. elastics

    curl -O https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.4.4.zip

  3. Install LAMP Stack for your specific distro

For Ubuntu see version by running:

cat /etc/lsb_release

Output:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"

For Ubuntu 14.04.x follow this guide on digital ocean

Install Apache2

sudo apt-get install apache2 # install Apache 2 web server

Verify that Apache web server has been successfully installed by visiting the virtual server IP address. For Compute Engine projects, the IP address can be found in External IP tab in project console. Or you can also use outside party, see below:

curl http://icanhazip.com

Output:

104.197.0.193

The visit in your browser http://104.197.0.193 If configured successfully, you will be presented with "Apache2 Ubuntu Default Page" It works! page.

Verify Apache version 2.2 to 2.4 is installed by this command:

apache2 -v

Output:

Server version: Apache/2.4.7 (Ubuntu)
Server built:   Mar 10 2015 13:05:59

Install MySQL

sudo apt-get install mysql-server php5-mysql
sudo mysql_install_db # tell mysql to setup its DB structure
sudo mysql_secure_installation # remove defaults

Verify mysql version either 5.1, 5.5 or 5.6

mysql -V

Output:

mysql  Ver 14.14 Distrib 5.5.43, for debian-linux-gnu (x86_64) using readline 6.3

Install PHP

sudo apt-get install php5 libapache2-mod-php5

Issue Sugar 7 supports php version 5.3 and 5.4 only. Downgrade PHP in Ubuntu see here http://askubuntu.com/questions/550191/install-php-5-4-on-ubuntu-14-04-lts-without-compiling

Needed PHP Modules

Not only is PHP required to run Sugar, there are specific PHP modules required as well as some specific settings. The following modules are required to be running in PHP before installing Sugar:

  • bcmath
  • curl
  • gd
  • hash
  • imap
  • json
  • mbstring
  • openssl
  • SimpleXML
  • zip
  • zlib

To see the available options for PHP modules and libraries, you can type this into your system:

sudo apt-cache search php5-

Install the need modules;

sudo apt-get install php5-curl php5-gd php5-imap php5-json

The following modules are already installed and enable, verify by creating php info file:

sudo vim /var/www/html/info.php

contents:

<?php phpinfo(); ?>

Then verify installed modules uin http://IP-ADDRESS/info.php

Install elasticsearch

Download elasticsearch and extract its source. Install Java 7 See http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html

Then follow install instruction in http://support.sugarcrm.com/04_Knowledge_Base/02Administration/100Install/Installing_and_Administering_Elasticsearch_for_Sugar_7/

Setup database to be used by Sugar 7

rbeltran@sugar-7-5-2-1:/var/www/html/sugar-seven$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 49
Server version: 5.5.43-0ubuntu0.14.04.1 (Ubuntu)

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
+--------------------+
3 rows in set (0.01 sec)

mysql> CREATE DATABASE sugar_seven;
Query OK, 1 row affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON sugar_seven.* TO "sugar7"@"localhost" identified by "sugar7";
Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

mysql> EXIT
Bye

Finally, proceed with Sugar 7 installation at http://104.197.0.193/sugar-seven/install.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment