apr
# ./configure --prefix=/usr/local/apr
# make && make install
apr-util
# ./configure \
--prefix=/usr/local/apr-util \
--with-apr=/usr/local/apr/bin/apr-1-config
# make && make install
pcre
./configure --prefix=/usr/local/pcre
make && make install
httpd
# ./configure \
--prefix=/usr/local/apache2 \
--with-included-apr \
--with-apr=/home/apr-1.5.1 \
--with-apr-util=/home/apr-util-1.5.3 \
--enable-so \
--enable-mods-shared=most \
--with-pmp=worker \
--with-pcre=/usr/local/pcre \
--with-ssl \
--enable-ssl \
--enable-rewrite
# make && make install
/usr/local/apache2/bin/apachectl -k start 启动apache
/usr/local/apache2/bin/apachectl -k stop/restart 停止或重启apache
php5
# ./configure \
--prefix=/usr/local/php \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-mysql \
--with-mysqli \
--with-pdo-mysql \
--with-curl \
--with-mcrypt \
--enable-mbstring \
--with-iconv \
--with-freetype \
--with-gd \
--with-jpeg \
--with-png \
--enable-sockets \
--with-zlib \
--enable-zip \
--enable-soap \
--enable-shared \
--with-xmlprc \
--with-libxml \
--enable-xml \
--enable-bcmath \
--with-openssl
# make && make install
修改httpd.conf,添加如下现行
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php
要重启apache。
memecache
# /usr/local/php/bin/pecl install memcache
将上面生成的memcache.so添加到php.ini文件中,像这样:
extension=”/usr/local/php/lib/php/extensions/no-debug-zts-20100525/memcache.so”
eAccelerator
# ./configure \
--enable-eaccelerator=shared \
--with-php-config=/usr/local/php/bin/php-config
|