I have Fedora 7 with KDE desktop installed in VMware in Windows. Centos shouldn't be much different. These are the steps I take to install the kernel-devel package. I'll jot down the steps in writing and post the contents from the terminal I use to show the commands and outputs.
I mount the installation DVD by clicking the OK when a auto-mount window appears asking if I want to "Open in new window" after inserting the DVD.
Then I open a terminal, swith user to root, navigate my way to where I know all the .rpm files are that came on the DVD, listing the contents along the way to figure out what is the next command, (to enter the DVD itself, I only typed
cd Fe then hit the
Tab key on the keyboard and bash completed the command properly, you'll notice it's different than what is written in the output of the previous command).
Code:
[jo@localhost ~]$ su
Password:
[root@localhost jo]# cd /media
[root@localhost media]# ls
Fedora 7 i386 DVD
[root@localhost media]# cd Fedora\ 7\ i386\ DVD/
[root@localhost Fedora 7 i386 DVD]# ls
Fedora RELEASE-NOTES-en_US.html RPM-GPG-KEY-fedora-test
fedora.css repodata RPM-GPG-KEY-rawhide
GPL RPM-GPG-KEY stylesheet-images
images RPM-GPG-KEY-beta TRANS.TBL
isolinux RPM-GPG-KEY-fedora
README-BURNING-ISOS-en_US.txt RPM-GPG-KEY-fedora-rawhide
[root@localhost Fedora 7 i386 DVD]# cd Fedora/
[root@localhost Fedora]#
Then I figure out which kernel I'm using, I then list all packages starting with the word kernel using a wildcard in the command, and try to install the kernel-devel package for a missing kernel because I've got a newer one than what came on the installation DVD.
Code:
[root@localhost Fedora]# uname -a
Linux localhost.localdomain 2.6.22.9-91.fc7 #1 SMP Thu Sep 27 23:10:59 EDT 2007 i686 i686 i386 GNU/Linux
[root@localhost Fedora]# ls kernel*.rpm
kernel-2.6.21-1.3194.fc7.i586.rpm
kernel-2.6.21-1.3194.fc7.i686.rpm
kernel-debug-2.6.21-1.3194.fc7.i686.rpm
kernel-debug-devel-2.6.21-1.3194.fc7.i686.rpm
kernel-devel-2.6.21-1.3194.fc7.i586.rpm
kernel-devel-2.6.21-1.3194.fc7.i686.rpm
kernel-doc-2.6.21-1.3194.fc7.noarch.rpm
kernel-headers-2.6.21-1.3194.fc7.i386.rpm
kernel-PAE-2.6.21-1.3194.fc7.i686.rpm
kernel-PAE-debug-2.6.21-1.3194.fc7.i686.rpm
kernel-PAE-debug-devel-2.6.21-1.3194.fc7.i686.rpm
kernel-PAE-devel-2.6.21-1.3194.fc7.i686.rpm
kernel-xen-2.6.20-2925.9.fc7.i686.rpm
kernel-xen-2.6-doc-2.6.20-2925.9.fc7.noarch.rpm
kernel-xen-devel-2.6.20-2925.9.fc7.i686.rpm
[root@localhost Fedora]# rpm -ivh kernel-devel-2.6.21-1.3194.fc7.i686.rpm
Preparing... ########################################### [100%]
package kernel-devel-2.6.22.5-76.fc7 (which is newer than kernel-devel-2.6.21-1.3194.fc7) is already installed
package kernel-devel-2.6.22.9-91.fc7 (which is newer than kernel-devel-2.6.21-1.3194.fc7) is already installed
[root@localhost Fedora]#
As you should see, I have a newer kernel install and it won't leave me install the original from the DVD.
But at this point, the output you would probably get would give you an error telling you there are un-met dependencies, and bash will list the package names needed to be installed first which should be on the installation disk if your installation is fresh off the disk(s). If you get such an error, list all packages named like the missing dependencies and install the appropriate one(s) for your architecture. Some of those dependencies may also have more dependencies. But those might just be in the first dependency list anyway, install it first etc.
If you get stuck, or are hesitant, best not to take chances, just post again with your query.