Installing Software on Text based CentOS

Issues related to applications and software problems
incendio
Posts: 6
Joined: 2011/09/12 23:29:28

Installing Software on Text based CentOS

Post by incendio » 2011/09/13 01:44:55

Hi all,

I have already installed CentOS 6, installation was ok, I can login, but it is in text mode (no GUI). It was my mistake, I downloaded CentOS with minimal installation, so I guest no GUI in this version.

Since I am really a newbie in Linux, I have a few questions :
1) Is this possible to mount my usb drive in text mode ? if it is, how to do that?
2) How to install RPM file from that USB?
3) How to set static ip adress for eth0?
4) Where can I get a good reference for linux commands for newbie?

Thanks in advance.
Best regards,
Incendio

User avatar
TrevorH
Forum Moderator
Posts: 28867
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Installing Software on Text based CentOS

Post by TrevorH » 2011/09/13 08:41:07

1) Is this possible to mount my usb drive in text mode ? if it is, how to do that?

mount -t vfat /dev/sdX1 /mnt/usbdrive

(run dmesg to findout what the USB stick device name is and use a directory under /mnt that you create)

2) How to install RPM file from that USB?

yum localinstall /mnt/usbdrive/this.rpm

3) How to set static ip adress for eth0?

Either use the `system-config-network-tui` command or edit the file /etc/sysconfig/ifcfg-eth0 yourself. If system-config-network-tui is not installed then run `yum install system-config-network-tui`

incendio
Posts: 6
Joined: 2011/09/12 23:29:28

Re: Installing Software on Text based CentOS

Post by incendio » 2011/09/13 12:04:44

Hi TrevorH, thanks for your reply.

I got error when executing this command : yum localinstall /mnt/usbdrive/this.rpm

Error Message are :
Could not retrieve mirrorlist http://mirrorlist/centos.org/?release=6&arch=x86_64&repo=os Error was PYCURL ERROR 6 - ""
Error : Cannot find a valid baseurl for repo: base

It seems that CentOS tried to connect to the Internet. I have an internet connection via mobile modem, seems CentOS could not find this connection.

Is it possible to install without Internet connection?

Thanks and regards,
Incendio.

foxb
Posts: 1927
Joined: 2006/04/20 19:03:33
Location: Montreal/QC

Re: Installing Software on Text based CentOS

Post by foxb » 2011/09/13 13:00:35

You can simply type

[code]rpm -ivh (or Uvh) <rpm package name>[/code]

kmuzheri
Posts: 15
Joined: 2011/08/29 10:52:14

Re: Installing Software on Text based CentOS

Post by kmuzheri » 2011/09/15 13:38:22

To mount the USB drive, you can run the following commands:

# fdisk -l //to check the file system you need to mount. It would give you a path the flash, eg /dev/sdg1
# mount /dev/sdg1 /mnt/flash //where flash is an empty folder you created in /mnt/

to access the files now:

$ ls /mnt/flash

To install rpms from the USB we mounted:

# cd /mnt/flash
# rpm -Uvh abc.xyz.rpm


Note: # means you need super user rights
$ any general user can perform the command

Hope it helps

User avatar
TrevorH
Forum Moderator
Posts: 28867
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Installing Software on Text based CentOS

Post by TrevorH » 2011/09/15 13:46:38

If you have a local copy of the CentOS DVD then you can use something like

[code]
yum --disablerepo=\* --enablerepo=c6-media localinstall this.rpm
[/code]

That disables all repos and then enables just the c6-media one. If you are sure that this rpm has no dependencies then either `rpm --install this.rpm` or the yum command above without the --enablerepo will work.

kmuzheri
Posts: 15
Joined: 2011/08/29 10:52:14

Re: Installing Software on Text based CentOS

Post by kmuzheri » 2011/09/15 13:56:27

Yes TrevorH, the command will run. However, the CentOS-Media.repo (found in /etc/yum.repos.d) will have to be tweaked a bit to suite the situation; eg, editing it to

baseurl=file:///media//
enabled=1

Furthermore, since (s)he is in text-mode, there is need to manually mount the drive....

Hope it helps

User avatar
TrevorH
Forum Moderator
Posts: 28867
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Installing Software on Text based CentOS

Post by TrevorH » 2011/09/15 14:06:30

On my system the baseurl is already a list of 3 separate locations to check for the media. It's not necessary to enable it in the repo file if you are overriding that on the command line.

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Installing Software on Text based CentOS

Post by gerald_clark » 2011/09/15 14:06:53

It does not need to be tweeked. The DVD just needs to be mounted on one of the listed directories.

kmuzheri
Posts: 15
Joined: 2011/08/29 10:52:14

Re: Installing Software on Text based CentOS

Post by kmuzheri » 2011/09/15 14:55:27

Ah, thats fine. That would be even better for him/her. I had always thought there is a need to mount it plus make sure its enabled. Further more the DVD may mount with a name that doesnt tally with the one expected in the CentOS-Media.repo (Eg if a friend burnt the dvd for him and used some other name not the expected one). But since it wont bother him/her, then thats great. Besides if he/she has a problem I guess he will post again to inform us.

Thanx guys for the support. We keep learning.

Hope it helps

Post Reply

Return to “CentOS 6 - Software Support”