디렉토리 생성
sudo mkdir -p /mnt/rhel6
sudo mkdir -p /mnt/rhel7
sudo mkdir -p /mnt/centos6
sudo mkdir -p /mnt/centos7트
ISO 이미지 마운트
sudo mount -t iso9660 -o loop /data/_ISO_/rhel-server-6.9-x86_64-dvd.iso /mnt/rhel6
sudo mount -t iso9660 -o loop /data/_ISO_/rhel-server-7.3-x86_64-dvd.iso /mnt/rhel7
sudo mount -t iso9660 -o loop /data/_ISO_/CentOS-6.9-x86_64-bin-DVD1.iso /mnt/centos6
sudo mount -t iso9660 -o loop /data/_ISO_/CentOS-7-x86_64-DVD-1611.iso /mnt/centos7
httpd 일때 설정
Alias /rhel6 "/mnt/rhel6"
<Directory /mnt/rhel6/>
Options +Indexes
AllowOverride none
Require all granted
</Directory>
Alias /rhel7 "/mnt/rhel7"
<Directory /mnt/rhel7/>
Options +Indexes
AllowOverride none
Require all granted
</Directory>
Alias /centos6 "/mnt/centos6"
<Directory /mnt/centos6/>
Options +Indexes
AllowOverride none
Require all granted
</Directory>
Alias /centos7 "/mnt/centos7"
<Directory /mnt/centos7/>
Options +Indexes
AllowOverride none
Require all granted
</Directory>
NGINX 일때 설정
server {
location /rhel7/ {
alias D:/data/yum/rhel7/;
autoindex on;
allow all;
}
location /rhel6/ {
alias D:/data/yum/rhel6/;
autoindex on;
allow all;
}
location /centos6/ {
alias D:/data/yum/centos6/;
autoindex on;
allow all;
}
location /centos7/ {
alias D:/data/yum/centos7/;
autoindex on;
allow all;
}
}
yum repo 설정
# /etc/yum.repos.d/local-rhel6.repo
[local-rhel6]
name=local-rhel6
baseurl=http://192.168.56.1/rhel6/Server/
enabled=1
gpgcheck=0
# /etc/yum.repos.d/local-rhel7.repo
[local-rhel7]
name=local-rhel7
baseurl=http://192.168.56.1/rhel7/
enabled=1
gpgcheck=0
# /etc/yum.repos.d/local-centos6.repo
[local-centos6]
name=local-centos6
baseurl=http://192.168.56.1/centos6/
enabled=1
gpgcheck=0
# /etc/yum.repos.d/local-centos7.repo
[local-centos7]
name=local-centos7
baseurl=http://192.168.56.1/centos7/
enabled=1
gpgcheck=0