更多: zhilu jiaocheng
安装 Apache 包
如果我们下载了 apache 包,我们可以以 root 用户身份使用 rpm 命令安装它。
# rpm -ivh httpd
如果我们配置了 yum 存储库,请使用推荐的方式安装 Apache httpd,例如:使用“yum install”命令。
# yum install httpd
注意:要获得特定版本,请将 httpd 替换为我们想要的版本。
示例:httpd-2.2.14-1.2.6.jdk6.ep5.el5.x86_64
将 httpd 安装为服务
使用以下命令在启动时启用 http 服务。
这将为运行级别 2,3,4 & 5 启用它:
# chkconfig httpd on
启动 httpd 服务:
# service httpd start
对于 RHEL 7
在 RHEL 7 中,我们可以使用 systemctl 命令启用该服务:
# systemctl enable httpd.service
在 RHEL 7 中,我们可以使用 systemctl 命令来启动服务:
# systemctl start httpd.service
解决方法
问题
如何安装 Apache 并配置 Apache httpd 作为服务运行?
日期:2020-09-17 00:16:34 来源:oir作者:oir