概述
CentOS6.4 中httpd Apache安装方法
[hsg@hsgpc html]$ whereis httpd
httpd: /usr/sbin/httpd /usr/sbin/httpd.event /usr/sbin/httpd.worker /etc/httpd /usr/lib64/httpd /usr/local/httpd /usr/share/man/man8/httpd.8.gz[hsg@hsgpc html]$ yum install httpd
已加载插件:fastestmirror, refresh-packagekit, security
你需要以 root 身份执行此命令。
[hsg@hsgpc html]$ su root
密码:
[root@hsgpc html]# yum -y install httpd*
已加载插件:fastestmirror, refresh-packagekit, security
设置安装进程
Loading mirror speeds from cached hostfile
* base: mirror.bit.edu.cn
* epel: mirrors.opencas.cn
* epel-testing: mirrors.opencas.cn
* extras: mirror.bit.edu.cn
* nux-dextop: li.nux.ro
* rpmfusion-free-updates: mirror.bjtu.edu.cn
* rpmfusion-nonfree-updates: mirror.bjtu.edu.cn
* updates: mirror.bit.edu.cn
包 httpd-2.2.15-47.el6.centos.x86_64 已安装并且是最新版本
包 httpd-tools-2.2.15-47.el6.centos.x86_64 已安装并且是最新版本
解决依赖关系
--> 执行事务检查
---> Package httpd-devel.x86_64 0:2.2.15-47.el6.centos will be 安装
--> 处理依赖关系 apr-util-devel,它被软件包 httpd-devel-2.2.15-47.el6.centos.x86_64 需要
--> 处理依赖关系 apr-devel,它被软件包 httpd-devel-2.2.15-47.el6.centos.x86_64 需要
---> Package httpd-itk.x86_64 0:2.2.22-7.el6 will be 安装
---> Package httpd-manual.noarch 0:2.2.15-47.el6.centos will be 安装
--> 执行事务检查
---> Package apr-devel.x86_64 0:1.3.9-5.el6_2 will be 安装
---> Package apr-util-devel.x86_64 0:1.3.9-3.el6_0.1 will be 安装
--> 处理依赖关系 openldap-devel,它被软件包 apr-util-devel-1.3.9-3.el6_0.1.x86_64 需要
--> 处理依赖关系 expat-devel,它被软件包 apr-util-devel-1.3.9-3.el6_0.1.x86_64 需要
--> 执行事务检查
---> Package expat-devel.x86_64 0:2.0.1-11.el6_2 will be 安装
---> Package openldap-devel.x86_64 0:2.4.40-7.el6_7 will be 安装
--> 处理依赖关系 cyrus-sasl-devel >= 2.1,它被软件包 openldap-devel-2.4.40-7.el6_7.x86_64 需要
--> 执行事务检查
---> Package cyrus-sasl-devel.x86_64 0:2.1.23-15.el6_6.2 will be 安装
--> 完成依赖关系计算
依赖关系解决
=====================================================================================================
软件包 架构 版本 仓库 大小
=====================================================================================================
正在安装:
httpd-devel x86_64 2.2.15-47.el6.centos updates 154 k
httpd-itk x86_64 2.2.22-7.el6 epel 137 k
httpd-manual noarch 2.2.15-47.el6.centos updates 787 k
为依赖而安装:
apr-devel x86_64 1.3.9-5.el6_2 base 176 k
apr-util-devel x86_64 1.3.9-3.el6_0.1 base 69 k
cyrus-sasl-devel x86_64 2.1.23-15.el6_6.2 base 303 k
expat-devel x86_64 2.0.1-11.el6_2 base 120 k
openldap-devel x86_64 2.4.40-7.el6_7 updates 1.1 M
事务概要
=====================================================================================================
Install 8 Package(s)
总下载量:2.8 M
Installed size: 12 M
下载软件包:
(1/8): apr-devel-1.3.9-5.el6_2.x86_64.rpm | 176 kB 00:00
(2/8): apr-util-devel-1.3.9-3.el6_0.1.x86_64.rpm | 69 kB 00:00
(3/8): cyrus-sasl-devel-2.1.23-15.el6_6.2.x86_64.rpm | 303 kB 00:00
(4/8): expat-devel-2.0.1-11.el6_2.x86_64.rpm | 120 kB 00:00
(5/8): httpd-devel-2.2.15-47.el6.centos.x86_64.rpm | 154 kB 00:00
(6/8): httpd-itk-2.2.22-7.el6.x86_64.rpm | 137 kB 00:00
(7/8): httpd-manual-2.2.15-47.el6.centos.noarch.rpm | 787 kB 00:00
(8/8): openldap-devel-2.4.40-7.el6_7.x86_64.rpm | 1.1 MB 00:00
-----------------------------------------------------------------------------------------------------
总计 861 kB/s | 2.8 MB 00:03
运行 rpm_check_debug
执行事务测试
事务测试成功
执行事务
正在安装 : apr-devel-1.3.9-5.el6_2.x86_64 1/8
正在安装 : expat-devel-2.0.1-11.el6_2.x86_64 2/8
正在安装 : cyrus-sasl-devel-2.1.23-15.el6_6.2.x86_64 3/8
正在安装 : openldap-devel-2.4.40-7.el6_7.x86_64 4/8
正在安装 : apr-util-devel-1.3.9-3.el6_0.1.x86_64 5/8
正在安装 : httpd-devel-2.2.15-47.el6.centos.x86_64 6/8
正在安装 : httpd-itk-2.2.22-7.el6.x86_64 7/8
正在安装 : httpd-manual-2.2.15-47.el6.centos.noarch 8/8
Verifying : httpd-manual-2.2.15-47.el6.centos.noarch 1/8
Verifying : httpd-devel-2.2.15-47.el6.centos.x86_64 2/8
Verifying : apr-devel-1.3.9-5.el6_2.x86_64 3/8
Verifying : httpd-itk-2.2.22-7.el6.x86_64 4/8
Verifying : openldap-devel-2.4.40-7.el6_7.x86_64 5/8
Verifying : apr-util-devel-1.3.9-3.el6_0.1.x86_64 6/8
Verifying : cyrus-sasl-devel-2.1.23-15.el6_6.2.x86_64 7/8
Verifying : expat-devel-2.0.1-11.el6_2.x86_64 8/8
已安装:
httpd-devel.x86_64 0:2.2.15-47.el6.centos httpd-itk.x86_64 0:2.2.22-7.el6
httpd-manual.noarch 0:2.2.15-47.el6.centos
作为依赖被安装:
apr-devel.x86_64 0:1.3.9-5.el6_2 apr-util-devel.x86_64 0:1.3.9-3.el6_0.1
cyrus-sasl-devel.x86_64 0:2.1.23-15.el6_6.2 expat-devel.x86_64 0:2.0.1-11.el6_2
openldap-devel.x86_64 0:2.4.40-7.el6_7
完毕!
[root@hsgpc html]# httpd -q
httpd: illegal option -- q
Usage: httpd [-D name] [-d directory] [-f file]
[-C "directive"] [-c "directive"]
[-k start|restart|graceful|graceful-stop|stop]
[-v] [-V] [-h] [-l] [-L] [-t] [-S]
Options:
-D name : define a name for use in <IfDefine name> directives
-d directory : specify an alternate initial ServerRoot
-f file : specify an alternate ServerConfigFile
-C "directive" : process directive before reading config files
-c "directive" : process directive after reading config files
-e level : show startup errors of level (see LogLevel)
-E file : log startup errors to file
-v : show version number
-V : show compile settings
-h : list available command line options (this page)
-l : list compiled in modules
-L : list available configuration directives
-t -D DUMP_VHOSTS : show parsed settings (currently only vhost settings)
-S : a synonym for -t -D DUMP_VHOSTS
-t -D DUMP_MODULES : show all loaded modules
-M : a synonym for -t -D DUMP_MODULES
-t : run syntax check for config files
[root@hsgpc html]# httpd -v
Server version: Apache/2.2.15 (Unix)
Server built: Aug 24 2015 17:52:49
[root@hsgpc html]# httpd -k stop
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[root@hsgpc html]# httpd -k stop
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
httpd (no pid file) not running
[root@hsgpc html]# httpd -k start
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[root@hsgpc html]# httpd -k start
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
httpd (pid 26514) already running
[root@hsgpc html]#
安装完后的web dir location: /var/www/html add html page file
config file location :/etc/httpd/conf/httpd.conf
最后
以上就是怕黑金针菇为你收集整理的CentOS6.4 中httpd Apache安装方法的全部内容,希望文章能够帮你解决CentOS6.4 中httpd Apache安装方法所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复