安装apache前确定已安装 apr,apr-util,pcre

一、安装apr

  1. [root@xt test]# tar -zxf apr-1.4.5.tar.gz
  2. [root@xt test]# cd  apr-1.4.5
  3. [root@xt apr-1.4.5]# ./configure --prefix=/usr/local/apr
  4. [root@xt apr-1.4.5]# make && make install

二、安装apr-util

  1. [root@xt test]# tar -zxf apr-util-1.3.12.tar.gz
  2. [root@xt test]# cd apr-util-1.3.12
  3. [root@xt apr-util-1.3.12]# ./configure --prefix=/usr/local/apr-util -with- apr=/usr/local/apr/bin/apr-1-config
  4. [root@xt apr-util-1.3.12]# make && make install

三、安装pcre

  1. [root@xt test]#unzip -o pcre-8.10.zip
  2. [root@xt test]#cd pcre-8.10
  3. [root@xt pcre-8.10]#./configure --prefix=/usr/local/pcre
  4. [root@xt pcre-8.10]#make && make install

**最后编译Apache时加上:

--with-apr=/usr/local/apr \

--with-apr-util=/usr/local/apr-util/ \

--with-pcre=/usr/local/pcre

四、安装apache

1. 下载httpd-2.2.9.tar.gz 源码安装包 

2.  #tar  -zxvfhttpd-2.2.9.tar 

  解压安装包,之后会出现 httpd-2.2.9 的文件夹,进入该文件夹。 

3.进入文件后: 

./configure --prefix=/usr/local//apache --with-apr=/usr/local/apr \

--with-apr-util=/usr/local/apr-util/ \

--with-pcre=/usr/local/pcre  --enable-so

设置安装目录和参数设置 

4. make 

5. make install 

6:/usr/local/apache/bin/apachectl start ,该命令用来启用apache。 

7. /usr/local/apache/bin/apachectl stop   

此时完成apache的安装

注:

一、问题apache启动错误"httpd:Could not reliably determine..."

启动apache遇到错误:httpd: Could not reliably determine the server's fully qualifieddomain name

[root@server httpd-2.2.4]# /usr/local/apache/bin/apachectl start

 

httpd: Could not reliably determine the server's fully qualified domain name,using 127.0.0.1 for ServerName

 

1)进入apache的安装目录:(视个人安装情况而不同) [root@server ~]# cd /usr/local/apache/conf

 

2)编辑httpd.conf文件,搜索"#ServerName",添加ServerName localhost:80

[root@server conf]# ls

extra  httpd.conf  magic  mime.types  original

[root@server conf]# vi httpd.conf

#ServerName www.example.com:80

ServerName localhost:80

3)再重新启动apache 即可。

[root@server ~]# /usr/local/apache/bin/apachectl restart

无法启动:

(13)Permission denied: AH00072: make_sock:could not bind to address [::]:80

(13)Permission denied: AH00072: make_sock:could not bind to address 0.0.0.0:80

no listening sockets available, shuttingdown

AH00015: Unable to open logs

切换到root,启动

