RHEL7 配置FTP yum 源

来源:互联网 发布:广州市云润大数据 编辑:程序博客网 时间:2024/06/03 23:07

 

2、接下来配置客户端

CLIENT的目录/etc/yum.repos.d/创建文件rhel7.repo ,配置本地yum

cd /etc/yum.repos.d/   #进入yum配置目录 

touch  rhel7.repo   #建立yum配置文件 

vim  rhel7.repo   #编辑配置文件,添加以下内容 

[rhel-yum]

name=rhel7   #自定义名称 

baseurl=ftp://192.168.1.6/pub/Packages #ftp访问路径 

enabled=1   #启用yum源,0为不启用,1为启用 

gpgcheck=0  #检查GPG-KEY0为不检查,1为检查 

:wq! #保存退出 

(以下为示例,ip地址请自行修改)

4、、CLIENT测试使用yum命令自动安装软件

yum clean all   #清除yum缓存 

yum makecache  #缓存本地yum源中的软件包信息

yum install httpd   #安装apache 

rpm -ql httpd  #查询所有安装httpd的目录和文件 

systemctl start httpd.service  #启动apache 

systemctl stop httpd.service  #停止apache 

systemctl restart httpd.service  #重启apache 

systemctl enable httpd.service  #设置开机启动 

RHEL 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙。

5、通过yum安装GUI图形界面# yum -y groupinstall "Server with GUI"可以执行startx看下效果。

      通过yum卸载软件 yum -y remove httpd(移除httpd软件)