标签:
1、
cd /mnt
tar zxvf httpd-2.4.10.tar.gz
./configure --prefix=/mnt/apache2 --enable-dav --enable-modules=so
APR version 1.4.0 or later is required, found 1.3.9
解决方案:安装APR与APR-utils
   909tar zxvf apr-1.5.1.tar.gz 
  910  cd apr-1.5.1
  911  ./configure 
  912  make
  913  make install
-------------
 916  tar zxvf apr-util-1.5.4.tar.gz 
  917  cd apr-util-1.5.4
  918  ./configure --with-apr=/usr/local/apr
  919  make
  920  make install
-------------------------------------------------
2、重新安装httpd
./configure --prefix=/mnt/apache2 --enable-dav --enable-modules=so --enable-maintainer-mode --enable-rewrite --with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr/bin/apu-1-config
pcre缺少,找不到
解决方案:yum install pcre-devel -y
3、make
make[3]: *** [shared-build-recursive] Error 1/usr/bin/ld: /usr/local/lib/libz.a(crc32.o): relocation R_X86_64_32 against `.rodata‘ can not be used when making a shared object; recompile with -fPIC
解决方案:以64位的方式重新编译zlib
 961  tar zxvf zlib-1.2.3.tar.gz 
  962  cd zlib-1.2.3
  963  CFLAGS="-O3 -fPIC" ./configure 
  964  make
  965  make install
  966  make clean
4、最后重新编译一下
  967  cd ..
  968  cd httpd-2.4.10
  969  ./configure --prefix=/mnt/apache2 --enable-dav --enable-maintainer-mode --enable-rewrite --with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr/bin/apu-1-config
  970  make
  971  make install
  972  pstree -p
5、启动/mnt/apache2/bin/apachectl start
httpd: Could not reliably determine the server‘s fully qualified domain name
解决方案: 在Apache的安装目录下的hhtpd。conf文件修改如下【  cd apache2/conf  ls一下】
   (1) ServerName localhost:80    这一行前面的注释去掉即可。
疑问:是不是httpd以这种方式编译,就什么问题也没有
./configure --prefix=/usr/local/apache2 --enable-dav --enable-modules=so
参考文章http://www.cnblogs.com/bluewelkin/p/4110759.html
--------------------------------------------------------------------------------
+--------------------------------------------------------------------+
| License:                                                           |
| This software is subject to the PHP License, available in this     |
| distribution in the file LICENSE.  By continuing this installation |
| process, you are bound by the terms of this license agreement.     |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point.                            |
+--------------------------------------------------------------------+
Thank you for using PHP.
config.status: creating php5.spec
config.status: creating main/build-defs.h
config.status: creating scripts/phpize
config.status: creating scripts/man1/phpize.1
config.status: creating scripts/php-config
config.status: creating scripts/man1/php-config.1
config.status: creating sapi/cli/php.1
config.status: creating sapi/cgi/php-cgi.1
config.status: creating ext/phar/phar.1
config.status: creating ext/phar/phar.phar.1
config.status: creating main/php_config.h
config.status: executing default commands
标签:
原文地址:http://www.cnblogs.com/bluewelkin/p/4295627.html