Loading RPM's onto a CENTOS 7 vm with a minimum installation
I built a VM in Vcenter with CENTOS 7 OS on it with minimum installation. I have my RPM's in a folder on my network drive. How do I get my RPMs onto my server. Also someone was telling me there is one RPM that is needed first on my server for networking. Anyone have any suggestions. thanks
|
Even with a minimal install, you should have networking. Though I haven't created and CentOS VM's, I have created several RHEL VM's without an issue. If you do not have network connectivity, I would check the "Edit Settings" on the VM and make sure you
1) Have a Network adapter installed 2) Have it on the correct VLAN via the Network Connection\Network label 3) Make sure on Device Status, you have checked CONNECTED and CONNECTED at power on If all of these are in place, you may need to edit (as root) the /etc/sysconfig/network and the /etc/sysconfig/network-scripts/ifcfg-ethX files and enter your network settings. After that, as root, do a Code:
service network start OR ifconfig ethX up As for getting additional RPMS to your VM, you have a multitude of options... FTP/SFTP/SCP/etc.... or if they are located on a NFS filesystem, you can mount that filesystem and run the RPM command against them like they are on the local machine. Hope this helps!! |
Thanks!
Thanks but this is what I get when I try to mount from a CDROM. Also when I do get the CDROM mounted how do i install multiple RPM's at once instead of doing one at a time? thanks again for your quick response. I'm very new at this
mount/dev/cdrom mount: can't find /dev/cdrom in /etc/fstab |
"mount" requires either one or two arguments. If the device you intend to mount is defined in /etc/fstab, then you only need the device, the mount point and options will be pulled from /etc/fstab. If the device is not defined in /etc/fstab, then you need to provide both the device as well as the mount point.
"/dev/cdrom" is not in /etc/fstab, which means you need to provide a mount point for it, like /mnt/cdrom or something. You may have to create a directory for it if your intended mount location doesn't already exist: Code:
mkdir /mnt/cdrom To push data to a VM you would typically either set up the network interface on the guest OS and then copy it over through "normal" means (scp, rsync, nfs, samba, etc.), or you'd set up a shared directory between the host and guest so they can both read/write to some directory on the host system. To install multiple RPMs just give multiple names to rpm Code:
rpm -Uvh rpm1 rpm2 rpm3 Code:
rpm -Uvh *.rpm |
Thanks again
Thanks it worked! My next question if you still have anymore tolerance for these newbie questions is I'm having a problem installing the RPMs now. Please see my output below.
rpm - ivh acl-2.2.51-12.el7.x86_64.rpm error: open of acl-2.2.51-12.el7.x86_64.rpm failed: No such file or directory I also tried rpm - ivh packages\acl-2.2.51-12.el7.x86_64.rpm Note: The RPMs are under D:\Packages (CDROM) |
Code:
$ rpm - ivh acl-2.2.51-12.el7.x86_64.rpm Code:
$ rpm - ivh packages\acl-2.2.51-12.el7.x86_64.rpm You're telling rpm where it can find the rpm file it should install. If the rpm file isn't where you're telling rpm it is, it will error out saying it couldn't find it. Also, it's "/" in Linux/Unix/OSX/etc., not "\". And it's "rpm -ivh", not "rpm - ivh". Spaces are important. Again, the CentOS guest does not have access to the physical CD drive in the machine. Please re-read my earlier post. The guest OS is in a sandbox. ALL of it's "hardware" interfaces are fake, provided by the VM software. Its hard drive is not real (it's just a file on the host system), its network interface is not real, its graphics card is not real, etc. They're just pipes to various pieces of the VM software. Similarly, "/dev/cdrom" in the guest is NOT your physical CD drive. It's a virtual interface the VM software is providing to the guest to allow you to mount ISO images, etc. It is, by its very definition a virtual machine. And that's GOOD! That sandbox is what allows you to experiment with different virtual machines without risking any damage to your host system. If the guest OS had physical access to your machine's hardware, it could wreak all kinds of havoc. You may be able to attach the physical CD drive to the guest OS through your VM software (thus detaching it from your Windows host - you'll see the D: drive disappear), but you'll have to check the VM software for that option. As I said before: Quote:
|
when you had the VM set up
was a network bridge also set up The last time i set up a CentOS 7 VM ( using KVM) I set up the bridge first then installed cent7 on the vm the install auto found the network auto added the updates and auto updated during the install |
Thanks guys I figured it out.
mkdir /mnt/cdrom cd /mnt/cdrom/Packages (Packages is where my RPM's are) rpm -Uvm *.rpm (installed all my RPM's from the Packages folder on the CDROM)This is a great command! Now all I need to know is how to add a IP address. Anybody know how to do that? thanks again for all your help |
ifcfg-eth0 file no such file or directory
So Im trying to configure a static IP for my CENTOS 7 box. I can cd to the /etc/sysconfig/network-scripts/ directory but if I try to go to the /etc/sysconfig/network-scripts/ifcfg-eth0 directory it says no such file or directory. Someone was telling me there is a RPM I have to load on my box first in order for me to configure the IP. Anyone know how to do this? thanks
|
ifcfg-eth0 is not a directory, it's a file, assuming you have an eth0 device. When you're in /etc/sysconfig/network-scripts, run "ls" to see the names of all files/dirs.
|
on the host OS running the VM
did you set up a network bridge FIRST!!! if not no network for the os in the VM |
configure a static IP for my CENTOS 7 box
I did a ls in /etc/sysconfig/network-scripts and I get ifcfg-ens160 and ifcfg-lo but no ifcfg-eth0. John this is a classified network so there is no connection to the internet for the Host.
|
Then your network interface is ens160, use that.
|
static IP for CENTOS 7
I used this website on how to set up a network on Centos 7 but now its stuck at connecting after doing a nmcli d
ens160 ethernet connecting (getting IP configuration) http://www.krizna.com/centos/setup-network-centos-7/ |
All times are GMT -5. The time now is 01:08 PM. |