1:下载

官网: http://www.apache.org/

官网下载很慢,从别的地方下载

2:安装

tar -zxvf /usr/local/httpd-2.2.9.tar.gz

cd /usr/local/httpd-2.2.9

./configure --prefix=/usr/local/apache --enable-so --enable-rewrite

make && make install

3:启动

cd /usr/local/apache/bin

./apachectl start

4:测试

一切顺利的话在ie浏览器输入http://ip就可以看到

It works!

就说明成功了


错误1:

httpd: apr_sockaddr_info_get() failed for show-interior
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
(98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs

解决办法:apache默认的80端口被占用了

vi /usr/local/apache/conf/httpd.conf (修改apache的主配置文件)

找到 Listen 80 这一句,修改80为90

重新启动

cd /usr/local/apache

./apachectl restart

在ie浏览器输入http://ip:90会看到It works!

错误2:

httpd: apr_sockaddr_info_get() failed for show-interior
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

解决办法:

vi /usr/local/apache/conf/httpd.conf
#ServerName www.example.com:80
把这句改为
ServerName localhost:80

重新启动

错误3:  访问403拒绝访问(在115行)

<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
#Deny from all
Allow from all //允许访问
Options Indexes //显示目录
IndexOptions Charset=UTF-8 //设置字符集,防止乱码
</Directory>

错误4:  配置完了,不能访问

检查防火墙的配置

service iptables stop 关闭防火墙

Centos6.5安装apache的更多相关文章

  1. centos6 / centos7 安装apache

    =================centos6.1 安装apache===================== 安装: yum -y install httpd 启动 /etc/init.d/htt ...

  2. centos6.4安装Apache+MySQL+PHP

    一.安装 MySQL 首先来进行 MySQL 的安装.打开超级终端,输入: [root@localhost ~]# yum install mysql mysql-server 安装完毕,让 MySQ ...

  3. Centos6.5安装Apache ab性能测试工具

    ab简洁: ab是apache自带的压力测试工具,ab是apachebench命令的缩写. ab不仅可以对apache服务器进行网站访问压力测试,也可以对或其它类型的服务器进行压力测试. ab是一个h ...

  4. centos6.5安装Apache+MySQL+PHP

    一.安装 MySQL 首先来进行 MySQL 的安装.打开超级终端,输入: [root@localhost ~]# yum install mysql mysql-server 安装完毕,让 MySQ ...

  5. centos-6.5 安装apache

    1.避免端口.程序冲突.使用rpm卸载httpd [root@www /]# rpm -qa httpd #检查httpd的包 [root@www /]# rpm -e httpd --nodeps ...

  6. CentOS6.0(64位)安装Apache+PHP+Mysql教程,安装Magento(解决DOM,Mcrypt,GD问题)完整教程

    CentOS6.0(64位)安装Apache+PHP+Mysql教程,安装Magento(解决DOM,Mcrypt,GD问题)完整教程 0   Posted by :小黑 On : 2012 年 9 ...

  7. CentOS6.5安装LAMP环境APACHE的安装

    1.卸载apr.apr-util [root@centos6 LAMP]# yum remove apr apr-util 2.编译安装apr-1.5.1.tar.gz [root@centos6 L ...

  8. Centos6.7 编译安装 Apache PHP

    Centos6.7 编译安装 Apache PHP 原文地址:http://www.cnblogs.com/caoguo/p/4968039.html ##### Apache 编译安装 #### [ ...

  9. Centos6.7 安装zabbix+apache+mysql教程(第一篇)

    Centos6.7 安装zabbix+apache+mysql教程 blog地址: http://www.cnblogs.com/caoguo ### 基本包安装 ### [root@ca0gu0 ~ ...

随机推荐

  1. 使用 Composer 的时候提示输入Token (hidden):

    出现了Could not fetch https://api.github.com/ ...please create a GitHub OAuth token to go over the API ...

  2. osx中使用defaults

    有时候须要改动osx系统的一些默认设置,这时候会用到defaults命令,查看一下defaults的man文档,对defaults的解释例如以下: defaults - access the Mac ...

  3. python urllib2/urllib实现

    urllib2和urllib是Python中的两个内置模块,要实现HTTP功能,实现方式是以urllib2为主,urllib为辅 urllib2提供一个基础函数urlopen,通过向指定的url发出请 ...

  4. JSON工具类库: alibaba/fastjson 使用记录

    JSON工具类库: alibaba/fastjson 使用记录 一.了解JSON JSON标准规范中文文档: http://www.json.org/json-zh.html 最佳实践:http:// ...

  5. iOS RunLoop详解

    1. RunLoop简介 1.1 什么是RUnLoop 可以理解为字面的意思:Run表示运行,Loop表示循环.结合在一起就是运行的循环.通常叫做运行循环. RunLoop实际上是一个对象,这个对象在 ...

  6. 【转】Mysql之binlog日志说明及利用binlog日志恢复数据操作记录

    众所周知,binlog日志对于mysql数据库来说是十分重要的.在数据丢失的紧急情况下,我们往往会想到用binlog日志功能进行数据恢复(定时全备份+binlog日志恢复增量数据部分),化险为夷! 废 ...

  7. javascript之冒泡排序

    Array.prototype.bubble = function () { var temp; //第1轮比较求第一,第二轮求第二,以此类推(i<=数组成员的个数); for (var i = ...

  8. 前端框架之jQuery

    一 iQuery是什么 jQuery由美国人John Resig创建,至今已吸引了来自世界各地的众多 javascript高手加入其team jQuery是继prototype之后又一个优秀的Java ...

  9. mybatis-generator和TKmybatis的结合使用

    mybatis-generator可以自动生成mapper和entity文件,mybatis-generator有三种用法:命令行.eclipse插件.maven插件.这里使用的是maven插件方式, ...

  10. Python基础-configparser和hashlib模块

    configparser模块 import configparser config = configparser.ConfigParser() #将配置写入到文件 config[', 'Compres ...