搞了半天终于在服务器上搭好了三者,呼呼啊。
留下整个过程中的一些记录,以飨后人……
===================Apache===============
http://rpm.pbone.net/index.php3/stat/4/idpl/15773099/dir/centos_5/com/httpd-2.2.3-45.el5.centos.1.x86_64.rpm.htmlhttp://pkgs.org/centos-5-rhel-5/centos-rhel-updates-x86_64/httpd-2.2.3-45.el5.centos.1.x86_64.rpm.htmldownloadhttpd-2.2.3-45.el5.centos.1.x86_64.rpm[root@localhostzhanggl]#rpm-ivhhttpd-2.2.3-45.el5.centos.1.x86_64.rpm[root@localhostzhanggl]#cd/etc/httpd/
===================PHP=================
http://oss.oracle.com/projects/php/files/EL5/x86_64/download:php53-5.3.5-1.el5.x86_64.rpm
php53-cli-5.3.5-1.el5.x86_64.rpm
php53-common-5.3.5-1.el5.x86_64.rpmphp53-gd-5.3.5-1.el5.x86_64.rpm[root@localhostphp-5.3.5-rpm]#rpm-ivhphp53-mysql-5.3.5-1.el5.x86_64.rpm
error:Faileddependencies:
libmysqlclient.so.15()(64bit)isneededbyphp53-mysql-5.3.5-1.el5.x86_64
libmysqlclient.so.15(libmysqlclient_15)(64bit)isneededbyphp53-mysql-5.3.5-1.el5.x86_64下载mysql-shared-compat来解决http://rpm.pbone.net/index.php3/stat/4/idpl/16852352/dir/redhat_el_5/com/MySQL-shared-compat-5.5.15-1.rhel5.x86_64.rpm.html[root@localhostphp-5.3.5-rpm]#rpm-ivhMySQL-shared-compat-5.5.15-1.rhel5.x86_64.rpm[root@localhostphp-5.3.5-rpm]#rpm-ivhphp53-mysql-5.3.5-1.el5.x86_64.rpm
Preparing...###########################################[100%]
1:php53-mysql###########################################[100%]
配置文件:/etc/php.ini
====================Mysql===============
wgetftp://ftp.ntu.edu.tw/pub/MySQL/Downloads/MySQL-5.5/MySQL-client-5.5.15-1.rhel5.x86_64.rpm
wgetftp://ftp.stu.edu.tw/pub/Unix/Database/Mysql/Downloads/MySQL-5.5/MySQL-server-5.5.15-1.rhel5.x86_64.rpm
执行安装命令
rpm-ivhMySQL-server-5.5.15-1.rhel5.x86_64.rpm
rpm-ivhMySQL-client-5.5.15-1.rhel5.x86_64.rpm
安装完以后,就可以启动了
servicemysqlstart
servicemysqlstop
servicemysqlrestart修改密码./mysqladmin-urootpassword‘passwd’开启远程访问mysqlgrantallprivilegeson*.*toroot@localhostidentifiedby'passwd';grantallprivilegeson*.*toroot@'%'identifiedby'passwd';mysql>flushprivileges;mysql>select*frommysql.user;
====================memcache===============
libevent-2.0.12-stable.tar.gzmemcached-1.4.6.tar.gzmemcache-2.2.6.tgz
2.先安装libevent:
#tarzxvflibevent-2.0.12-stable.tar.gz
#cdlibevent-2.0.12-stable
#./configure–prefix=/usr
#make
#makeinstall
4.安装memcached,同时需要安装中指定libevent的安装位置:
#tarzxvfmemcached-1.4.6.tar.gz
#cdmemcached-1.4.6
#./configure–with-libevent=/usr
#make
#makeinstall
安装完成后会把memcached放到/usr/local/bin/memcached
启动memcached:
/usr/local/bin/memcached-d-m10-uroot-l127.0.0.1-p12000-c256-P/tmp/memcached.pid
2.安装PHP的memcache扩展tarvxzfmemcache-2.2.6.tgzcdmemcache-2.2.6phpize
./configure--enable-memcache
make
makeinstall
Installingsharedextensions:/usr/lib64/php/modules/
若找不到phpize,则安装php53-devel-5.3.5-1.el5.x86_64.rpm,可能还需要先安装autoconf213
yuminstallautoconf213
rpm-ivhphp53-devel-5.3.5-1.el5.x86_64.rpm
在/etc/php.ini中把memcache.so加上去
extension_dir="/usr/lib64/php/modules/"
extension=memcache.so
memcache有个图形化管理工具,叫memadmin。