centos6 4安裝原始碼過程

2021-06-22 04:05:25 字數 3936 閱讀 8890

1、檢查核心版本

uname -r

2.6.32-358.el6.i686

3、普通使用者執行:

mkdir -p ~/rpmbuild/

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.

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原始碼安裝apache 服務

我的環境 centos6.4 mini 最小化安裝 需要準備 gcc,gcc c make,apr,apr util,pcre 開始安裝 安裝gcc yum y install gcc 安裝gcc c yum y install gcc c 安裝 make yum y install make 解壓...

CentOS 6 4 下原始碼安裝gcc 4 8 1

1.準備 yum install glibc static libstdc static y 安裝c和c 的靜態庫 yum install gcc gcc c 安裝舊版本gcc,c 編譯器 cd data tools tar jxvf gcc 4.8.1.tar.bz2 解壓縮 cd gcc 4.8...

centos6 4安裝使用wine

分類 centos 2013 07 17 15 52 75人閱讀收藏 舉報 rpm ivh epel release 6 8.noarch.rpm rpm import etc pki rpm gpg rpm gpg key epel 6 yum makecache yum install wine...