柔中带刚,刚中带柔,淫荡中富含柔和,刚猛中荡漾风骚,无坚不摧,无孔不入!
全部博文(1669)
分类: 系统运维
2011-12-26 18:33:44
搞了半天终于在服务器上搭好了三者,呼呼啊。 留下整个过程中的一些记录,以飨后人……
===================Apache===============
download httpd-2.2.3-45.el5.centos.1.x86_64.rpm
[root@localhost zhanggl]# rpm -ivh httpd-2.2.3-45.el5.centos.1.x86_64.rpm
[root@localhost zhanggl]# cd /etc/httpd/
===================PHP=================
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.rpm php53-gd-5.3.5-1.el5.x86_64.rpm
[root@localhost php-5.3.5-rpm]# rpm -ivh php53-mysql-5.3.5-1.el5.x86_64.rpm
error: Failed dependencies: libmysqlclient.so.15()(64bit) is needed by php53-mysql-5.3.5-1.el5.x86_64 libmysqlclient.so.15(libmysqlclient_15)(64bit) is needed by php53-mysql-5.3.5-1.el5.x86_64 下载mysql-shared-compat来解决
[root@localhost php-5.3.5-rpm]# rpm -ivh MySQL-shared-compat-5.5.15-1.rhel5.x86_64.rpm
[root@localhost php-5.3.5-rpm]# rpm -ivh php53-mysql-5.3.5-1.el5.x86_64.rpm
Preparing... ########################################### [100%] 1:php53-mysql ########################################### [100%] 配置文件:/etc/php.ini
====================Mysql===============
wget ftp://ftp.ntu.edu.tw/pub/MySQL/Downloads/MySQL-5.5/MySQL-client-5.5.15-1.rhel5.x86_64.rpm
wget ftp://ftp.stu.edu.tw/pub/Unix/Database/Mysql/Downloads/MySQL-5.5/MySQL-server-5.5.15-1.rhel5.x86_64.rpm 执行安装命令 rpm -ivh MySQL-server-5.5.15-1.rhel5.x86_64.rpm rpm -ivh MySQL-client-5.5.15-1.rhel5.x86_64.rpm 安装完以后,就可以启动了 service mysql start service mysql stop service mysql restart 修改密码
./mysqladmin -u root password ‘passwd’
开启远程访问mysql
grant all privileges on *.* to identified by 'passwd'; grant all privileges on *.* to identified by 'passwd';
mysql> flush privileges;
mysql> select * from mysql.user;
====================memcache===============
libevent-2.0.12-stable.tar.gz
memcached-1.4.6.tar.gz
memcache-2.2.6.tgz
2.先安装libevent: # cd libevent-2.0.12-stable # ./configure –prefix=/usr
4.安装memcached,同时需要安装中指定libevent的安装位置: # cd memcached-1.4.6 # ./configure –with-libevent=/usr 安装完成后会把memcached放到 /usr/local/bin/memcached 启动memcached: /usr/local/bin/memcached -d -m 10 -u root -l 127.0.0.1 -p 12000 -c 256 -P /tmp/memcached.pid 2.安装PHP的memcache扩展tar vxzf memcache-2.2.6.tgzcd memcache-2.2.6phpize ./configure --enable-memcache make make install Installing shared extensions: /usr/lib64/php/modules/ 若找不到phpize,则安装php53-devel-5.3.5-1.el5.x86_64.rpm,可能还需要先安装autoconf213 yum install autoconf213 rpm -ivh php53-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。 |