一、替换CentOS镜像服务器,修改CenOS-Base.repo
中国官方镜像网站:http://centos.ustc.edu.cn
修改CentOS:
cd /etc/yum.repos.d
mv CentOS-Base.repo CentOS-Base.repo.save
wget http://centos.ustc.edu.cn/CentOS-Base.repo.5
mv CentOS-Base.repo.5 CentOS-Base.repo
二、更新系统内核
yum -y update
三、安装Apache+php+Mysql
1、安装Apahce、PHP、MySQL、PHP连接MySQL库组件;
yum -y install httpd php mysql mysql-server php-mysql
2、安装MySQL扩展;
yum -y install mysql-connector-odbc mysql-devel libdbi-dbd-mysql
mysqladmin -u root password ‘设置密码’; (引号内填密码)
3、安装PHP的扩展;
3.a、升级PHP到5.2.14;
3.a.1、导入以下地址:
rpm --import http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
3.a.2、修改CentOS-Base.repo,增加以下信息:
vi /etc/yum.repos.d/CentOS-Base.repo
[utterramblings]
name=Jason's Utter Ramblings Repo
baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
3.b、yum安装
yum -y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc php-mcrypt
4、安装Apache扩展
yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql
四、安装Zend Optimizer
cd /usr/local/src
wget http://downloads.zend.com/optimizer/3.2.2/ZendOptimizer-3.2.2-linux-glibc21-i386.tar.gz
tar xzvf ZendOptimizer-3.2.2-linux-glibc21-i386.tar.gz
./ZendOptimizer-3.2.2-linux-glibc21-i386/install.sh
一路回车。。。
五、启动服务配置
/sbin/chkconfig httpd on (设置Apache为自启动)
/sbin/chkconfig –add mysqld (MySQL服务)
/sbin/chkconfig mysqld on (mysqld服务)
service httpd start (自启动httpd服务)
service mysqld start (自启动mysqld服务)