以下の内容はhttps://t-cyrill.hatenablog.jp/entry/2018/03/13/013906より取得しました。


CentOS5にCentOS6の環境を作ってchrootする方法を書いておく

諸事情でCentOS5の環境を渡されたので、同じ不幸に見舞われた人向けに書いておく。

一般的な話でいえば、すぐにCentOS7の環境に移行すべきだが、世の中にはいろいろな不幸があるのでめげずに頑張ってほしい。

rinse でCentOS6をインストールする

CentOSchroot環境を作るにはrinseというものがある。Debianでいうdebootstrapみたいなツールで、 rpmパッケージを展開し、chrootできるディレクトリツリーを構築する。

古くからあるパッケージなので、CentOS以外のディストリビューションでも利用できる。

rinse のセットアップ

Debianの場合以下のようにaptでインストールできる。

apt-get install rinse rpm

CentOS6のchroot環境を用意する

mkdir -p ./centos6
rinse --directory=./centos6 --distribution=centos-6 --arch=amd64

この状態で ./centos6 を持っていけばchroot環境を持ち出せる。簡単。

CentOS6にchrootする

sudo mount --rbind /dev ./centos6/dev
sudo mount -t proc none ./centos6/proc
sudo mount --rbind /sys ./centos6/sys
sudo chroot ./centos6 /bin/bash

END




以上の内容はhttps://t-cyrill.hatenablog.jp/entry/2018/03/13/013906より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14