CentOS 安装apache 及所需的 apr,apr-util,pcre的更多相关文章

  1. centos 安装apache 和 php5.6

    centos 安装 php5.6,安装前需要先安装数据库和apache 安装 apache2.4 安装基础依赖:# yum install gcc gcc-c++ glibc glibc-devel ...

  2. centos安装apache

    查询是否已安装apache:  rpm -qa httpd 安装apache: yum install httpd -y 查询: chkconfig httpd on 启动: service http ...

  3. CentOS 安装apache

    yum 安装apache yum –y install httpd 设置开机启动 chkconfig --levels 235 httpd on 启动 /etc/init.d/httpd start ...

  4. 阿里云 centos 安装apache和php

    mysql使用阿里云的rds httpd服务 1. 安装apr和apr-util 2. 安装 httpd apache.org,apr.apache.org 安装命令: ./configure --p ...

  5. [部署]CentOS安装apache

    环境 虚拟机:VMWare10.0.1 build-1379776 操作系统:CentOS7 64位 步骤 1.使用yum安装 yum install httpd httpd-devel 2.启动 a ...

  6. centos 安装apache activemq

    安装说明 安装环境:CentOS-6.3 安装方式:源码安装  软件:apache-tomcat-7.0.29.tar.gz下载地址http://activemq.apache.org/downloa ...

  7. Centos 安装Apache软件

    检查rpm    -qa    httpd [root@luozhonghua icons]# rpm    -qa   |grep  httpd httpd-2.2.15-30.el6.centos ...

  8. windows 下安装Apache httpd 只需三步

    1.下载 Apache 官网地址:http://httpd.apache.org/docs/current/platform/windows.html#down 找到这个, 看到这几个选项: Apac ...

  9. centOS安装apache服务器

    # yum install httpd 启动 systemctl start httpd 重启 systemctl restart httpd 停止 systemctl stop httpd

随机推荐

  1. Android照片墙完整版,的完美结合LruCache和DiskLruCache

    转载请注明出处:http://blog.csdn.net/guolin_blog/article/details/34093441 在上一篇文章其中,我们学习了DiskLruCache的概念和基本使用 ...

  2. GitHub 优秀Android 开源项目

    阅读目录 1.Xabber客户端 2.oschina客户端 3.手机安全管家 4.星座连萌 5.玲闹铃 6.魔乐盒 7.PWP日历 8.Apollo音乐播放器 9.夏普名片识别 10.高仿人人网 11 ...

  3. Codeforces Round #296 (Div. 2) A B C D

    A:模拟辗转相除法时记录答案 B:3种情况:能降低2,能降低1.不能降低分别考虑清楚 C:利用一个set和一个multiset,把行列分开考虑.利用set自带的排序和查询.每次把对应的块拿出来分成两块 ...

  4. [开源]C#二维码生成解析工具,可添加自定义Logo (转)

    二维码又称 QR Code,QR 全称 Quick Response,是一个近几年来移动设备上超流行的一种编码方式,它比传统的 Bar Code 条形码能存更多的信息,也能表示更多的数据类型:比如:字 ...

  5. UVA1455 - Kingdom(并查集 + 线段树)

    UVA1455 - Kingdom(并查集 + 线段树) 题目链接 题目大意:一个平面内,给你n个整数点,两种类型的操作:road x y 把city x 和city y连接起来,line fnum ...

  6. HTML学习笔记——各种居中对齐

    0.前言     水平居中基本方法--指定块的宽度并设定块的左右外边距为auto,上下外边距可取0,那么该块能够在父元素中水平居中. 样式例如以下: 1:margin:0px auto 2:margi ...

  7. SE 2014年5月5日

    如图配置 某企业网络规划图(三台交换设备/三台路由设备) 接入层 SW1 连接终端用户 汇聚层 SW2 SW3 核心层 R1 R2 R5 1. 如图 SW1 SW2 SW3 物理链路两两相连接,网络中 ...

  8. phantomjs,selenium,pyv8,pythonwebkit,,,,,,,,,,,,,

    Pyv8,PythonWebKit,Selenium,PhantomJS,Ghost.py 等等.... 快速构建实时抓取集群[searchtb] 定义:http://i.cnblogs.com/Ed ...

  9. 【Java探索道路安全系列:Java可扩展的安全架构】一间:Java可扩展的安全体系结构开始

    笔者:郭嘉 邮箱:allenwells@163.com 博客:http://blog.csdn.net/allenwells github:https://github.com/AllenWell [ ...

  10. 使用Visual Studio 创建可视Web Part部件

    使用Visual Studio 创建可视Web Part部件 可视Web Part部件是很强大的Web 部件.它提供内置设计器创建你的用户界面. 本文主要解说怎样使用Visual Studio 创建可 ...