apache 报错解决

回复 收藏
  1. 1、useradd apache ; echo "apache" | passwd --stdin apache
  2. 2、tar zxf httpd-2.4.10.tar.gz
  3. 3、cd httpd-2.4.10
  4. 4、./configure \
  5. --prefix=/usr/local/apache \
  6. --enable-so \
  7. --enable-cgi \
  8. --enable-rewrite
  9. 报错
  10. checking for APR... no
  11. configure: error: APR not found.  Please read the documentation.
  12. 解决
  13. tar zxf apr-1.5.1.tar.gz
  14. cd apr-1.5.1
  15. ./configure \
  16. --prefix=/usr/local/apr
  17. make ; make install
  18. 5、./configure \
  19. --prefix=/usr/local/apache \
  20. --enable-so \
  21. --enable-cgi \
  22. --enable-rewrite \
  23. --with-apr=/usr/local/apr
  24. 报错
  25. checking for APR-util... no
  26. configure: error: APR-util not found.  Please read the documentation
  27. 解决
  28. tar zxf apr-util-1.5.4.tar.gz
  29. cd apr-util-1.5.4
  30. ./configure \
  31. --prefix=/usr/local/apr-util \
  32. --with-apr=/usr/local/apr/
  33. make ; make install
  34. 6、./configure \
  35. --prefix=/usr/local/apache \
  36. --enable-so \
  37. --enable-cgi \
  38. --enable-rewrite \
  39. --with-apr=/usr/local/apr \
  40. --with-apr-util=/usr/local/apr-util/
  41. 报错
  42. checking for pcre-config... false
  43. configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
  44. 解决
  45. tar zxf pcre-8.30.tar.gz
  46. cd pcre-8.30
  47. ./configure --prefix=/usr/local/pcre
  48. make ; make install
  49. 7、./configure \
  50. --prefix=/usr/local/apache \
  51. --enable-so \
  52. --enable-cgi \
  53. --enable-rewrite \
  54. --with-apr=/usr/local/apr \
  55. --with-apr-util=/usr/local/apr-util/ \
  56. --with-pcre=/usr/local/pcre/
  57. make ; make install
  58. 8、/usr/local/apache/bin/apachectl start
  59. 警告
  60. AH00557: httpd: apr_sockaddr_info_get() failed for study.localhost.localdomain
  61. AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
  62. 解决
  63. vim /usr/local/apache/conf/httpd.conf
  64. ServerName 127.0.0.1:80  # 190 行的位置加入此行
  65. /usr/local/apache/bin/apachectl restart
  66. 9、netstat -lnpt | grep :80
  67. tcp        0      0 :::80                       :::*                        LISTEN      39094/httpd
  68. ## apache 成功启动
  69. 10、vim /etc/sysconfig/iptables  # 防火墙开放 80 端口
  70. -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
  71. service iptables restart
  72. 11、客户端访问 http://ip
2014-12-05 22:17 举报
已邀请:
0

kismyl2014

赞同来自:

学习了 安装的时候完全是按INSTALL 来操作的 很顺利  也缺少了解决问题的经验
0

丁张龙

赞同来自:

看看

回复帖子,请先登录注册

退出全屏模式 全屏模式 回复
评分
可选评分理由: