Koozali.org: home of the SME Server

HOWTO: SME7.1 SugarCRM + php-json, mod_deflate, eaccelerator

Offline tariqf

  • ****
  • 179
  • +0/-0
HOWTO: SME7.1 SugarCRM + php-json, mod_deflate, eaccelerator
« on: January 04, 2007, 08:36:24 PM »
--updated thanks to feedback----:

* download sugarcrm
* create an ibay called sugarcrm
* extract files to the ibay, remove the html dir and rename the sugar dir to html
* chmod -R 775 cache custom data modules
* chmod 664 config.php
* /sbin/e-smith/db accounts setprop sugarcrm PHPBaseDir /home/e-smith/files/ibays/sugarcrm/:/tmp
* /sbin/e-smith/signal-event ibay-modify sugarcrm
* download php-json version 1.1.1 end extract
* yum install gcc gcc-c++
* cd to php-json folder and run ./configure, make and make install
* mkdir -p /etc/e-smith/templates-custom/etc/php.ini
* edit /etc/e-smith/templates-custom/etc/php.ini/70extras and add
extension=json.so
extension="eaccelerator.so"
  eaccelerator.shm_size="16"
  eaccelerator.cache_dir="/tmp/eaccelerator"
  eaccelerator.enable="1"
  eaccelerator.optimizer="1"
  eaccelerator.check_mtime="1"
  eaccelerator.debug="0"
  eaccelerator.filter=""
  eaccelerator.shm_max="0"
  eaccelerator.shm_ttl="0"
  eaccelerator.shm_prune_period="0"
  eaccelerator.shm_only="0"
  eaccelerator.compress="1"
  eaccelerator.compress_level="9"
* expand-template /etc/php.ini
* edit install.php from your sugarcrm ibay and comment out the line $workflow[] = 'checkSystem.php';
* install smeserver-mod_deflate-1.0-1.noarch.rpm
* download latest eaccelerator and extract go through the install instructions in the README
* yum remove gcc gcc-c++
* /etc/init.d/httpd restart
* fire up a web browser and browse to http://yourserver/sugarcrm and proceed with standard sugar install.

Works pefect on my sme7.1 with sugar 4.5.0h

guest22

HOWTO: SME7.1 SugarCRM + php-json, mod_deflate, eaccelerator
« Reply #1 on: January 05, 2007, 08:07:42 PM »
Is there any specific reason you want to change the default MySQL password? Changing the MySQL root password will break other 'stock' things.

guest

Offline Amir Inbar

  • *
  • 113
  • +0/-0
    • http://www.sheroot.net
HOWTO: SME7.1 SugarCRM + php-json, mod_deflate, eaccelerator
« Reply #2 on: January 05, 2007, 09:11:29 PM »
where do you find php-json 1.1.1 ?
......

Offline tariqf

  • ****
  • 179
  • +0/-0
HOWTO: SME7.1 SugarCRM + php-json, mod_deflate, eaccelerator
« Reply #3 on: January 05, 2007, 09:59:21 PM »
php-json 1.1.1
http://www.aurore.net/projects/php-json/php-json-ext-1.1.1.tar.bz2

No specific reason for changing mysql password I just did it for security - you are totally right I get some mysql errors on boot although everthing appears to be workign fine. Maybe someone can tell me how to correctly change the mysql password in sme7? I think a blank password for root is no good if you're opening up ibays to the world like I am.

Offline Amir Inbar

  • *
  • 113
  • +0/-0
    • http://www.sheroot.net
HOWTO: SME7.1 SugarCRM + php-json, mod_deflate, eaccelerator
« Reply #4 on: January 05, 2007, 10:51:21 PM »
Thank you.

i get :

Code: [Select]
[root@shsrv07 php-json-ext-1.1.1]# ./configure
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether gcc and cc understand -c and -o together... yes
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
./configure: line 2572: php-config: command not found
configure: error: Cannot find php-config. Please use --with-php-config=PATH

......

Offline tariqf

  • ****
  • 179
  • +0/-0
HOWTO: SME7.1 SugarCRM + php-json, mod_deflate, eaccelerator
« Reply #5 on: January 06, 2007, 11:46:29 AM »
you need

yum install php-devel i think, must have missed this off the howto

Offline gordonr

  • *
  • 646
  • +0/-0
    • http://www.smeserver.com.au/
Do NOT change the MySQL root password
« Reply #6 on: January 06, 2007, 01:57:58 PM »
Quote from: "tariqf"

No specific reason for changing mysql password I just did it for security


I can pretty much guarantee that the MySQL root password you chose was less secure than the autogenerated one we install automatically on each SME Server.

It is a long string of random junk, and it is different on every server.

It is automatically configured in the appropriate places (e.g. /root/.my.cnf) so that root can create and manage MySQL databases.

You do not need to know it, and you do not need to change it.

