## Get CentOS 6.9 Source code
"yum -y install kernel-devel" 安裝complier tool
"mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}" 創建一個Build source folder
"echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros" 指定創建位址
要在 CentOS-6 安裝源代碼套件及工具:
以 root 的身份安裝 rpm-build、redhat-rpm-config、asciidoc、bison、hmaccalc、patchutils、perl-ExtUtils-Embed、
xmlto、audit-libs-devel、binutils-devel、elfutils-devel、elfutils-libelf-devel、newt-devel、python-devel 及 zlib-devel 套件:
"yum -y install rpm-build redhat-rpm-config asciidoc bison hmaccalc patchutils perl-ExtUtils-Embed xmlto"
"yum -y install audit-libs-devel binutils-devel elfutils-devel elfutils-libelf-devel"
"yum -y install ncurses-devel newt-devel python-devel zlib-devel"
"yum -y install openssl-devel"
"yum install rpm-build redhat-rpm-config asciidoc hmaccalc perl-ExtUtils-Embed pesign xmlto"
"yum install audit-libs-devel binutils-devel elfutils-devel elfutils-libelf-devel"
"yum install ncurses-devel newt-devel numactl-devel pciutils-devel python-devel zlib-devel"
從這些地方找尋內核的源代碼套件:
http://vault.centos.org/6.N/os/Source/SPackages/
http://vault.centos.org/6.N/updates/Source/SPackages/
or 直接抓取
"rpm -i http://vault.centos.org/6.9/updates/Source/SPackages/kernel-2.6.32-696.28.1.el6.src.rpm 2>&1 | grep -v exist"
Build 出 CentOS source code,
"cd ~/rpmbuild/SPECS"
"rpmbuild -bp --target=$(uname -m) kernel.spec"
Centos source code in /root/rpmbuild/BUILD/kernel-2.6.32-696.28.1.el6/linux-2.6.32-696.28.1.el6.x86_64
PS. 若發現GCC太舊,請update gcc "yum update gcc"
## 安裝網路設定命令工具
#系統設定套件 - setup 工具包
yum -y install setuptool
#系統設定套件 - 服務套件
yum -y install ntsysv
#系統設定套件 - 網路管理
yum -y install system-config-network-tui
#系統設定套件 - 防火牆設定
yum -y install system-config-firewall-tui
#系統設定套件 - 安全性設定
yum -y install system-config-securitylevel-tui
沒有留言:
張貼留言