1、环境准备
准备好一台可用联网的机器,并配置好在线epel源,在线epel源可用使用腾讯的:
# epel(RHEL7系列)
[root@localhost ~]# wget -O /etc/yum.repos.d/epel.repo http://mirrors.cloud.tencent.com/repo/epel-7.repo
参考:https://mirrors.cloud.tencent.com/help/epel.html
可以通过 yum info pssh
测试在线epel源:
[root@localhost ~]# yum info pssh
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Available Packages
Name : pssh
Arch : noarch
Version : 2.3.1
Release : 5.el7
Size : 49 k
Repo : epel/7/x86_64
Summary : Parallel SSH tools
URL : http://code.google.com/p/parallel-ssh/
License : BSD
Description : This package provides various parallel tools based on ssh and scp.
: Parallell version includes:
: o ssh : pssh
: o scp : pscp
: o nuke : pnuke
: o rsync : prsync
: o slurp : pslurp
可用看到pssh包的信息,说明配置成功。
2、下载安装制作工具包
[root@localhost ~]# yum install yum-utils createrepo xorriso
3、把epel源中的rpm包下载到本地(目前有13609个rpm包)
[root@localhost ~]# reposync -r epel -p /data/epel/
4、制作本地仓库
[root@localhost ~]# createrepo -v /data/epel
5、可以直接使用或制作成iso镜像文件
直接使用
[root@localhost yum.repos.d]# cat offline-epel.repo
[epel2]
name=epel3
baseurl=file:///data/epel
enabled=1
gpgcheck=0
制成镜像之后挂载使用
[root@localhost ~]# mkisofs -r -o /data/centos7-epel.iso /data/epel
6、使用测试
[root@localhost yum.repos.d]# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: Local-base epel2
Cleaning up list of fastest mirrors
Other repos take up 39 M of disk space (use --verbose for details)
[root@localhost yum.repos.d]# yum makecache
Loaded plugins: fastestmirror
Determining fastest mirrors
Local-base | 3.6 kB 00:00:00
epel2 | 2.9 kB 00:00:00
(1/7): Local-base/group_gz | 153 kB 00:00:00
(2/7): Local-base/primary_db | 3.3 MB 00:00:00
(3/7): Local-base/filelists_db | 3.3 MB 00:00:00
(4/7): Local-base/other_db | 1.3 MB 00:00:00
(5/7): epel2/primary_db | 6.8 MB 00:00:00
(6/7): epel2/other_db | 3.3 MB 00:00:00
(7/7): epel2/filelists_db | 12 MB 00:00:00
Metadata Cache Created
[root@localhost yum.repos.d]# yum info pssh
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Available Packages
Name : pssh
Arch : noarch
Version : 2.3.1
Release : 5.el7
Size : 49 k
Repo : epel2
Summary : Parallel SSH tools
URL : http://code.google.com/p/parallel-ssh/
License : BSD
Description : This package provides various parallel tools based on ssh and scp.
: Parallell version includes:
: o ssh : pssh
: o scp : pscp
: o nuke : pnuke
: o rsync : prsync
: o slurp : pslurp
参考:https://www.cnblogs.com/old-path-white-cloud/p/11653100.html