【Linux】红帽7搭建本地YUM源
2017-07-25 09:44
471 查看
RHEL7 配置yum 源
1、挂载DVD光盘到/mnt 因为配置时候路径名里面不能有空格,否则不能识别 [root@ mnt]# mount /dev/cdrom /mnt #提示只读文件系统无视
2、在目录/etc/yum.repos.d/创建文件文件名.repo
3、配置本地yum源
cd /etc/yum.repos.d/ #进入yum配置目录
touch rhel7.repo #建立yum配置文件
vim rhel7.repo #编辑配置文件,添加以下内容
[rhel-yum]
name=rhel7 #自定义名称
baseurl=file:///mnt#本地光盘挂载路径
enabled=1 #启用yum源,0为不启用,1为启用
gpgcheck=0 #检查GPG-KEY,0为不检查,1为检查
:wq! #保存退出
4、、测试使用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防火墙。
1、挂载DVD光盘到/mnt 因为配置时候路径名里面不能有空格,否则不能识别 [root@ mnt]# mount /dev/cdrom /mnt #提示只读文件系统无视
2、在目录/etc/yum.repos.d/创建文件文件名.repo
3、配置本地yum源
cd /etc/yum.repos.d/ #进入yum配置目录
touch rhel7.repo #建立yum配置文件
vim rhel7.repo #编辑配置文件,添加以下内容
[rhel-yum]
name=rhel7 #自定义名称
baseurl=file:///mnt#本地光盘挂载路径
enabled=1 #启用yum源,0为不启用,1为启用
gpgcheck=0 #检查GPG-KEY,0为不检查,1为检查
:wq! #保存退出
4、、测试使用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防火墙。
相关文章推荐
- 【Linux】红帽7搭建本地YUM源
- Linux中本地仓库yum源搭建的简要步骤
- 在linux上搭建本地yum源
- Redhat7 Linux 本地如何搭建yum源
- linux搭建本地YUM源配置详细步骤
- 搭建Linux本地yum源
- 红帽系列linux自行配置本地yum源
- Linux中如何搭建本地yum源
- linux虚拟机搭建本地yum源
- linux如何搭建本地YUM源
- linux服务器搭建本地yum源
- 搭建本地yum源(http方式) on Red Hat Enterprise Linux Server
- linux下利用iso文件搭建本地yum源
- linux搭建本地yum源
- Linux 本地yum源搭建和网络yum源搭建
- linux系统搭建本地yum源以及搭建第3方软件仓库
- 【Linux】搭建本地yum源
- 【Linux】红帽7搭建网络YUM源
- Linux运维学习之 ―― 搭建本地yum源
- 【Linux】红帽7搭建网络YUM源