Kernel Source Code?

I don’t know if this is the right place for this, but am hopeful somebody will be able and willing to help me out.

The server I set up to drive IP phones at our tent sale and interface over a Cisco VPN to our CallManager server disappeared after the last tent sale; I was hurt at the time and have no idea where it went. Earlier today, I downloaded the latest AsteriskNow (1.7.1) and installed it on a different machine using the option to install Asterisk 1.6 and FreePBX. All was going well when I ran into a snag.

Apparently, there are no kernel sources included in AsteriskNow. (???) The Cisco VPN client software needs to compile a kernel module for the network driver and needs the kernel source tree in order to do so. I’ve googled for it quite a bit and found a few suggestions, but nothing that has worked.

Supposedly, running conary update kernel:build-tree --sync-to-parents will install the kernel source, but I’m guessing it was for an old version of AsteriskNow because the conary command does not exist on my machine.

Looking at the CD, I saw kernel-2.6.18-194.11.1.el5.i686.rpm, kernel-PAE-2.6.18-194.11.1.el5.i686.rpm, and kernel-xen-2.6.18-194.11.1.el5.i686.rpm, so I tried installing and discovered something weird:

# rpm -q kernel-2.6.18-194.11.1.el5.i686.rpm
package kernel-2.6.18-194.11.1.el5.i686.rpm is not installed
# rpm -i kernel-2.6.18-194.11.1.el5.i686.rpm
package kernel-2.6.18-194.11.1.el5.i686.rpm is already installed
# rpm -q kernel-xen-2.6.18-194.11.1.el5.i686.rpm
package kernel-xen-2.6.18-194.11.1.el5.i686.rpm is not installed
# rpm -i kernel-xen-2.6.18-194.11.1.el5.i686.rpm
<pause, then returns to command prompt>
# rpm -q kernel-xen-2.6.18-194.11.1.el5.i686.rpm
package kernel-xen-2.6.18-194.11.1.el5.i686.rpm is not installed
# rpm -U kernel-xen-2.6.18-194.11.1.el5.i686.rpm
package kernel-xen-2.6.18-194.11.1.el5.i686.rpm is already installed
# rpm --rebuilddb
<long pause>
# rpm -q kernel-xen-2.6.18-194.11.1.el5.i686.rpm
package kernel-xen-2.6.18-194.11.1.el5.i686.rpm is not installed
# rpm -U kernel-xen-2.6.18-194.11.1.el5.i686.rpm
package kernel-xen-2.6.18-194.11.1.el5.i686.rpm is already installed
# rpm -e kernel-xen-2.6.18-194.11.1.el5.i686.rpm
package kernel-xen-2.6.18-194.11.1.el5.i686.rpm is not installed
<I scratch my head and wonder if Cisco has released a BSD client yet ;) >

Regardless of what I do, I cannot seem to get the kernel source installed. In /lib/modules/2.6.18-194.11.1.el5 there are 2 broken symbolic links - source is a symbolic link to ./build and build is a symbolic link referencing …/…/…/kernels/2.6.18-194.11.1.el5.i686 - /usr/src/kernels is empty.

There is no internet access currently on this machine, though I can download and transfer files via a flash drive. Any assistance in figuring out how to get the sources installed would be appreciated. (This is the only distro I’ve used which doesn’t include them on the install CD… :frowning: )

You need the kernel-dev* stuff. I don’t know Digium’s structure but you should be able to slog around the yum repository and find it.

Thanks for the info - was able to find it on pbone via google. One hurdle crossed…

Now it appears that gcc is not included in AsteriskNow. I googled for gcc-2.6.18-194.11.1.el5.i686.rpm in the hopes of finding it myself, but got nothing. Separating the release/version from gcc results in a whole lot of relatively useless hits. Anyone know what I need for this one?

Why on earth do the AsteriskNow packagers not include such tools with their distribution???

Never mind my last post. Got it working.

For those interested, you have to get the files specific to the AsteriskNow build for some of the dependencies. While the RPMs on the CentOS 5.5 Repository work for some of the gcc dependencies, others won’t work and require searching on pbone for each file. Eventually, it works. Below are the URLs for each file I downloaded to get it working. (I think - tried to weed out the ones I didn’t need after it was done. Downloaded ~300 meg of crap and shuffled between machines to find what I needed, which should have been included in the distro to begin with IMO…)

http://mirror.centos.org/centos/5.5/os/i386/CentOS/cpp-4.1.2-48.el5.i386.rpm
http://mirror.centos.org/centos/5.5/os/i386/CentOS/libgomp-4.4.0-6.el5.i386.rpm
ftp://ftp.pbone.net/mirror/ftp.centos.org/5.5/updates/i386/RPMS/glibc-common-2.5-49.el5_5.4.i386.rpm
ftp://ftp.pbone.net/mirror/ftp.centos.org/5.5/updates/i386/RPMS/glibc-headers-2.5-49.el5_5.4.i386.rpm
ftp://ftp.pbone.net/mirror/ftp.centos.org/5.5/updates/i386/RPMS/glibc-devel-2.5-49.el5_5.4.i386.rpm
http://mirror.centos.org/centos/5.5/os/i386/CentOS/gcc-4.1.2-48.el5.i386.rpm

I have built Asterisk from source on a Asterisk now implementation:

These updates will put together the build environment:

#For performance and security reasons it is important to update the system immediately after install.

yum -y update

reboot

#The following packages also need to be installed with yum:

yum groupinstall core
yum groupinstall base

yum install gcc gcc-c++ wget bison mysql-devel mysql-server php php-mysql php-pear php-pear-DB php-mbstring nano ntp tftp-server httpd make ncurses-devel libtermcap-devel sendmail sendmail-cf caching-nameserver sox newt-devel libxml2-devel libtiff-devel php-gd audiofile-devel gtk2-devel


#Disable Firewall and SELinux

setup agent

#Go to firewall configuration and ensure SELinux and Firewall are disabled

Reboot
reboot