LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Running Package Upates RH Ver 5 (https://www.linuxquestions.org/questions/linux-newbie-8/running-package-upates-rh-ver-5-a-781276/)

Morgandy 01-10-2010 12:05 PM

Running Package Upates RH Ver 5
 
I loaded RH Ver 5 last night and am trying to update all the tons of packages.

1) My understanding was that installed packages would be shown in the /etc/yum file. I took a look at it. The file contains a lot of info but no package info. At the bottom of it it says "Put your repos here or in separate file named file.repo in etc/yum/repos.d In that directory there is only a rhel-dbuginfo.repo file.

-do I need to create a new file name in the latter directory to update all my packages?

-what file are all my packages listed in now?

-do I need to direct my package updates to a directory or file, and how do I do that (what command)

-what is the difference between the repos.d and the yum.conf file?


2) When I do my updates, I want to just use the Update command, but exclude kernel files. Would this be the right syntax?

-update ; -x filename,filename,filename


Thanks so much, know this is long winded. Too much info to sort through in manuals, web, books, etc...

knudfl 01-10-2010 02:03 PM

Actually it's quite simple to exclude packages :

Example line in /etc/yum.conf :
exclude=x*
.. and you get no packages starting with x.

exclude=kernel*
.. keeps your current kernel forever ...
.....
.....

The "installed packages list" is kept in a binary file
in /var/...
The list is available with ..
rpm -qa | sort > installed-pkgs.txt
.. which will save a text file in /home/"username"/ .

To know "when", this command is useful :
rpm -qa --last | less
Or : rpm -qa --last > last-rpms.txt
.....

Elemecca 01-10-2010 02:31 PM

You don't have to edit any files to do updates. Just run "yum update" as root. If you want to exclude the kernel from updates, add "exclude=kernel-*" to the "[main]" section of /etc/yum.conf.

RedHat has two tools that work in tandem to manage your packages. The first is RPM, which is responsible for maintaining the database of installed packages. It allows you to install packages from RPM files and then manage them. It also does conflict detection, dependency management, etc. It is possible to maintain your system entirely with RPM, but you have to acquire the RPM files from somewhere and keep track of what needs updating. The second tool, YUM, takes care of that for you. It manages repositories of packages. It can download and install a package and all of its dependencies for you given only its name, assuming that package exists in one of its repos. It can also check for newer versions of installed packages in the repos and update them as necessary. The average user will perform most of their package management tasks with YUM.

/etc/yum.conf is the configuration file for YUM. Along with various settings, it contains the default repositories. /etc/yum.repos.d allows you to add your own repositories, one per file, without having to mess with the main configuration file.

chrism01 01-10-2010 06:21 PM

You may find this page of examples useful:
http://kbase.redhat.com/faq/docs/DOC-2531

Morgandy 01-11-2010 09:30 AM

Thanks All! When I get time today I will try this again. thx again, I'll let you know my results.


All times are GMT -5. The time now is 12:18 AM.