赞
踩
当前负责的项目有几十台Linux服务器,在安装各类软件的时候需要大量依赖包,而项目部署的环境属于内网环境,与Internet网完全隔离,无法采用配置网络yum源的方式安装rpm包,直接在每台linux服务器上配置本地yum源也比较麻烦,而采用直接下载rpm包用rpm命令安装更是费时费力。所以在内网环境下采用配置局域网yum源,实现下载、安装、升级软件包有利于提高软件部署效率、保障软件版本一致性。
接下来将介绍基于http服务配置yum服务器的详细过程:
1、 环境及软件准备
Yum服务器主机:192.168.0.10 server10
需要配置yum源的主机:192.168.0.11 server11
操作系统:CentOS Linux7.1.1503
镜像包:CentOS-7-x86_64-DVD-1503-01.iso
2、 挂载镜像文件
3、 配置本地yum源
配置本地yum的目的主要为了方便搭建yum服务器时安装相关其他软件,如httpd、createrepo等。
4、 利用本地yum源安装依赖软件
5、 新建yum源目录并拷贝相关镜像文件:
6、启动http服务:
7、客户端yum源配置repo文件
8、附加内容createrepo常用命令
在上述步骤结束后,更新需要使用yum机器/etc/yum.repo目录中的文件为第四步中更改的内容,即可使用yum,yum 命令在这里就不说了,补充几个yum服务器常用的命令:
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。