安装memcache客户端
[email=root@tonyvicky]root@tonyvicky[/email]:# tar vxzf memcache-1.5.tgz
root@tonyvicky:# cd memcache-1.5
root@tonyvicky:# /usr/local/php/bin/phpize
root@tonyvicky:# ./configure --enable-memcache --with-php-config=/usr/local/php/bin/php-config --with-zlib-dir
root@tonyvicky:# make
root@tonyvicky:# make install
==作为动态模块安装==
/usr/local/php/bin/phpize
./configure –with-php-config=/usr/local/php/bin/php-config
make
make install
cd /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613
cp memcache.so ../
修改php.ini模块.加载memcache
cp php.ini-dist /etc/php.ini
vi /etc/php.ini
extension_dir = "/usr/lib64/php/modules"
extension = "memcache.so"
$ ./configure --prefix=/usr/local/apache --with-mpm=worker --enable-so --enable-rewrite --enable-expires --enable-headers --enable-deflate --disable-actions --disable-userdir --disable-imap --disable-cgi --disable-asis
这是apache
# vi /usr/local/apache2/conf/httpd.conf
在httpd.conf文件中,添加(应该将以下两句添加在其他AddType之后)
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
确保文件中有以下一句话,没有就自己添加在所有LoadModule之后:
LoadModule php5_module modules/libphp5.so
把index.php加入以下DirectoryIndex后面
DirectoryIndex index.php index.html index.html.var
好了,在vi中使用":wq"保存httpd.conf文件,退出vi。
./configure '--prefix=/usr/local/php' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-mysql=/usr/local/mysql' '--with-gd' '--with-zlib' '--with-iconv' '--with-jpeg-dir' '--with-png-dir' '--enable-ftp' '--with-freetype-dir=/usr/local' '--enable-mbstring'
这是php
4.1.MYSQL安装配置过程
Mysql版本:mysql-5.1.22-rc-linux-x86_64-icc-glibc23
4.1.1.#解压源码包
#tar -zxvf mysql-5.1.22-rc-linux-x86_64-icc-glibc23.tar.gz
4.1.2.#拷贝mysql到/home下
# mv mysql-5.1.22-rc-linux-x86_64-icc-glibc23 /home/
4.1.3.#创建/usr/local/mysql 链接到/home下的mysql程序目录
#ln -s /home/mysql-5.1.22-rc-linux-x86_64-icc-glibc23 /usr/local/mysql
4.1.4.#创建Mysql用户组和用户
#groupadd mysql
# useradd mysql -g mysql
4.1.5.为mysql安装目录配置权限
# cd /usr/local/mysql
# chown -R root .
# chown -R mysql data
# chgrp -R mysql .
4.1.6.#初始化数据库
# scripts/mysql_install_db --user=mysql
# /usr/local/mysql/bin/mysqld_safe --user=mysql &
# cp support-files/mysql.server /etc/rc.d/init.d/mysqld
4.1.7.#给与 /etc/rc.d/init.d/mysqld 执行权限(如果没有)
# chown root:root /etc/rc.d/init.d/mysqld
# chmod 755 /etc/rc.d/init.d/mysqld
4.1.8.#拷贝my.cnf文件
# cp /etc/my.cnf /etc/my.cnf.bak (备份)
# cp ./support-files/my-huge.cnf /etc/my.cnf
4.1.9.启动mysql测试
# /etc/init.d/mysqld start
#设置MYSQL密码
#/usr/local/mysql/bin/mysqladmin -uroot password 密码
To do so, start the server, then issue the following commands:
./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
See the manual for more instructions.
You can start the MySQL daemon with:
cd . ; ./bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl
Please report any problems with the ./bin/mysqlbug script!