部署一个http服务

部署一个http服务

1.配置yum源

/etc/yum.repo.d/目录下创建rhel.repo文件并添加yum源

[root@a ~]# vi /etc/yum.repos.d/rhel.repo

文件内容如下:

[rhel]
name=rhel 7.7
baseurl=http://10.24.69.0/rhel7.7/
enabled=1
gpgcheck=1
gpgkey=http://10.24.69.0/rhel7.7/RPM-GPG-KEY-redhat-release
2.安装httpd服务
[root@a ~]# yum install httpd -y

等待安装完成后
启动服务并加入开机自启动

[root@a ~]# systemctl start httpd
[root@a ~]# systemctl enable httpd

关闭防火墙和SELinux

 
 

你可能感兴趣的:(Linux运维)