tar -zxvf httpd-2.2.17.tar.gz
cd httpd-2.2.17
./configure –prefix=/usr/local/lib/apache –enable-so –enable-mods-shared=all –enable-rewrite=shared –enable-speling=shared
# make
# make install
wget http://cn.php.net/get/php-5.3.6.tar.gz/from/this/mirror
tar -zxvf php-5.3.6.tar.gz
cd php-5.3.6
./configure –prefix=/usr/local/php –with-mysql=/usr/local/mysql –with-apxs2=/usr/local/apache/bin/apxs –with-zlib –enable-mbstring –with-gd –with-libxml-dir=/usr/include/libxml2/libxml/ –enable-soap –enable-xml –with-mysqli –with-pdo-mysql –with-curl=/usr/include/curl –with-mcrypt –with-iconv
http://hi.baidu.com/tjhaocai/blog/item/05e24df3239acd5d342acc69.html
make ZEND_EXTRA_LIBS=’-liconv’
make install
cp php.ini-production /usr/local/php/lib/php.ini
vim /usr/local/apache/conf/httpd.conf
ServerName 127.0.0.1:80 (这个选项影响apache的启动)
支持index.php
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
支持php
AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
cd /usr/local/apache/
vim info.php
<?php
phpinfo();
/usr/local/apache/bin/apachectl start
http://221.122.114.23/info.php
安装php的memcache扩展
下载
wget http://pecl.php.net/get/memcache-3.0.6.tgz
tar -zxvf memcache-3.0.6.tgz
cd memcache-3.0.6
/usr/local/php/bin/phpize
./configure --enable-memcache --with -php-config=/usr/local/php/bin/php-config
make
# make install
安装完后会有类似这样的提示:
Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20050922/
把这个记住
然后修改php.ini
把
extension_dir = “./”
修改为
extension_dir = “/usr/local/php/lib/php/extensions/no-debug-non-zts-20050922/”
并添加一行
extension=memcache.so
打开.htaccess支持
http://meizhini.iteye.com/blog/185165