Linux Guide/Installing SugarCRM On Linux

< Linux Guide

Here is how I installed SugarCRM on a new PC:

#cd /usr/src
#rpm -i MySQL* 		(don’t worry if MySQL fails to start)
#mysql_install_db
#mysqld_safe &
< hit enter again >
#mysqladmin –u root password ‘enter-new-root-password-in-single-quotes’
#mysqlshow –p
Enter Password:

You should see something like:

Databases
---------
mysql
test
#mysql –u root –p
Enter Password:
mysql>SET PASSWORD FOR ‘root’@’localhost’=OLD_PASSWORD(‘New-Password’);
mysql>use mysql
mysql>delete from user where User=’’;
mysql>quit
#gzip –d httpd-2.0.54.tar.gz
#tar xvf httpd-2.0.54.tar
#gunzip php-4.3.11.tar.gz
#tar -xvf php-4.3.11.tar
#cd httpd-2.0.54
#./configure --enable-so
#make
#make install
#cd ../php-4.3.11
#./configure --with-apxs2=/usr/local/apache2/bin/apxs \        (hit enter key)
 --with-mysql-sock=/var/lib/mysql/mysql.sock
#make
#make install
#cp php.ini-dist /usr/local/lib/php.ini

Search for: memory_limit = 8M, change 8M to 16M Save & Close file

Find loadmodule and make sure this line was added, (or add)

LoadModule php4_module modules/libphp4.so

Find addtype and add

AddType application/x-tar.tgz
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps

Find directoryindex and add index.php to the line:

DirectoryIndex index.php index.html index.html.var
#/usr/local/apache2/bin/apachectl start

If you get the following error: “ Cannot load /usr/local/apache2/modules/libphp4.so into server: /usr/local/apache2/modules/libphp4.so: cannot restore segment prot after reloc: Permission Denied” Type:

#chcon –t shlib_t /usr/local/apache2/modules/libphp4.so

now try and start:

#/usr/local/apache2/bin/apachectl start

Create a file in /usr/local/apache2/htdocs/ named test.php and enter the following line in the file:

<?php phpinfo(); ?>

Save and close. Set permissions on file to 755. Now in a browser type http://localhost/test.php You should see a PHP information screen with your current settings.

Edit or create the /etc/my.cnf file, make it look like the following:

[mysqld]
#use old password encryption method (needed for 4.0 and older clients).
old-passwords
basedir=/var/lib/mysql

Save and close file.

Find: basedir=/ and change to:

basedir=/var/lib/mysql

select mysql, click restart

#chmod -R 777 /usr/local/apache2/htdocs/sugarsuite
#cd ..  [now in htdocs folder]
#chown -R apache sugarsuite    [change file owner to the apache webserver]
#cd sugarsuite   [back to sugar webroot]
#chmod -R 775 cache custom data modules
#chmod 664 config.php
#chmod -R 755 /usr/local/apache2/htdocs/sugarsuite
#cd /usr/local/apache2/htdocs/sugarsuite
#chmod -R 777 ./cache/ < does not work!
#chmod -R 777 ./custom/
#chmod -R 777 ./data/
#chmod -R 777 ./modules/
#chmod -R 444 config.php
#cp /usr/local/apache2/bin/apachectl /etc/init.d/
#1/bin/sh
#
#chkconfig: - 85 15
#description: Apache is a Web server to serve HTML files and CGI.
#
#copyright (c) 2000-2004 The Apache Software Foundation
#/sbin/chkconfig --add apachectl
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.