源码编译安装php都需要哪些基础安装包
发布网友
发布时间:2022-04-27 06:06
我来回答
共1个回答
热心网友
时间:2022-04-18 13:35
我上次搭建Nagios时记录的安装PHP步骤:
tar -zxvf libxml2-2.7.8.tar.gz
cd libxml2-2.7.8
./configure --prefix=/usr/local/libxml2
make
make install
tar -zxvf php-5.4.10.tar.gz
cd php-5.4.10
./configure \
--prefix=/usr/local/php \
--with-apxs2=/var/httpd/bin/apxs \
--with-libxml-dir=/usr/local/libxml2 \
--enable-maintainer-zts
make
make install
cp php.ini-development /usr/local/lib/php.ini
# cp /usr/lib/httpd/moles/libphp5.so /var/httpd/moles/
vi httpd.conf
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
# LoadMole php5_mole moles/libphp5.so
从你的报错信息来看,就挨个解决这三个问题吧:
Perl is not installed
apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs
Apache was not built using --enable-so (the apxs usage page is displayed)