Loading RPM's onto a CENTOS 7 vm with a minimum installation
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
to bring up the interface.
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.
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
Last edited by mcgheetech79; 03-12-2015 at 12:06 PM.
Reason: adding a question
"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
mount /dev/cdrom /mnt/cdrom
Why are you trying to mount /dev/cdrom anyway though? I hope you know that /dev/cdrom in your VM is not going to be the physical CD drive on the machine. The VM is isolated from the hardware. /dev/cdrom in the VM is whatever the VM software tells it it is. It could be an iso file on the host system, or nothing at all.
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
or use wildcards
Code:
rpm -Uvh *.rpm
Last edited by suicidaleggroll; 03-12-2015 at 12:15 PM.
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
$ 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
The file "acl-2.2.51-12.el7.x86_64.rpm" is apparently not in your working directory. If you run "ls" do you see it? If not, then you can't use that command.
Code:
$ rpm - ivh packages\acl-2.2.51-12.el7.x86_64.rpm
Again, if you run "ls packages" do you see the file "acl-2.2.51-12.el7.x86_64.rpm"? If not, you can't use that command.
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:
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.
Since I've never used Vcenter, I'm afraid I can't be any more specific about that.
Last edited by suicidaleggroll; 03-12-2015 at 02:44 PM.
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
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.