centos source install

CentOS Kernel Source Install

Mar 12th, 2012 | Comments

CentOS kernel source install, first off if you are just trying to build something or compile a tool on CentOS then you probably only need to install the kernel-devel package if you are running a standard install you can install the kernel-devel package on CentOS 6 with:

yum install kernel-devel

The above command will probably fix any compile issues you are having that ask for kernel source, if it does not please read on.

On CentOS 6 there is only one kernel-devel package for both architectures x86_64 and i386 however on CentOS 5 there are three versions, if you are unsure on what version you should install then run the command uname -r which will display your kernel version you then need to match the kernel version you are running with the correct kernel-devel package below:

CentOS 5 install kernel-devel for i386 & x86_64:

yum install kernel-devel

Centos 5 install Xen kernel-devel for x86_64 & i386:

yum install kernel-xen-devel

And finally to install kerenl-devel for PAE:

yum install kernel-pae-devel

CentOS Kernel source install (full) for CentOS 5 & 6

If install kernel-devel above does not work or you require the full CentOS kernel source for another reason you can install it on CentOS 5 & 6 with:

yum install rpm-build redhat-rpm-config unifdef

As a none root user run the following:

mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
echo ‘%_topdir %(echo $HOME)/rpmbuild‘ > ~/.rpmmacros

To install the CentOS 6 kernel source

The following command will install the kernel source for CentOS 6.2, you can install it for other version of CentOS 6 simply by using the URL for the alternative version.

rpm -i http://vault.centos.org/6.2/updates/Source/SPackages/kernel-2.6.32-220.7.1.el6.src.rpm 2>&1 | grep -v mockb

How To install the CentOS 5.8 kernel source

The following will install the full kernel source on CentOS 5.8, again the same applies – you can install the kernel source for another version of CentOS 5 by swapping the URL.

rpm -i http://vault.centos.org/5.8/updates/SRPMS/kernel-2.6.18-308.1.1.el5.src.rpm 2>&1 | grep -v mockb

When you have the correct kernel source RPM installed, run the following:

cd ~/rpmbuild/SPECS

And then unpack the kernel source with:

rpmbuild -bp --target=`uname -m` kernel-2.6.spec 2> prep-err.log | tee prep-out.log

Make sure you copy and paste the commands above as the uname -m command will pull your kernel arch (e.g x86_64) and prep the source for your kernel, you can find the kernel source in your home dir in a directory called rpmbuild/BUILD/ to access the CentOS kernel source install dir type the following as the logged in user you built the kernel source with ~/rpmbuild/BUILD/

 

时间: 2024-12-13 13:25:14

centos source install的相关文章

CentOS After Install

1. Input Method: 1.1.用root登录 ,或su root 1.2.yum install "@Chinese Support" 1.3.exit 1.4.回到桌面,system->preferences->input method 1.5.如果没有,先注销一下. 1.6.到里面add输入法到列表里. 1.7.最后再注销.登录. CentOS After Install,布布扣,bubuko.com

CentOS Linux Install Core Development

How do I install all developer tools such as GNU GCC C/C++ compilers, make and others, after installing CentOS from a shell prompt?you can following the nest line do ,install almost all development tools:Open termianl or login over ssh session and ty

centos yum install redis

centos yum install redis linux下yum安装redis以及使用 1.yum install redis      --查看是否有redis   yum 源 [[email protected] ~]# yum install redis 已加载插件:fastestmirror base | 3.6 kB 00:00 docker-ce-edge | 2.9 kB 00:00 docker-ce-stable | 2.9 kB 00:00 extras | 3.4 kB

CentOS 7 install alfrasco ECM

Alfrasco is a java based Electronic Content Management tool that is available with an Open Source license. This open platform helps you regain control of critical business content, strengthen compliance, optimize processes and make collaboration easy

CentOS 7 Install Adobe Flash Player

From Officail Adobe Flash Site don't down (YUM )adobe-release-x86_64-1.0-1.noarch.rpm,but to download RPM(flash-plugin-11.2.202.621-release.x86_64.rpm) If you use SELinux, you will get a warn.Following the warn do the suggestion steps.It's OK! SELinu

aliyun CentOS 7 install software jdk mysql tomcat zentao and so on

1. install jdk #查看CentOS自带JDK是否已安装  yum list installed |grep java    #若有自带安装的JDK,如何卸载CentOS系统自带Java环境?  ##卸载JDK相关文件输入:  yum -y remove java-1.8.0-openjdk*.  ## 卸载tzdata-java输入:  yum -y remove tzdata-java.noarch.  #当结果显示为Complete!即卸载完毕.      #查看yum库中的J

CentOS 7 Install Gitlab CE

https://hostpresto.com/community/tutorials/how-to-install-and-setup-gitlab-on-centos-7/ http://linux.it.net.cn/CentOS/course/2016/0813/24330.html http://linux.it.net.cn/CentOS/course/2015/0321/14033.html https://www.nichijou.com/p/6sh26/ https://segm

CentOS 7: Install vsftpd

Install vsftpd All commands should be run with ‘root’ user. Run the following command in terminal to install vsftpd package: yum install vsftpd ftp -y Configure vsftpd Edit vsftpd configuration file /etc/vsftpd/vsftpd.conf, vi /etc/vsftpd/vsftpd.conf

CentOS 7 install Nginx

1. rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm 2. yum install -y nginx 3. systemctl start nginx.service