LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 03-12-2015, 08:20 AM   #1
mcgheetech79
LQ Newbie
 
Registered: Mar 2015
Posts: 12

Rep: Reputation: Disabled
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
 
Old 03-12-2015, 09:53 AM   #2
netnix99
Member
 
Registered: Jun 2011
Distribution: redhat, CentOS, OpenBSD
Posts: 298

Rep: Reputation: 98
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.

Hope this helps!!
 
Old 03-12-2015, 11:58 AM   #3
mcgheetech79
LQ Newbie
 
Registered: Mar 2015
Posts: 12

Original Poster
Rep: Reputation: Disabled
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

Last edited by mcgheetech79; 03-12-2015 at 12:06 PM. Reason: adding a question
 
Old 03-12-2015, 12:10 PM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,484

Rep: Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089
"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.
 
Old 03-12-2015, 02:05 PM   #5
mcgheetech79
LQ Newbie
 
Registered: Mar 2015
Posts: 12

Original Poster
Rep: Reputation: Disabled
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)
 
Old 03-12-2015, 02:20 PM   #6
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,484

Rep: Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089
Code:
$ 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.
 
Old 03-12-2015, 04:23 PM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,093

Rep: Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474
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
 
Old 03-13-2015, 01:06 PM   #8
mcgheetech79
LQ Newbie
 
Registered: Mar 2015
Posts: 12

Original Poster
Rep: Reputation: Disabled
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
 
Old 03-13-2015, 02:49 PM   #9
mcgheetech79
LQ Newbie
 
Registered: Mar 2015
Posts: 12

Original Poster
Rep: Reputation: Disabled
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
 
Old 03-13-2015, 03:45 PM   #10
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,484

Rep: Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089
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.
 
Old 03-13-2015, 06:50 PM   #11
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,093

Rep: Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474
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
 
Old 03-16-2015, 08:42 AM   #12
mcgheetech79
LQ Newbie
 
Registered: Mar 2015
Posts: 12

Original Poster
Rep: Reputation: Disabled
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.
 
Old 03-16-2015, 08:53 AM   #13
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,484

Rep: Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089
Then your network interface is ens160, use that.
 
Old 03-16-2015, 09:50 AM   #14
mcgheetech79
LQ Newbie
 
Registered: Mar 2015
Posts: 12

Original Poster
Rep: Reputation: Disabled
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/
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
password minimum length for specific user only in centos cptrojan101 Linux - Newbie 2 02-07-2013 06:51 PM
CentOs: bare minimum bcraig Linux - Newbie 2 03-08-2012 08:03 AM
Minimum Server Installation Astro Slackware 4 11-10-2009 01:36 PM
RPM - rpm: error while loading shared libraries: librpm-4.4.so Yihya Linux - General 3 12-20-2006 12:29 PM
Rebuild A Server Installation Disk from RHEL of CentOS Source RPm kenwee Red Hat 2 05-09-2006 04:36 AM


All times are GMT -5. The time now is 12:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration