rpm安装httpd,源码安装php关于--with-apxs2参数的问题

<p>再生产环境上什么需求都会有,这不要在用yum安装的httpd上编译php,之前做的都是要么都是yum安装要么都是编译安装。想想也都是一样的就直接用编译安装的方法做了。</p><pre class="brush:bash;toolbar:false">./configure(./configure--prefix=/usr/local/php--with-apxs2=/usr/local/apache2/bin/apxs--with-config-file-path=/usr/local/php/etc--with-mysql=/usr/local/mysql--with-libxml-dir--with-gd--with-jpeg-dir--with-png-dir--with-freetype-dir--with-iconv-dir--with-zlib-dir--with-bz2--with-openssl--with-mcrypt--enable-soap--enable-gd-native-ttf--enable-mbstring--enable-sockets--enable-exif--disable-ipv6)</pre><p>这才发现 --with-apxs2=/usr/local/apache2/bin/apxs 是编译安装apache才会有的。find / -name apxs 也没有找到 最后是铭哥帮我解决了问题。原来是要安装httpd-devel。 接下来就好解决了yum -y install httpd-devel ;</p><pre class="brush:bash;toolbar:false">[root@localhost~]#rpm-qlhttpd-devel|grepapxs /usr/sbin/apxs /usr/share/man/man8/apxs.8.gz</pre><p>其中/usr/sbin/apxs 就是--with-apxs2这个参数需要修改的配置 。</p><pre class="brush:bash;toolbar:false">./configure--prefix=/usr/local/php--with-apxs2=/usr/sbin/apxs--with-config-file-path=/usr/local/php/etc--with-mysql=/usr/local/mysql--with-libxml-dir--with-gd--with-jpeg-dir--with-png-dir--with-freetype-dir--with-iconv-dir--with-zlib-dir--with-bz2--with-openssl--with-mcrypt--enable-soap--enable-gd-native-ttf--enable-mbstring--enable-sockets--enable-exif--disable-ipv6 make&amp;&amp;makeinstall</pre><p>搞定~</p>
RangeTime:0.009545s
RangeMem:205.41 KB
返回顶部 留言