| Unix Content | Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
|
| I have a couple of question about installing packages: 1.How can I add my RHEL or centos installation CD as a repository for yum? I noticed that whenever I try to use yum I get the packages from the internet but not from my CD. 2.After adding the CD as a repository how can I give the CD priority to ensure that if a packages is available on both my CD and the redhat network I don’t end up downloading a package that I already have locally in my disk. 3. On gnome I used to “add and remove software” tool on the application menu. From there I was able to find openoffice. However with a “yum –info openoffice” I get nothing. Why is that? |
|
#2
|
| Artificer wrote: > I have a couple of question about installing packages: > 1.How can I add my RHEL or centos installation CD as a repository for > yum? I noticed that whenever I try to use yum I get the packages from > the internet but not from my CD. > 2.After adding the CD as a repository how can I give the CD priority > to ensure that if a packages is available on both my CD and the redhat > network I don’t end up downloading a package that I already have > locally in my disk. You put it in the drive and do something like yum localinstall where package is like /media/CDROM/path/package However this will go to the web in search of the latest dependencies. Also if your disk is not the latest the next time it will go online to update/upgrade and what is on your disk is out of date it will find the latest. So I do not see what you are going to gain by insisting upon the CD version. Perhaps you could yum info package before installing. > 3. On gnome I used to “add and remove software” tool onthe > application menu. From there I was able to find openoffice. However > with a “yum –info openoffice” I get nothing. Why is that? Because nothing is named openoffice. However yum info openoffice* will get what you want. It is a quirk that does require some hunting to find the right way to name what you are looking for. Note it is "info" not "-info". Also do NOT yum install openoffice* As that gets you all the language packs of which there appear to be an infinite number. -- Charon won't take counterfeit coins. -- The Iron Webmaster, 4037 http://www.giwersworld.org/environment/aehb.phtml a2 |
|
#3
|
| Artificer wrote: > I have a couple of question about installing packages: > > 1.How can I add my RHEL or centos installation CD as a repository for > yum? I noticed that whenever I try to use yum I get the packages from > the internet but not from my CD. Well, I creatae a local mirror repository for updates and update all my hosts from that. With CentOS you can use rsync from a local, trusted repository. With RHEL, you have to register the server, install yum-rhn-plugin, and use reposync to generate the mirror. Then rip out yum-rhn-plugin on all clients, or on the server when doing normal package management. (yum-rhn-plugin which is basically up2date in grandma's clothing, with all of up2date's problems cleaning its long pointy teeth and avoiding getting poked in its big eyes: it's a DRM problem that sometimes makes me prefer CentOS.) > 2.After adding the CD as a repository how can I give the CD priority > to ensure that if a packages is available on both my CD and the redhat > network I don’t end up downloading a package that I already have > locally in my disk. There are yum plugins for this, for 'protected' and 'preferred' plguins. But remember yum-rhn-plugin? That nightclad dressed wolf basically drops its drawers and does something rude on all other yum plugins, and ignores every repository specific directive: there are no .repo files for the RHN repositories, so you can only use 'exclude' or '--disable-repo' options. If you're using RHEL, either create a mirror as I described and rip out yum-rhn-plugin, or write a wrapper to automatically add --disable-repo commands. > 3. On gnome I used to “add and remove software” tool on the > application menu. From there I was able to find openoffice. However > with a “yum –info openoffice” I get nothing. Why is that? This is because RHEL 5 Server, in its infinite foolishness, didn't include OpenOffice in the standard channels. There is an additional channel that includes, one not turned on by default but available with your subscription. Go log into your RedHat account and enable it for your registered server. |
|
#4
|
| Artificer wrote: > I have a couple of question about installing packages: > > 1.How can I add my RHEL or centos installation CD as a repository for > yum? I noticed that whenever I try to use yum I get the packages from > the internet but not from my CD. > 2.After adding the CD as a repository how can I give the CD priority > to ensure that if a packages is available on both my CD and the redhat > network I don’t end up downloading a package that I already have > locally in my disk. > 3. On gnome I used to “add and remove software” tool on the > application menu. From there I was able to find openoffice. However > with a “yum –info openoffice” I get nothing. Why is that? Dear Artificer, Here you an example of how I would use the RHEL 5.2 DVD as the yum repro. /etc/yum.repos.d/rhel-dvd-cluster.repo rhel-dvd-cluster] name=Red Hat Enterprise Linux $releasever - $basearch - Debug baseurl=file:///media/dvd/Cluster enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release /etc/yum.repos.d/rhel-dvd-clusterstorage.repo [rhel-dvd-clusterstorage] name=Red Hat Enterprise Linux $releasever - $basearch - Debug baseurl=file:///media/dvd/ClusterStorage enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release /etc/yum.repos.d/rhel-dvd.repo [rhel-dvd] name=Red Hat Enterprise Linux $releasever - $basearch - Debug baseurl=file:///media/dvd/Server enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release /etc/yum.repos.d/rhel-dvd-vt.repo [rhel-dvd-vt] name=Red Hat Enterprise Linux $releasever - $basearch - Debug baseurl=file:///media/dvd/VT enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release Hint: your RHEL subscription might or might not allow you to change the enabled=0 (off) to enable=1 (on). This example shows the RHEL Server 5.2 settings. It shows as base url a DVD mounted on /media/dvd on //localhost with a reference to the features you wish to use like Cluster: baseurl=file:///media/dvd/Cluster I would use a DVD iso instead of a DVD, due to the fact that you might want to keep the DVD-player free for other use. Kind regards, Jan Gerrit Kootstra |
|
#5
|
| On Thu, 21 Aug 2008 14:09:37 -0700, Artificer typed this message: > I have a couple of question about installing packages: > > 1.How can I add my RHEL or centos installation CD as a repository for > yum? I noticed that whenever I try to use yum I get the packages from > the internet but not from my CD. > 2.After adding the CD as a repository how can I give the CD priority to > ensure that if a packages is available on both my CD and the redhat > network I don’t end up downloading a package that I already have locally > in my disk. > 3. On gnome I used to “add and remove software” tool on the application > menu. From there I was able to find openoffice. However with a “yum > –info openoffice” I get nothing. Why is that? Other than network throughput I don't see an advantage to using the installation DVD any longer. $ man yum.conf However, what I would do is create a repo.conf with the contents from /etc/yum.repos.d/ as desired, ie, DVD as base or the only repos in repos.conf for example: [main] cachedir=/var/cache/yum debuglevel=2 logfile=/var/log/yum.log [CENTOS DVD] name=Centos or RHEL baseurl=file:///media/"CENTOS DVD5" gpgcheck=1 Then you can run $ yum -c ~/repos.conf install packagename |
|
#6
|
| Thanks everybody! |