外部ネットワークに接続されていない本番環境では、また、一般的にいくつかのソフトウェアのインストールに基づいて依存関係の多くをインストールする必要があり、使用され、yumのローカルコンフィギュレーション・システム・イメージ・ソースを使用yumの依存関係をインストールするのが一般的ではなく、一般的にあまり鏡であります大きな、唯一の時間と労力のソースは、我々は独自の方法で進めることができる2つのミラーのyumのパッケージ構成をインストールするためのローカルマシンにキャッシュyumのRPMパッケージホスト国reposync同期ソースのダウンロードを使用して外部ネットワークテスト環境に接続できる場合、使用createrepoコマンドは、ローカルネットワークのyumリポジトリを作成します。
ホストオペレーティングシステムのテスト:centos7.4 x64,2c4G、100Gシステムディスク、1Tのデータディスクを。LVMパーティションのフォーマット、単一のデータディスクLV、マウント/ dataディレクトリ。
reposyncコマンドは、Pythonスクリプトです。ヤム-utilsパッケージに含まれています。したがって、我々はあなたがyumを-utilsのパッケージをインストールする必要がある場合reposyncコマンドを使用する場合。
次のコマンドを使用します。ヤムヤム-utilsのインストール
リポジトリ名(通常はベース)-pターゲットディレクトリ-r reposync
小さなドアのインストールパートナーない独自のyum-utilsのん
1.リポジトリのインストールおよび管理ツールは、Apache-utilsのyumを
yumをyumをcreaterepo -Yのhttpd-utilsのインストール
systemctl httpdの有効
systemctl開始のhttpd
2.ファイルのディレクトリを作成し
ます。mkdir -p /データ/ Webサイト/ CentOSの/ 6 /
ます。mkdir -p /データ/ Webサイト/ CentOSの/ 7 /
ます。mkdir -p /データ/ Webサイト/ EPEL /
3.変更/etc/yum.repos.d/CentOS-Base.repo
## centos7
[base7]
name=CentOS-7-os-cmiot.local baseurl=http://mirrors.163.com/centos/7/os/x86_64/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-7 #released updates [updates7] name=CentOS-7-updates-cmiot.local baseurl=http://mirrors.163.com/centos/7/updates/x86_64/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-7 #additional packages that may be useful [extras7] name=CentOS-7-extras-cmiot.local baseurl=http://mirrors.163.com/centos/7/extras/x86_64/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-7 ## centos6 [base6] name=CentOS-6-os-cmiot.local baseurl=http://mirrors.163.com/centos/6/os/x86_64/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 #released updates [updates6] name=CentOS-6-updates-cmiot.local baseurl=http://mirrors.163.com/centos/6/updates/x86_64/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 #additional packages that may be useful [extras6] name=CentOS-6-extras-cmiot.local baseurl=http://mirrors.163.com/centos/6/extras/x86_64/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 ## epel [epel6] name=CentOS-6-epel-cmiot.local baseurl=https://mirrors.aliyun.com/epel/6/x86_64/ gpgcheck=0 [epel7] name=CentOS-7