编译安装php-5.4和xcache-3.1.2
tar xf php-5.4.13.tar.bz2cd php-5.4.13
./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-openssl --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-mbstring --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml--enable-sockets --with-apxs2=/usr/local/apache/bin/apxs --with-mcrypt--with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --with-bz2--enable-maintainer-zts
make
make test
make intall
cp php.ini-production /etc/php.ini
编辑apache配置文件httpd.conf,以apache支持php
vim /etc/httpd/httpd.conf
1、添加如下二行
AddType application/x-httpd-php.php
AddType application/x-httpd-php-source.phps
2、定位至DirectoryIndex index.html
修改为:
DirectoryIndexindex.phpindex.html
tar xf xcache-3.1.2.tar.gz
cd xcache-3.1.2
phpize
./configure --enable-xcache --with-php-config=/usr/bin/php-config
make && make install
cp xcache.ini /etc/php.d/xcache.ini
vim /etc/php.d/xcache.ini
extension = /usr/lib/php/modules/xcache.so
支持一下
页:
[1]