Configure YUM with FTP Server
YUM - Yellow Dog Updater Modifier
have root access & connect with RedHat WIFI
##############
[shasriva@shasriva]# sudo -i
[root@shasriva]# yum install vsftpd -y ------ installing vsftpd
now make a directory on desktop & extract iso image on that directory
######################################################
after extracting with root access
########################
[root@shasriva]# cd /home/shasriva/Desktop/
[root@shasriva Desktop]# ls
rhel-server-7.2-x86_64-dvd.iso, rhel7 ----- extracted content folder
[root@shasriva Desktop]# cp -rvf rhel7/ /var/ftp/pub ----- copying rhel7 extracted files
[root@shasriva Desktop]# cd /var/ftp/pub/
[root@shasriva pub]# chmod +x * -R ----give permission to all the files
[root@shasriva]# systemctl restart vsftpd
[root@shasriva]# iptables -F ---- iptables rules flush
[root@shasriva]# setenforce 0 ----- selinux security off
[root@shasriva]# systemctl status vsftpd ---- check status of vsftpd daemon
now goto your VM & create yum
#########################
[root@localhost]# vi /etc/yum.repos.d/new.repo
& write
######
[n]
baseurl=ftp://192.168.122.1/pub/rhel7/
gpgcheck=0
close & save
##########
Check your ip
YUM - Yellow Dog Updater Modifier
have root access & connect with RedHat WIFI
##############
[shasriva@shasriva]# sudo -i
[root@shasriva]# yum install vsftpd -y ------ installing vsftpd
now make a directory on desktop & extract iso image on that directory
######################################################
after extracting with root access
########################
[root@shasriva]# cd /home/shasriva/Desktop/
[root@shasriva Desktop]# ls
rhel-server-7.2-x86_64-dvd.iso, rhel7 ----- extracted content folder
[root@shasriva Desktop]# cp -rvf rhel7/ /var/ftp/pub ----- copying rhel7 extracted files
[root@shasriva Desktop]# cd /var/ftp/pub/
[root@shasriva pub]# chmod +x * -R ----give permission to all the files
[root@shasriva]# systemctl restart vsftpd
[root@shasriva]# iptables -F ---- iptables rules flush
[root@shasriva]# setenforce 0 ----- selinux security off
[root@shasriva]# systemctl status vsftpd ---- check status of vsftpd daemon
now goto your VM & create yum
#########################
[root@localhost]# vi /etc/yum.repos.d/new.repo
& write
######
[n]
baseurl=ftp://192.168.122.1/pub/rhel7/
gpgcheck=0
close & save
##########
Check your ip
##########
[root@shasriva]# ip a
If you don't have an ip just do one thing
############################
[root@shasriva]# dhclient -v ----- to get ip from the base machine
IT's Done, do check your yum by installing anything
-----------------------------------------------------------------------------------------
Now who have installed VM in GUI mode they will face the problem in configuration of YUM in VM
################################
As GUI Mode VM's include a network card name virbr0
VM will not make a connection through base machine when your are doing dhclient -v the VM will search & bind the IP with Itself as virbr0 have ip - 192.168.122.1
#######################################
You have to delete the network card - virbr0
#################################
Goto your VM & Delete the network card - virbr0
###########
[root@localhost]# ifconfig virbr0 down ------- down the network card
[root@localhost]# brctl delbr virbr0
It will delete the network card virbr0
##########################
To do it permanently
###############
Goto your VM
##########
[root@localhost]# cd /etc/libvirt/qemu/networks/
[root@localhost networks]# ls
default.xml
[root@localhost]# vim default.xml ------- open it & clear all content & save it
After all this reboot your VM
####################
0 Comments