Linux安裝httpd52.4.10

來源:互聯網
上載者:User

標籤:

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

Linux安裝httpd52.4.10

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.