<b>Linux下编译PHP5.3 + Apache2.3</b>[服务器安全]
本文“<b>Linux下编译PHP5.3 + Apache2.3</b>[服务器安全]”是由七道奇为您精心收集,来源于网络转载,文章版权归文章作者所有,本站不对其观点以及内容做任何评价,请读者自行判断,以下是其具体内容:
先下子php5.3,apache2.3,apr,curl,apr-util,pcre等源码包了.Linux下安装历程以下:
1.安装预备.先安装工具包:
apr:
./configure --prefix=/usr/local/apr
make
make install
apr-util:
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make
make install
g++:
sudo apt-get install g++
pcer:
./configure --prefix=/usr/local/pcre
make
make install
curl:
./configure --prefix=/usr/local/curl
make
make install
2.安装apache.
apache:
./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre --enable-so
3.安装php.
php:
./configure --with-apxs2=/usr/local/apache2/bin/apxs --prefix=/usr/local/php5 --with-config-file-path=/usr/local/lib --with-zlib --with-curl=/usr/local/curl
在php安装历程中大概会有以下问题.
Installing PHP SAPI module: apache2handler
/usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apr/build-1/libtool' libphp5.la /usr/local/apache2/modules
/usr/local/apr/build-1/libtool --mode=install install libphp5.la /usr/local/apache2/modules/
libtool: install: install .libs/libphp5.lai /usr/local/apache2/modules/libphp5.la
libtool: install: install .libs/libphp5.a /usr/local/apache2/modules/libphp5.a
libtool: install: chmod 644 /usr/local/apache2/modules/libphp5.a
libtool: install: ranlib /usr/local/apache2/modules/libphp5.a
libtool: install: warning: remember to run `libtool --finish /home/ligl/src/php5/libs'
Warning! dlname not found in /usr/local/apache2/modules/libphp5.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /usr/local/apache2/modules/libphp5.so
chmod: cannot access `/usr/local/apache2/modules/libphp5.so': No such file or directory
apxs:Error: Command failed with rc=65536
在网上有很多人也碰到这个问题,可参考这里.按照最后的答案,应当是php软件包版本的问题,之前下载的是gz格局的,换成bz2格局一切正常.
以上是“<b>Linux下编译PHP5.3 + Apache2.3</b>[服务器安全]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:
本文地址: | 与您的QQ/BBS好友分享! |