# CentOS 安装 Apache 服务器

**URL:** <https://www.isharkfly.com/t/centos-apache/10438>\
**Category:** DevOps\
**Created:** [February 8, 2012, 4:41am UTC](https://www.isharkfly.com/t/centos-apache/10438 "2012-02-08T04:41:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![honeymoose](https://www.isharkfly.com/user_avatar/www.isharkfly.com/honeymoose/32/20796_2.png) [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Post date:** [February 8, 2012, 4:41am UTC](https://www.isharkfly.com/t/centos-apache/10438/1 "2012-02-08T04:41:14Z")

</div>

在服务器端执行下面的命令：`[root@bug ~]# yum install httpd`服务器输出：[code][root@bug ~]# yum install httpd  
Loaded plugins: fastestmirror  
Loading mirror speeds from cached hostfile

- base: [mirrors.sonic.net](http://mirrors.sonic.net)
- extras: mirror.hmc.edu
- updates: [mirrors.sonic.net](http://mirrors.sonic.net)  
Setting up Install Process  
Resolving Dependencies  
 → Running transaction check  
—\> Package httpd.x86\_64 0:2.2.3-53.el5.centos.3 set to be updated  
 → Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd  
 → Processing Dependency: libapr-1.so.0()(64bit) for package: httpd  
 → Running transaction check  
—\> Package apr.x86\_64 0:1.2.7-11.el5\_6.5 set to be updated  
—\> Package apr-util.x86\_64 0:1.2.7-11.el5\_5.2 set to be updated  
 → Processing Dependency: libpq.so.4()(64bit) for package: apr-util  
 → Running transaction check  
—\> Package postgresql-libs.x86\_64 0:8.1.23-1.el5\_7.3 set to be updated  
 → Finished Dependency Resolution

Dependencies Resolved

# ==================================================================================================================================== Package Arch Version Repository Size

Installing:  
httpd x86\_64 2.2.3-53.el5.centos.3 updates 1.2 M  
Installing for dependencies:  
apr x86\_64 1.2.7-11.el5\_6.5 base 119 k  
apr-util x86\_64 1.2.7-11.el5\_5.2 base 79 k  
postgresql-libs x86\_64 8.1.23-1.el5\_7.3 updates 197 k

# Transaction Summary

Install 4 Package(s)  
Upgrade 0 Package(s)

## Total download size: 1.6 M Is this ok [y/N]: y Downloading Packages: (1/4): apr-util-1.2.7-11.el5\_5.2.x86\_64.rpm | 79 kB 00:00 (2/4): apr-1.2.7-11.el5\_6.5.x86\_64.rpm | 119 kB 00:00 (3/4): postgresql-libs-8.1.23-1.el5\_7.3.x86\_64.rpm | 197 kB 00:00 (4/4): httpd-2.2.3-53.el5.centos.3.x86\_64.rpm | 1.2 MB 00:01

Total 389 kB/s | 1.6 MB 00:04  
Running rpm\_check\_debug  
Running Transaction Test  
Finished Transaction Test  
Transaction Test Succeeded  
Running Transaction  
Installing : apr 1/4  
Installing : postgresql-libs 2/4  
Installing : apr-util 3/4  
Installing : httpd 4/4

Installed:  
httpd.x86\_64 0:2.2.3-53.el5.centos.3

Dependency Installed:  
apr.x86\_64 0:1.2.7-11.el5\_6.5 apr-util.x86\_64 0:1.2.7-11.el5\_5.2 postgresql-libs.x86\_64 0:8.1.23-1.el5\_7.3

Complete!  
[root@bug ~]# [/code]
