您的位置:首页 > 理论基础 > 计算机网络

redhat7配置阿里云的yum源并安装httpd服务  

2016-05-27 10:02 381 查看
1.配置yum源
[base]
name=CentOS-$releasever - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7/os/x86_64/
gpgcheck=1
enabled=1
gpgkey=http://mirrors.aliyun.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7
2.更新yum源
yum update
yum upgrade
yum clear all
yum makecache
3.安装httpd服务
yum -y install httpd
4.启动httpd服务
systemctl start httpd.server
5.为了让其他的客户端能访问到httpd 服务,必须关闭selinux和允许其他的主机通过防火墙
setenforce 0
iptables -F
6.测试

注意:在/var/www/下查看是否有html文件,没有则自己添加一个即可。
还有在阿里云官方下载的repo包下载下来之后一直报错,上面的baseurl是我自己改过之后可以用的。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  配置 阿里云 redhat7