Welcome to Machine Unix

Search Below

How to Sugarize Yourself With SugarCRM on Solaris 10

I wanted to look at a Customer Relationship Management system and I stumbled upon SugarCRM. Before exploring what it had to offer, I wanted to see if it can be set up on my favorite operating system, Solaris. This is not a comprehensive guide or review of SugarCrm but rather an minimal installation guide on a Solaris Zone.  So let’s get dirty:


Solaris 10 Update 9 ( 9/10 ) with initial install and a whole root zone:

root@sugar-zone# uname -a

SunOS sugar-zone 5.10 Generic_142910-17 i86pc i386 i86pc


A web server with php capability, a database such as MySQL, and of course SugarCRM itself. Some library stuff and libxml2 which we’ll talk about them later. Apache 2 is installed by default on Solaris and since I don’t want to complicate things I will be using that rather than downloading some other web server. We just need to configure it.

root@sugar-zone# svcs -a | grep apache

offline          0:39:07 svc:/network/http:apache2

It is extremely useful that you have something along the lines of following in your /etc/profile:





export MAKE

INSTALLATION – Bring out the Big Guns First

MySQL and Apache2 – Before doing anything, I want to install MySQL and configure Apache2

So get the latest MySQL package from here. In this case, I am using the 32-bit X86 Compressed Package. First thing we want to do is to create a mysql user and a group, and then add the package.

root@sugar-zone# groupadd -g 900 mysql

root@sugar-zone# useradd -m -u 900 -g mysql -d /var/lib/mysql -s

/usr/bin/bash -c ‘MySql User’ mysql

root@sugar-zone# chmod 750 /var/lib/mysql

root@sugar-zone#  pkgadd -d mysql-5.1.53-solaris10-i386.pkg

The following packages are available:

1  mysql     MySQL Community Server (GPL)

(i86pc) 5.1.53

Select package(s) you wish to process (or ‘all’ to process

all packages). (default: all) [?,??,q]:


root@sugar-zone# /opt/mysql/mysql/scripts/mysql_install_db –datadir=/var/lib/mysql

Installing MySQL system tables…


Filling help tables…



You can get MySQL to work with SMF if you like, get the SMF here, and do the following:

root@sugar-zone# cp MySQL.xml /var/svc/manifest/application/database/mysql.xml

root@sugar-zone# svccfg validate /var/svc/manifest/application/database/mysql.xml

root@sugar-zone# svccfg import /var/svc/manifest/application/database/mysql.xml

root@sugar-zone# svcadm enable mysql

root@sugar-zone# svcs -a | grep mysql

online          0:38:41 svc:/application/database/mysql:default

After setting security up with your root user, connect to mysql database and create an “admin” user:

mysql> CREATE USER ‘admin’@’localhost’ IDENTIFIED BY ‘adminpassword’;

Query OK, 0 rows affected (0.06 sec)

mysql> GRANT RELOAD,PROCESS ON *.* TO ‘admin’@’localhost’;

Query OK, 0 rows affected (0.01 sec)

Later, when I was setting up SugarCRM, I got stuck in the GUI with the famous “Client does not support authentication protocol” error.  Did the following to prevent it:

mysql> SET PASSWORD FOR ‘admin’@’localhost’ = OLD_PASSWORD(‘apassword’);

Query OK, 0 rows affected (0.01 sec)

Now mysql is set up,  we need to get some library goodies. I set up and used Blastwave, and got the following packages:

root@sugar-zone# pkgutil -i autoconf

root@sugar-zone# pkgutil -i automake

root@sugar-zone# pkgutil -i gsed

root@sugar-zone# pkgutil -i curl

The install will also require libxml2, so we get it from source and build it:

root@sugar-zone# gunzip -c libxml2-2.7.8.tar.gz | tar xf –

root@sugar-zone# cd linxml2-2.7.8

root@sugar-zone# ./configure

root@sugar-zone# gmake && gmake install

APACHE2 Configuration

This is the easy part, just have the httpd.conf in its place and enable the service.

root@sugar-zone# cp /etc/apache2/httpd.conf-example /etc/apache2/httpd.conf

root@sugar-zone# svcadm enable apache2

online          0:39:07 svc:/network/http:apache2

PHP Configuration

So now, we get php and build it from the source with the libraries we installed earlier.

root@sugar-zone# bunzip2 php-5.3.4.tar.bz2

root@sugar-zone# gtar -xvf php-5.3.4.tar

root@sugar-zone# ./configure –with-apxs2=/usr/apache2/bin/apxs

–with-mysql=/usr/sfw –with-libxml-dir=/usr/local

–with-config-file-path=/etc/apache2 –enable-mbstring

root@sugar-zone# gmake && gmake install

root@sugar-zone# cp php.ini-production /etc/apache2/php.ini

Add the following lines to apache httpd.conf file in their repective positon:

LoadModule php5_module        libexec/libphp5.so

AddType application/x-httpd-php .php

DirectoryIndex index.html index.html.var index.php

You can now test to see if php is enabled in apache 2 by placing the following code in a .php file in apache’s document root:

<?php phpinfo(); ?>

FINAL STEP – Sugar Babe!

Now you know that your web server is up and running and it is enabled to execute php code, we get to download and install SugarCRM.

root@sugar-zone# mkdir -p /var/opt/www/sugarcrm

root@sugar-zone# unzip -q SugarCE-6.0.3.zip

root@sugar-zone# cd SugarCE-Full-6.0.3/

root@sugar-zone# mv * /var/opt/www/sugarcrm/.

That’s it from the server side configuration. The rest of the installation is taken care of when you hit your browser with www.yourdomain.com/sugarcrm.