You should never need to use it except to create databases.

You should never use it for application access. Any configuration file which accesses MySQL as root using the MySQL root password is wrong.

Create a separate user for each application and grant only the access required for that application over the tables it needs.

Changing the MySQL root password will break backups.

Please don't change it. There is no need.

Quote from: "tariqf"

I think a blank password for root is no good if you're opening up ibays to the world like I am.


It is not blank by default and a properly configured application should never use the MySQL root password.
............

Offline gordonr

  • *
  • 646
  • +0/-0
    • http://www.smeserver.com.au/
Re: HOWTO: SME7.1 SugarCRM + php-json, mod_deflate, eacceler
« Reply #7 on: January 06, 2007, 02:04:11 PM »
Quote from: "tariqf"
* set mysql root password with mysqladmin -u root password yourpassword

No. You don't neeed to change the MySQL root password on an SME Server. Ever.
Quote from: "tariqf"

* chmod 777 -R for data, cache, modules, custom and 777 for config.php

No. This makes all files writable by all users, including the web server. This is an excellent way to allow your web site to be attacked and possibly to allow further attacks on the server.
Quote from: "tariqf"

* yum install gcc gcc-c++

No. Don't include compilers on external servers.
Quote from: "tariqf"

Works pefect on my sme7.1 with sugar 4.5.0h

It may work, but it's far from perfect. I suspect you have left your system vulnerable to attack.
............

Offline tariqf

  • ****
  • 179
  • +0/-0
HOWTO: SME7.1 SugarCRM + php-json, mod_deflate, eaccelerator
« Reply #8 on: January 06, 2007, 02:13:47 PM »
thanks for your input guys I've learnt a thing or two about sme! Now that I managed to change the mysql password thereby screwing the original autogenerated one how can I regenerate the mysql password so that everything is back to normal?

Also I will take your advice and change the permissions for those dirs and also remove the compilers. I assume it's ok to install and use compilers and then yum ininstall them when no longer needed.

I will also be updating the howto extensively to include all these new revalations to me and will up this along with a handfull of others onto my website.

Thanks

Offline gordonr

  • *
  • 646
  • +0/-0
    • http://www.smeserver.com.au/
HOWTO: SME7.1 SugarCRM + php-json, mod_deflate, eaccelerator
« Reply #9 on: January 07, 2007, 12:41:00 AM »
Quote from: "tariqf"
thanks for your input guys I've learnt a thing or two about sme! Now that I managed to change the mysql password thereby screwing the original autogenerated one how can I regenerate the mysql password so that everything is back to normal?

The bug tracker has a long list of documentation bugs waiting to be moved into the FAQ. This one is documented here:

http://bugs.contribs.org/show_bug.cgi?id=778

For those interested in helping with the FAQ, please join the docteam list at lists.contribs.org/mailman and let's get it up-to-date.

Quote from: "tariqf"
I assume it's ok to install and use compilers and then yum ininstall them when no longer needed.

My apologies - I didn't see that you removed them later in your instructions.

The right way to do this is for someone to package up the relevant packages as RPMs. The files should not be installed in a i-bay, but should be installed outside the web server space and the required parts aliased into the web server space (see Horde/IMP for an example). Critically, the files, must not be writable by the web server. The configuration file may need write access during installs, but should be locked down after that.
............

Offline k0r54

  • ***
  • 111
  • +0/-0
HOWTO: SME7.1 SugarCRM + php-json, mod_deflate, eaccelerator
« Reply #10 on: January 22, 2007, 10:54:56 AM »
wat version of sugar do I need to download?

How do i extract it?

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
HOWTO: SME7.1 SugarCRM + php-json, mod_deflate, eaccelerator
« Reply #11 on: January 22, 2007, 01:58:07 PM »
Quote from: "k0r54"
wat version of sugar do I need to download?


Look here.
Regards,
William

IF I give advise.. It's only if it was me....

Offline k0r54

  • ***
  • 111
  • +0/-0
HOWTO: SME7.1 SugarCRM + php-json, mod_deflate, eaccelerator
« Reply #12 on: January 22, 2007, 05:22:37 PM »
Hi,

Yeah I noticed that after posting but I still need to know how to extract.

Thanks
k0r54

Offline tariqf

  • ****
  • 179
  • +0/-0
HOWTO: SME7.1 SugarCRM + php-json, mod_deflate, eaccelerator
« Reply #13 on: January 22, 2007, 05:25:57 PM »
if its a .tar.gz use

tar zxvf filename

if its a tar.bz2

tar jxvf filename


use

man tar

for more info

Offline k0r54

  • ***
  • 111
  • +0/-0
HOWTO: SME7.1 SugarCRM + php-json, mod_deflate, eaccelerator
« Reply #14 on: January 22, 2007, 05:36:33 PM »
the version to download only seems to be .zip?