#添加epel源php
rpm -Uvh http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpmlinux
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6vim
#添加rpmforge源多線程
yum install wget -ycurl
cd /usr/local/srcide
wget http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpmsvn
rpm -Uvh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm工具
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag開發工具
# 添加多線程下載工具(可選)google
yum install axel -y
cd /etc/yum/pluginconf.d/
wget http://cnfreesoft.googlecode.com/svn/trunk/axelget/axelget.conf
cd /usr/lib/yum-plugins/
wget http://cnfreesoft.googlecode.com/svn/trunk/axelget/axelget.py
#將Base源指向到163
cd /etc/yum.repos.d
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
sed -i -e 's#$releasever#6.4#' CentOS6-Base-163.repo
\mv CentOS6-Base-163.repo CentOS-Base.repo
yum clean all
yum makecache
yum upgrade -y
#禁用selinux
#disable SELinux
sed -i -e 's/SELINUX=enforcing/SELINUX=disabled/' /etc/sysconfig/selinux
#安裝工具軟件
yum install ntp vim-enhanced vixie-cron mlocate -y
yum install tree lrzsz -y
yum install man man-pages sudo -y
#設定時區
\cp -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
#和日本源同步
ntpdate jp.pool.ntp.org
下面開始安裝依賴庫
#安裝開發工具包
yum groupinstall "Development Tools" -y
#安裝其它庫
yum install ncurses ncurses-devel libtool* zlib-devel -y
yum install libxml2-devel libjpeg-devel libpng-devel libtiff-devel fontconfig-devel freetype-devel -y
yum install libXpm-devel gettext-devel -y
yum install curl curl-devel pam-devel e2fsprogs-devel krb5-devel -y
yum install libidn libidn-devel -y
yum install openssl openssl-devel -y
#下面這個可選。若是是安裝php的話,最好選上。
#yum install mcrypt libmcrypt libmcrypt-devel mhash mhash-devel -y