Details:To resolve vm often need to mount ISO for install some system software.
Solution:
OS :Red Hat Enterprise Linux Server release 7.2 (Maipo)
nginx:nginx-1.9.1
YUM server VM :
configure local yum:
[root@CNSZBSQ-000055 yum.repos.d]# ls
dvd.repo redhat.repo
[root@CNSZBSQ-000055 yum.repos.d]# cat dvd.repo
[rhel-source]
name=Red Hat Enterprise Linux $releasever - $basearch - Source
baseurl=file:///mnt
enabled=1
gpgcheck=0
mount -o loop rhel-server-7.2-x86_64-dvd.iso /mnt/
yum makecache
yum install pcre*
yum install openssl*
tar -xzvf nginx-1.9.3.tar.gz
cd nginx-1.9.3/
./configure --prefix=/usr/local/nginx-1.9.1 --with-http_ssl_module --with-http_spdy_module --with-http_stub_status_module --with-pcre
make
make install
chmod 755 -R /usr/local/nginx-1.9.1/html/
configure nginx:
/usr/local/nginx-1.9.1/conf
cp nginx.conf nginx.cong.bak
add autoindex
location / {
root html;
index index.html index.htm;
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
}
/usr/local/nginx-1.9.1/html
mkdir RHEL7.2
cp -r /mnt/* /usr/local/nginx-1.9.1/html/RHEL7.2
/usr/local/nginx-1.9.1/sbin/nginx
Other VM :
Not need to mount ISO
[root@CNSZBSQ-000053 yum.repos.d]# ls
dvd.repo redhat.repo
[root@CNSZBSQ-000053 yum.repos.d]# cat dvd.repo
[rhel-source]
name=Red Hat Enterprise Linux $releasever - $basearch - Source
baseurl=http://10.14.227.132/RHEL7.2/
enabled=1
gpgcheck=0
yum makecache
yum install 'software you want install'
Also you can flow the browser to download.