Installing SugarCRM 5.1.0a on a WHM/Cpanel 11 Host

Today I took on installing SugarCRM 5.1.0a for a client of mine who is just falling head over heals in love with all the whole concept of Open Source.

This software has a really long list of requirements and I wouldn’t recommend it to people using shared hosting but this customer has a virtual dedicated server with WHM/Cpanel 11 on it.  Having a dedicated box (even virtualized) enables root access aka the ability to change whatever I need to in order to make things work..

The first holdup I encountered was “session save path” not being defined inside of the php.ini configuration file.

You can find the php.ini on a WHM/Cpanel server at “/usr/local/lib/”

I went and enabled it by removing the comment tag from inside of the php.ini file for it.  This did not fix the problem because  SugarCRM is picky and doesn’t like shared hosting environments.  I found this forum post that describes a work around to define this path but the author posted no examples.  My setup is hosted on a sub domain so my example is for that.

Inside of your htaccess file for the domain add the following

php_value session.save_path /home/accountuser/public_html/subdomain_directory/tmp/

Create a directory called “tmp” inside of your subdomain_directory (or whatever directory you are using) and chmod it “777″ to make it writeable.

That got me around the first hurdle.

The second holdup was also related to settings in php.ini but this is also a security/cost issue.  The software wants to be able to have users submit large files through the web interface but you could see your hosting costs rise exponentially if employees abuse this.

In any case this is a small company and they hardly use any of their bandwidth on this server so I went ahead and adjusted these settings.  You will need to look for “upload_max_filesize” and “post_max_size” inside of php.ini and make the changes as required.  After you do that the rest of the permission settings for files and folders is standard as with any web app installation.

The third holdup was the step where you need to add a database for Sugar CRM, as usual I went about trying to use Cpanel to generate a database and user.  Unusually though this did not work, I could not get SugarCRM to use any database with a user I created.  Admittedly I didn’t play with this or do any googling on the topic I just went into WHM to open PHPMyAdmin as root and created a new user/database inside of that.  The database created through PHPMyAdmin worked perfectly and I was able to move forward.

The fourth holdup was the installer outputting some permission denied errors that ended with “sugar_file_utils.php on line 59″.  I found a great topic on the forums that quickly informed me that the Sugar CRM software requires the apache user account to be the owner of the folder that Sugar CRM is resides in.  I search Google for the account that WHM uses but was unable to find anything useful.  I changed tactics and searched for a way to display the user running apache, sure enough I found a way to display that in moments.

Display the user running apache with this command “ps aux | grep apache”

The user came back as “nobody” so I went and added them as the owner of my “subdomain_directory”

Run the command  “chown -R nobody.nobody /home/accountuser/public_html/subdomain_directory/”

After that SugarCRM let me login with the username and password I had setup which makes this install one of the least simple I have ever worked with but at the sametime a certainly doable project.

:-D

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Reddit
  • Slashdot
  • StumbleUpon

Leave a Reply

You must be logged in to post a comment.