Linux安装Apache服务器

作者:Kinglong    发表时间:2022-09-14 09:14   

关键词:See "systemctl status httpd.service" and "journalctl -xe" for details  

一、安装工具

yum install epel-release

yum install dnf

二、安装Apache

1.检查是否安装了Apache服务器软件

rpm -qa | grep -i httpd

2.卸载

dnf remove httpd*

3.安装

dnf -y install httpd*

4.启动httpd服务程序

systemctl start httpd

systemctl enable httpd

5.报错处理

Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.


查看80端口是否被占用,如果被占用,修改/etc/httpd/conf/httpd.conf下的监听端口。例如Listen 80 这一行改为Listen 8080。