Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Wednesday, September 14, 2011

Super Easy Magento Compatible Centos Install

The Basic Magento Web Server Install Guide

This install guide assumes that you already have the basic install of Centos 5.6 complete. We will now install Apache, MySQL and PHP 5.2.17 First let's install some basic tools
yum groupinstall 'Development Tools'
yum groupinstall 'Development Libraries'
Ok let's install Apache, NTP and MySQL
yum install ntp httpd mysql-server httpd-devel
Look to see what PHP packages are installed and remove any if needed.
rpm -qa | grep php
remove all php 5.3 packages We are going to need some re-requisites for our PHP so lets install them now!!
yum install libc-client libmcrypt libmhash net-snmp libtidy  unixODBC-devel libpng-devel libmcrypt-devel
Now we are ready to install PHP5.2.17
cd ~/mkdir php5.2.17
cd php5.2.17
wget 'http://www.atoomnet.net/./php/php-5.2.17/php-5.2.17-1.x86_64.rpm'
wget 'http://www.atoomnet.net/./php/php-5.2.17/php-bcmath-5.2.17-1.x86_64.rpm'
wget 'http://www.atoomnet.net/./php/php-5.2.17/php-cli-5.2.17-1.x86_64.rpm'
wget 'http://www.atoomnet.net/./php/php-5.2.17/php-common-5.2.17-1.x86_64.rpm'
wget 'http://www.atoomnet.net/./php/php-5.2.17/php-dba-5.2.17-1.x86_64.rpm'
wget 'http://www.atoomnet.net/./php/php-5.2.17/php-devel-5.2.17-1.x86_64.rpm'
wget 'http://www.atoomnet.net/./php/php-5.2.17/php-eaccelerator-5.2.17_0.9.6.1-1.x86_64.rpm'
wget 'http://www.atoomnet.net/./php/php-5.2.17/php-gd-5.2.17-1.x86_64.rpm'
wget 'http://www.atoomnet.net/./php/php-5.2.17/php-imap-5.2.17-1.x86_64.rpm'
wget 'http://www.atoomnet.net/./php/php-5.2.17/php-ldap-5.2.17-1.x86_64.rpm'
wget 'http://www.atoomnet.net/./php/php-5.2.17/php-mbstring-5.2.17-1.x86_64.rpm'
wget 'http://www.atoomnet.net/./php/php-5.2.17/php-mcrypt-5.2.17-1.x86_64.rpm'
wget 'http://www.atoomnet.net/./php/php-5.2.17/php-mhash-5.2.17-1.x86_64.rpm'
wget 'http://www.atoomnet.net/./php/php-5.2.17/php-mysql-5.2.17-1.x86_64.rpm'
wget 'http://www.atoomnet.net/./php/php-5.2.17/php-ncurses-5.2.17-1.x86_64.rpm'
wget 'http://www.atoomnet.net/./php/php-5.2.17/php-odbc-5.2.17-1.x86_64.rpm'
wget 'http://www.atoomnet.net/./php/php-5.2.17/php-pdo-5.2.17-1.x86_64.rpm'
wget 'http://www.atoomnet.net/./php/php-5.2.17/php-pgsql-5.2.17-1.x86_64.rpm'
wget 'http://www.atoomnet.net/./php/php-5.2.17/php-readline-5.2.17-1.x86_64.rpm'
wget 'http://www.atoomnet.net/./php/php-5.2.17/php-snmp-5.2.17-1.x86_64.rpm'
wget 'http://www.atoomnet.net/./php/php-5.2.17/php-soap-5.2.17-1.x86_64.rpm'
wget 'http://www.atoomnet.net/./php/php-5.2.17/php-tidy-5.2.17-1.x86_64.rpm'
wget 'http://www.atoomnet.net/./php/php-5.2.17/php-xml-5.2.17-1.x86_64.rpm'
wget 'http://www.atoomnet.net/./php/php-5.2.17/php-xmlrpc-5.2.17-1.x86_64.rpm'
rpm -ivh *.rpm
(I removed wget 'http://www.atoomnet.net/./php/php-5.2.17/php-mssql-5.2.17-1.x86_64.rpm') Make sure MySQL is on
chkconfig --levels 235 mysqld on
/etc/init.d/mysqld start
And let's make sure we have MySQL locked down (follow instructions)
mysql_secure_installation
Make sure Apache is on
chkconfig --levels 235 httpd on
/etc/init.d/httpd start
Finally, add another repo
cd /etc/yum.repos.d/
wget http://centos.karan.org/kbsingh-CentOS-Extras.repo
then make the following changes:
vi /etc/yum.repos.d/kbsingh-CentOS-Extras.repo
gpgcheck to 0 and enabled to 1 in the [kbs-CentOS-Testing] You will need to configure your Apache and MySQL

The Best Dedicated Server for Magento

This posting is more for question answers than anything else.

Background:

I do a lot of Magento upgrades, the bottom line, your upgrading server matters. What I would like to do is collaborate (knowledge) on the best machine (and the cheapest) and the best configuration on a single dedicated server.

My best case example is a 4gb Magento 1.3 database run on a HPDL160 G6 Dual Quad Core 1.6ghz processors, 16gb RAM, and SATA 7200rpm drives.

I installed and configured CentOS 5.5 with MySQL 5.1. I tuned MySQL (I will post a script later)

I will use my desktop machine (at the time) as my benchmark.
Intel i7 Quad core
16gb Memory
7200 RPM SATA Drive
CentOS 5.5, MySQL 5.1
(Purchased all from Microcenter)

In addition, I also tested a Dual Intel i7 Quad Core with 16GB memory and a 7200RPM SATA drive running Ubuntu 10.04

My best completion time on my Desktop Machine was 12 hours
My best completion time for the Ubuntu Desktop was 10 hours
My best completion time for the HP G6 was just under 5 hours.

My latest endevor involves a HP DL385 AMD Quad -Dual Core server (4-dual core CPUs) with 32GB memory and RAID 5 SCSI Ultra 320.

A 2gb Magento database is taking more than 12 hours to upgrade.

I am not a hardware GURU, so I am looking for some explanations on why the G6 ran so much faster? In addition, I would be happy to post anyone configuration that allows for the fastest Magento upgrades. Ideally I would like to first find the optimum server configuration, then find the optimum server.