安装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. git flow 的使用

     在这里主要讲一下我在项目中用到的关于gitflow的使用方法.   公司的项目中,专门有一台用来存放版本号库的server,路径是在默认的安装文件夹/opt/git/,那么在使用的时候,假设你是 ...

  2. 从iReport至Jaspersoft Studio

    这篇文章同步到http://www.waylau.com/from-ireport-to-jaspersoft-studio/ 从5.5版本号開始,Jaspersoft Studio将代替iRepor ...

  3. WPF-19:分享一个样式(左右滑动选中的checbox)

    首先看下效果. 选中: 不选中 样式: <Style x:Key="CheckStyle" TargetType="{x:Type CheckBox}"& ...

  4. hdu1712(分组背包)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1712 分析: 典型的分组背包问题,如果不会的可以看一下背包九讲. 看下背包九讲中的描述: for 所有 ...

  5. WPF自定义圆形按钮样式资源文件

    <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" x ...

  6. LVS+Keepalived实现高可用负载均衡(转)

    LVS+Keepalived实现高可用负载均衡   一.原理         1.概要介绍         如果将TCP/IP划分为5层,则Keepalived就是一个类似于3~5层交换机制的软件,具 ...

  7. Linux内核——进程管理与调度

    进程的管理与调度 进程管理 进程描写叙述符及任务结构 进程存放在叫做任务队列(tasklist)的双向循环链表中.链表中的每一项包括一个详细进程的全部信息,类型为task_struct,称为进程描写叙 ...

  8. SVNKIT一段代码的分析

    打印SVNkit版本库中的结构: 函数如下: 调用方法如下: listEntries(repository, ""); System.out.println("XXXXX ...

  9. Google Earth数据存储、管理、表现及开发机制

    Google Earth数据存储.管理.表现及开发机制 一.    Google Earth(Map)介绍 1.1    Google Earth介绍 在众多的地理信息服务提供商中,Google是较早 ...

  10. Android系统各版本号及代号

    Android系统各版本号及代号 版本 版本号代号 公布日期 API Android 1.0 阿童木 1 Android 1.1 发条机器人 2008.9 2 Android 1.5 纸杯蛋糕 200 ...