centos6.4安装源码过程
来源:互联网 发布:js new function 用法 编辑:程序博客网 时间:2024/06/06 01:11
uname -r
2.6.32-358.el6.i686
2、下载src.rpm包
http://vault.centos.org/6.4/os/Source/SPackages/kernel-2.6.32-358.el6.src.rpm
3、普通用户执行:
mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros
4、root用户执行:
yum install rpm-build redhat-rpm-config asciidoc hmaccalc perl-ExtUtils-Embed xmlto
yum install audit-libs-devel binutils-devel elfutils-devel elfutils-libelf-devel
yum install newt-devel python-devel zlib-devel
5、创建用户mockbuild,因为在第6步rpm安装的时候,需要这个用户
useradd -s /sbin/nologin mockbuild
6、普通用户执行,该执行过程中,需要用到mockbuild用户,否则会出现告警
(warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root):
具体执行:
[hadoop@hadoop1 ~]$rpm -ivh kernel-2.6.32-358.2.1.e16.src.rpm
[hadoop@hadoop1 ~]$ cd ~/rpmbuild/
[hadoop@hadoop1 rpmbuild]$ cd SPECS/
[hadoop@hadoop1 SPECS]$ ls
kernel.spec
[hadoop@hadoop1 SPECS]$ rpmbuild -bp --target=$(uname -m) kernel.spec
Building target platforms: i686
Building for target i686
error: Failed build dependencies:
gcc >= 3.4.2 is needed by kernel-2.6.32-358.el6.i686
patchutils is needed by kernel-2.6.32-358.el6.i686
bison is needed by kernel-2.6.32-358.el6.i686
缺少包,root安装:
yum install gcc
yum install patchutils
yum install bison
在yum中,如果遇到:
[root@hadoop1 SPECS]# yum install bison
Loaded plugins: fastestmirror, refresh-packagekit, security
Existing lock /var/run/yum.pid: another copy is running as pid 23151.
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 25 M RSS ( 71 MB VSZ)
Started: Thu May 22 12:15:12 2014 - 00:10 ago
State : Sleeping, pid: 23151
[root@hadoop1 SPECS]# ps -ef|grep 23151
root 23151 22792 1 12:15 ? 00:00:01 /usr/bin/python /usr/share/PackageKit/helpers/yum/yumBackend.py get-updates none
这个是常规更新程序,直接用kill -9 停掉就可以了。
6、源码位置
~/rpmbuild/BUILD/kernel-2.6.32-358.el6/linux-2.6.32-358.el6.i686
[hadoop@hadoop1 linux-2.6.32-358.el6.i686]$ ls
arch config-powerpc64-kdump-rhel CREDITS merge.pl
block config-powerpc64-rhel crypto mm
check-kabi config-powerpc-generic Documentation net
config-debug config-powerpc-generic-rhel drivers perf
config-debug-rhel configs extract.pub pubring.gpg
config-framepointer config-s390x extrakeys.pub random_seed
config-generic config-s390x-debug firmware README
config-generic-rhel config-s390x-debug-rhel fs REPORTING-BUGS
config-i686 config-s390x-generic-rhel include samples
config-i686-debug config-s390x-kdump init scripts
config-i686-debug-rhel config-s390x-kdump-rhel ipc secring.gpg
config-i686-nodebug config-s390x-rhel kabitool security
config-i686-nodebug-rhel config-x86_64-debug Kbuild sound
config-i686-rhel config-x86_64-debug-rhel kernel temp-i686-debug-final
config-ia64-generic-rhel config-x86_64-generic kernel.pub temp-i686-final
config-nodebug config-x86_64-generic-rhel kernel.pub~ tools
config-nodebug-rhel config-x86_64-nodebug kernel.sec trustdb.gpg
config-powerpc64 config-x86_64-nodebug-rhel lib usr
config-powerpc64-debug config-x86-generic MAINTAINERS virt
config-powerpc64-debug-rhel config-x86-generic-rhel Makefile
config-powerpc64-kdump COPYING Makefile.common
- centos6.4安装源码过程
- CentOS6.5+mysql5.1源码安装过程
- 转载:centos6.4 安装过程详细图解
- centos6源码安装postgresql 9.1.4
- CentOS6.4编译源码安装svn
- centos6.4 svn1.8.5源码安装
- centos6.4源码安装apache 服务
- CentOS6.4下源码安装MySQL5.6.15
- CentOS6.5源码安装nodejs4.4
- Centos6.4下源码安装zabbix3.4.4
- centos6.8源码安装apache2.4
- CentOS6安装内核源码
- CentOS6.4 LVS rpm包安装及源码安装
- centos6.1安装VSFTPD过程
- centos6.2安装codeblocks过程
- Centos6.5安装过程图解
- Centos6.5 源码安装LAMP
- centos6.7源码安装mysql
- java基础入门之Hibernate 入门
- Google Map经纬度偏移修正算法完美解决方案
- 数据库 视图建立
- MVC模式的设计思想
- ios UITableView封装之下拉-上提-图片异步加载
- centos6.4安装源码过程
- java ArrayList列表取值有关问题
- maven3.0+spring-mvc.3.0+hibernat-jpa-2.0 运行问题求助
- java spring中对properties属性文件加密及其解密
- jsp怎么实现想servlet,提交数据呢?
- iptables
- 【Linux】Linux 目录结构
- Python学习笔记3-简介
- 【原创】Ubuntu中定时删除指定日期之前的文件