Friday, April 8, 2011

Installing Magento 1.5.0.1 on CentOS 5.5

CentOS 5.5 (x64 architecture) setup for Magento Commerce version 1.5.0.1

1. Install CentOS 5.4 (because it is only 1DVD, 5.5 is 2 DVDs – troublesome)


2. Remove unnecessary rpms (ppp, rp-pppoe, irda-utils, pcmciautils, wireless_supplicant, ypbind, yp-tools, etc)


3. Update yum – “yum update yum”


4. Update the rest of the rpms – “yum update”


5. Reboot (kernel update)


6. Install Atomicorp rpm repository –

wget -q -O - http://www.atomicorp.com/installers/atomic | sh


7. Install php rpms (these are for magento mainly)

a. php

b. php-devel

c. php-cli

d. php-common

e. php-gd

f. php-mbstring

g. php-mcrypt

h. php-mysql

i. php-pdo

j. php-xml

php-xml will provide the DOM extension required by Magento.


8. There is no need to install php-mhash explicitly, it is included in php 5.3+. It depends on php-common for 5.2, and will cause a depsolving problem (dependency issue, as the rest are using 5.3+ already).


9. Compulsory changes to /etc/php.ini :

a. short_open_tag = On


10. Recommended changes to /etc/php.ini:

a. memory_limit = 64M

b. max_execution_time = 18000

c. magic_quotes_gpc = off

d. flag session.auto_start = off

e. zlib.output_compression = on

f. suhosin.session.cryptua = off

g. zend.ze1_compatibility_mode = off


11. Not sure about extension=mcrypt.so yet, the comment was:

; PHP for some reason ignores this setting in system php.ini

; and disables mcrypt if this line is missing in local php.ini

New update: I think mcrypt extension is not handled in /etc/php.d/mcrypt.ini.

If the files in /etc/php.d are processed after php.ini are processed, then it makes sense why mcrypt.ini will take precedence over the setting in php.ini


12. Magento only supports APC php opcode optimizer. However, the same dependency issue surfaces. *sigh*

To solve it, install php-devel, php-pear, and then

pecl update-channels

pecl install apc (just use the default options for now)

One good thing about compiling APC from scratch this way is that you get it optimized for your system. Bad thing is, you need to manage the updating/upgrading yourself.


No comments: