Step by Step Guide to Installing on Centos 5.2 64bit

Last modified by kevin.connor on Thu, June 24, 2010 15:31
Source|Old Revisions  

This is an old revision of the document!

How to install Centos 5.2, PHP 5.2x, Mysql 5.1x and Magento 1.2.x Assuming that this is a server behind a firewall

Install Centos 5.2 (64bit) with correct IP settings and no packages selected except “base” restart and login

Update the system and download kernel headers in case they are needed for future software

  yum update
  yum install kernel*

Set the hosts file and disable ip6

  nano /etc/hosts
      Add IP and a hostname
  nano /etc/modprobe.conf
      Add 'alias ipv6 off'
      Add 'net-pf-10 off'

Disable un-needed services (look them up if you are interested)

  chkconfig NetworkManager off
  chkconfig NetworkManagerDispatcher off
  chkconfig anacron off
  chkconfig atd off
  chkconfig bluetooth off
  chkconfig cpuspeed off
  chkconfig cups off
  chkconfig gpm off
  chkconfig hidd off
  chkconfig ip6tables off
  chkconfig iptables off
  chkconfig irda off
  chkconfig mdmonitor off
  chkconfig mdmpd off
  chkconfig pcscd off
  chkconfig portmap off
  chkconfig yum-updatesd off
  chkconfig smartd off
  service smartd stop
  service NetworkManager stop
  service NetworkManagerDispatcher stop
  service anacron stop
  service atd stop
  service bluetooth stop
  service cpuspeed stop
  service cups stop
  service gpm stop
  service hidd stop
  service ip6tables stop
  service iptables stop
  service irda stop
  service mdmonitor stop
  service mdmpd stop
  service pcscd stop
  service portmap stop
  service yum-updatesd stop

Install Apache and OpenSSL

  yum install httpd
  yum install openssl
  yum install httpd

Install the remi repositories for updated versions of PHP and MySQL not offered by Centos

  rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm

Install php and required php extensions for Magento

  yum --enablerepo=remi install php-common
  yum --enablerepo=remi install php
  yum install gd gd-devel
  yum --enablerepo=remi install php-mcrypt php-xml php-xml php-devel php-imap php-soap php-mbstring php-mysql
  yum --enablerepo=remi install php-mhash php-simplexml php-dom php-gd

(php-mhash extension no longer required as of php5.3(which is what you’ll get following these commands)-replaced by HASH Message Digest Framework in php core)

Install/Configure newest Mysql and Php extensions and enable in php.ini

  yum --enablerepo=remi install mysql mysql-server
  yum --enablerepo=remi install php-mysql php-pdo
  nano /etc/php.ini
      Add ''
      Add ''
  mysqladmin -u root password SOMEPASSWORD

(I had an error at mysql_install_db-the errmsg.sys file in mysql/share/english did not match the required file-it had a different number of errors. I solved this by downloading the most recent non-rpm linux binary to my local machine and uploading that errmsg.sys file to mysql/share/english)


Get and install magento

  wget http://somewhere/magento-
  wget http://somewhere/magento-sample-data-1.2.0.tar.bz2
  bunzip2 magento-
  bunzip2 magento-sample-data-1.2.0.tar.bz2
  tar xvf magento-sample-data-1.2.0.tar
  tar xvf magento-
  mv magento /var/www/html
  mv catalog/ /var/www/html/magento/media/
  mysqladmin create database magento
  mysql magento < magento_sample_data_for_1.2.0.sql
  cd /var/www/html/magento
  chgrp apache app
  chgrp apache downloader
  chgrp apache js
  chgrp apache lib
  chgrp apache media
  chgrp apache pkginfo
  chgrp apache report
  chgrp apache skin
  chgrp apache var