16.2. リモートリポジトリーの作成
複数の Red Hat Enterprise Linux サーバーは、ネットワーク上にある単一の Red Hat Enterprise Linux リポジトリーにアクセスできます。これには web サーバーが必要になりますが、おそらく Apache がこれになります。
前提条件
- Red Hat Enterprise Linux 8 インストール DVD/ISO イメージがある。
- Red Hat Enterprise Linux を実行しているサーバーが複数ある。
手順
ダウンロードした DVD のコンテンツをマウントしてコピーします。
mkdir /mnt/rhel{ProductNumber} mount -o loop,ro rhel-{ProductNumber}-x86_64-dvd.iso /mnt/rhel{ProductNumber}/ cp -r /mnt/rhel{ProductNumber}/ /var/www/html/ umount /mnt/rhel{ProductNumber}
次の手順は、Apache がインストールされているサーバーではなく、クライアント側で実行します。
BaseOS リポジトリーおよび AppStream リポジトリー両方のリポジトリーファイルを作成します。
vi /etc/yum.repos.d/rhel_http_repo.repo [BaseOS_repo_http] name=RHEL_8_x86_64_HTTP BaseOS baseurl="http://myhost/rhel8/BaseOS" gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release [AppStream_repo_http] name=RHEL_8_x86_64_HTTP AppStream baseurl="http://myhost/rhel8/AppStream" gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release [root@localhost ~]# yum repolist Updating Subscription Management repositories. Unable to read consumer identity This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. Last metadata expiration check: 0:08:33 ago on Út 23. července 2019, 16:48:09 CEST. repo id repo name status AppStream_repo_http RHEL_8_x86_64_HTTP AppStream 4,672 BaseOS_repo_http RHEL_8_x86_64_HTTP BaseOS 1,658 [root@localhost ~]#