apache 安装
来源:互联网 发布:js中top 编辑:程序博客网 时间:2024/06/07 12:46
1.下载 apache
http://mirror.bit.edu.cn/apache/httpd/
2.安装编译依赖包
yum install -y zlib-devel pcre pcre-devel apr apr-devel gcc
3.解压 编译 apche
# tar zxf httpd-2.2.31.tar.gz
# cd httpd-2.2.31
# ./configure \
--prefix=/usr/local/apache2 \--with-included-apr \--enable-so \--enable-deflate=shared \--enable-expires=shared \--enable-rewrite=shared \--with-pcre
# make && make install
4.启动
# /usr/local/apache2/bin/apachectl start
报错:
httpd: apr_sockaddr_info_get() failed for shiwei
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
原因:这个问题应该是没有在 /etc/httpd/conf/httpd.conf 中设定 ServerName。所以apache会用主机上的名称来取代,首先会去找 /etc/hosts 中有没有主机的定义。
解决办法:
(1)可以设定httpd.conf文件中的 ServerName,如下:ServerName localhost:80
(2)在 /etc/hosts 中填入自己的主机名称 bogon,如下:127.0.0.1 shiwei (用户名称)
报错:/usr/local/apache2/bin/apachectl: line 78: 17303 Segmentation fault (core dumped) $HTTPD -k $AR解决:重装 apache5.选项:1)列出静态模块/usr/local/apache2/bin/apachectl -M动态模块在 /apache2/modules/ 目录下静态模块在 /apache2/bin/httpd 里面2)列出静态模块 .c/usr/local/apache2/bin/apachectl -l3)测试配置文件/usr/local/apache2/bin/apachectl -t4)load 配置文件/usr/local/apache2/bin/apachectl graceful
0 0
- Apache安装图解 Apache
- 安装apache
- 安装Apache
- apache安装
- Apache安装
- apache 安装
- 安装Apache
- 安装apache
- 安装Apache
- 安装Apache
- apache 安装
- 安装apache
- apache安装
- 安装 Apache
- apache安装
- apache安装
- 安装Apache
- 安装apache
- Android AutoCompleteTextView
- hdu5318 The Goddess Of The Moon(dp+矩阵)
- odoo开发domain的使用
- 安装 php
- PowerDesigner(六)-物理数据模型(PDM逆向工程)
- apache 安装
- GridView显示图片重复问题
- eclipse和myeclipse文件折叠方法
- MySQL触发器使用详解
- 几个经典的动态规划的算法
- 用户认证
- Linux-11-搭建学习Linux的系统环境说明(L003-25)
- 可信计算-可信度量-度量的起点
- 【matlab】雷达截面积(Radar Cross Section,RCS)(MATLAB部分仿真+Code)