看了网上很多教程,都是错误的,经过自己实验,总结以下方法
感谢https://my.oschina.net/u/1540325/blog/703485提供的方法,不过还是有问题的(rpm包有先后安装顺序)
以下是我的安装方法:
本实验2台机,一台Centos6,一台Centos7
Centos6上下载相应的rpm包传到Centos7上安装
在Centos6上下载相应的rpm包:
[root@localhost~]# yumdownloader fakechroot
Loadedplugins: fastestmirror
Loadingmirror speeds from cached hostfile
* base: mirrors.163.com
* elrepo: hkg.mirror.rackspace.com
* epel: ftp.cuhk.edu.hk
* extras: mirrors.163.com
* updates: mirrors.163.com
fakechroot-2.9-24.5.el6_1.1.x86_64.rpm | 23 kB 00:00
[root@localhost~]# yumdownloader fakechroot-libs
Loadedplugins: fastestmirror
Loadingmirror speeds from cached hostfile
* base: mirrors.163.com
* elrepo: hkg.mirror.rackspace.com
* epel: ftp.cuhk.edu.hk
* extras: mirrors.163.com
* updates: mirrors.163.com
fakechroot-libs-2.9-24.5.el6_1.1.x86_64.rpm | 23 kB 00:00
[root@localhost~]# yumdownloader fakeroot
Loadedplugins: fastestmirror
Loadingmirror speeds from cached hostfile
* base: mirrors.163.com
* elrepo: hkg.mirror.rackspace.com
* epel: ftp.cuhk.edu.hk
* extras: mirrors.163.com
* updates: mirrors.163.com
fakeroot-1.12.2-22.2.el6.x86_64.rpm | 73 kB 00:00
[root@localhost~]# yumdownloader fakeroot-libs
Loadedplugins: fastestmirror
Loadingmirror speeds from cached hostfile
* base: mirrors.163.com
* elrepo: hkg.mirror.rackspace.com
* epel: ftp.cuhk.edu.hk
* extras: mirrors.163.com
* updates: mirrors.163.com
fakeroot-libs-1.12.2-22.2.el6.x86_64.rpm | 23kB 00:00
[root@localhost~]# yumdownloaderfebootstrap-supermin-helper
Loadedplugins: fastestmirror
Loadingmirror speeds from cached hostfile
* base: mirrors.163.com
* elrepo: hkg.mirror.rackspace.com
* epel: ftp.cuhk.edu.hk
* extras: mirrors.163.com
* updates: mirrors.163.com
febootstrap-supermin-helper-3.21-4.el6.x86_64.rpm | 337 kB 00:00
[root@localhost~]# yumdownloader febootstrap
Loadedplugins: fastestmirror
Loadingmirror speeds from cached hostfile
* base: mirrors.163.com
* elrepo: hkg.mirror.rackspace.com
* epel: ftp.cuhk.edu.hk
* extras: mirrors.163.com
* updates: mirrors.163.com
./febootstrap-3.21-4.el6.x86_64.rpmalready exists and appears to be complete
[root@localhost~]# ll
total 716
-rw-------.1 root root 1098 Sep 20 17:13anaconda-ks.cfg
-rw-r--r--.1 root root 23576 Sep 26 2011fakechroot-2.9-24.5.el6_1.1.x86_64.r pm
-rw-r--r--.1 root root 23240 Sep 26 2011fakechroot-libs-2.9-24.5.el6_1.1.x86 _64.rpm
-rw-r--r--.1 root root 75112 Jul 3 2011fakeroot-1.12.2-22.2.el6.x86_64.rpm
-rw-r--r--.1 root root 23528 Jul 3 2011fakeroot-libs-1.12.2-22.2.el6.x86_64 .rpm
-rw-r--r--.1 root root 209020 Nov 25 2013febootstrap-3.21-4.el6.x86_64.rpm
-rw-r--r--.1 root root 345436 Nov 25 2013febootstrap-supermin-helper-3.21-4.e l6.x86_64.rpm
-rw-r--r--.1 root root 9913 Sep 20 17:13install.log
-rw-r--r--.1 root root 3091 Sep 20 17:11 install.log.syslog
[root@localhost ~]# tar zcpf all.tar.gz *.rpm
将这些rpm包传到Centos7上解压进行安装
安装:
这里需要注意的,用rpm –ivh *.rpm是无法安装成功的,这些包有安装顺序的:
[root@docker~]# rpm -ivh febootstrap-3.21-4.el6.x86_64.rpm
warning:febootstrap-3.21-4.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key IDc105b9de: NOKEY
error:Failed dependencies:
fakechroot >= 2.9-20 is needed byfebootstrap-3.21-4.el6.x86_64
fakeroot >= 1.11 is needed byfebootstrap-3.21-4.el6.x86_64
[root@docker~]# rpm -ivh fakechroot-2.9-24.5.el6_1.1.x86_64.rpm
warning:fakechroot-2.9-24.5.el6_1.1.x86_64.rpm: Header V3 RSA/SHA1 Signature, key IDc105b9de: NOKEY
Preparing... ################################# [100%]
Updating/ installing...
1:fakechroot-2.9-24.5.el6_1.1 ################################# [100%]
[root@docker~]# rpm -ivh fakeroot-1.12.2-22.2.el6.x86_64.rpm
warning:fakeroot-1.12.2-22.2.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key IDc105b9de: NOKEY
error:Failed dependencies:
fakeroot-libs = 1.12.2-22.2.el6 isneeded by fakeroot-1.12.2-22.2.el6.x86_64
[root@docker~]# rpm -ivh fakeroot-libs-1.12.2-22.2.el6.x86_64.rpm
warning:fakeroot-libs-1.12.2-22.2.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, keyID c105b9de: NOKEY
Preparing... #################################[100%]
Updating/ installing...
1:fakeroot-libs-1.12.2-22.2.el6 ################################# [100%]
[root@docker~]# rpm -ivh fakeroot-1.12.2-22.2.el6.x86_64.rpm
warning:fakeroot-1.12.2-22.2.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key IDc105b9de: NOKEY
Preparing... ################################# [100%]
Updating/ installing...
1:fakeroot-1.12.2-22.2.el6 #################################[100%]
[root@docker~]# rpm -ivh febootstrap-3.21-4.el6.x86_64.rpm
warning:febootstrap-3.21-4.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key IDc105b9de: NOKEY
Preparing... ################################# [100%]
Updating/ installing...
1:febootstrap-3.21-4.el6 ################################# [100%]
[root@docker~]# rpm -ivh febootstrap-supermin-helper-3.21-4.el6.x86_64.rpm
warning: febootstrap-supermin-helper-3.21-4.el6.x86_64.rpm:Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing... ################################# [100%]
Updating/ installing...
1:febootstrap-supermin-helper-3.21-4.el6 ################################# [100%]
现在就可以在Centos7上使用febootstrap了:
[root@docker~]# febootstrap
Usage:febootstrap [--options] REPO TARGET [MIRROR]
Please read febootstrap(8) man page for more information.