support

installsugarcrm

Installing SugarCRM on Trixbox 2.4.x (and Migrating your data from TB 2.2):

1) I am assuming you stuck with the standard passwords used in the SugarCRM on the 2.2 box - if you didn't, you will need to adjust the procedure accordingly and

2) You have updated your existing SugarCRM installation to the SAME VERSION as the one you are installing on the new box - I have had really good experience with moving from the same version on one box to the same version on another box, and terrible results when I mix versions. The current version is 4.51h - Update your existing install to this version before you start.

Part One: Capture your old data

1) cd /var/lib/mysql - go to the MySQL directory
2) service mysqld stop - stop MySQL so that we can get a complete copy of the data.
3) tar -czvf /usr/src/sugar-mysql.tar.gz sugarcrm - this is the MySQL Database.
4) cd /var/www/html - go to the Apache directory.
5) tar -czvf /usr/src/sugar-web.tar.gz crm - This is the actual Website - Sugar actually keeps data in here too (sloppy) so you need to snag a copy.
5) service mysqld start - restart MySQL so your old box still works.

Ok, now you have two files in /usr/src which have a complete copy of your database, and any customizations you may have made - move them somewhere so that you can move them to the new machine.

Part Two: Install SugarCRM on the new machine

1) cd /var/www/html - switch to the Apache web folder.
2) wget http://www.sugarforge.org/frs/download.php/3563/SugarOS-4.5.1h.zi... - Get Sugar
3) unzip SugarOS-4.5.1h.zip - Extract the files (Skidillions of them...)
4) mv SugarOS-Full-4.5.1h crm - rename the directory to the correct name.
5) chown asterisk:asterisk crm -R - give ownership of the directory and files to Asterisk (how it was on 2.2)
6) cd crm - go into the directory
7) chmod 664 config.php - Permissions on config.php
8) chmod -R 775 cache custom data modules - Permissions on the files

At this point, you need to switch to a web browser and continue the installation. Here is the document from SugarCRM:

http://www.sugarcrm.com/wiki/index.php?title=Installation#Trouble...

But I will go through each screen as necessary

9) open http://ip-of-box/crm and you should see screen 1 - Choose your language and click Start.
10) Screen 2 - Accept the License and click Next.
11) Screen 3 - System Check Acceptance - You should be all Green - if not, you missed a step - click next.
12) Screen 4 - Database Configuration - You want this to match the old 2.2 box settings here, so it should be as follows:
Host Name/Host Instance: localhost
Database Name: sugarcrm Create Database: Check the box
Database Username: sugarcrm Create User: Check the box
Database Password: sugarcrm - This is what it was on 2.2 - change it if you changed it.
Privileged Database User Name: root
Priveleged Database User Password: passw0rd - that's a Zero - this is also the default - change it if you have already changed it, otherwise no. Click next.
13) Screen 5 - Site Configuration - This is up to you, and if this is a fresh install, this is what you will see. If you are restoring your data, this will be overwritten. Click next.
14) Screen 6 - Locale Settings - I live in North America, so the defaults are fine - adjust if necessary and click next.
15) Screen 7 - Confirm Settings - Woo Hoo - We are almost there - click next.
16) Screen 8 - Confirms that it is set up - click next.
17) Screen 9 - Install Latest Patches - You already have the current version - click next.
18) Screen 10 - Install Language Packs - you can do this later - click next.
19) Screen 11 - Registration (required - probably why it's not bundled anymore) - click Finish.

Woo Hoo! You should be presented with a login screen - If this is a fresh install, you are done - login and start setting up users and your company.

Part Three: Restore your Data

Back to the cli! I am assuming you have moved the tar files you made into /usr/src on the new (current) box - alter the path if you did something different.

1) service mysqld stop - so we can restore the data.
2) cd /var/www/html - go to the Apache directory.
3) tar -zxvf /usr/src/sugar-web.tar.gz - Expand the Directory over top of the fresh install.
4) cd /var/lib/mysql - go to the MySQL directory.
5) tar -zxvf /usr/src/sugar-mysql.tar.gz - Put your old Database back where it should be.
6) service mysqld start - start MySQL back up.

Login - ALL your old Data and files should be in place - Whoah - That's a long procedure, but I did it as I was typing and it took me less than 45 minutes - since you are just doing it, it should take even less.
----------------------------------------------------------------------------------------
Update: If you wish to update 2.2 to the latest version of SugarCRM, see notes here