rhel5.8 x64
創新互聯公司是一家集成都網站設計、成都網站建設、網站頁面設計、網站優化SEO優化為一體的專業網絡公司,已為成都等多地近百家企業提供網站建設服務。追求良好的瀏覽體驗,以探求精品塑造與理念升華,設計最適合用戶的網站頁面。 合作只是第一步,服務才是根本,我們始終堅持講誠信,負責任的原則,為您進行細心、貼心、認真的服務,與眾多客戶在蓬勃發展的市場環境中,互促共生。
# yum install gcc rpm-build pcre-devel
# pwd
/usr/src/redhat
# ls
BUILD RPMS SOURCES SPECS SRPMS
# tar jxvf nagios-cn-3.2.3.tar.bz2
# tar czvf nagios-cn-3.2.3.tar.gz nagios-cn-3.2.3
# cp nagios-cn-3.2.3.tar.gz /usr/src/redhat/SOURCES/
# cd nagios-cn-3.2.3
# cp nagios.spec /usr/src/redhat/SPECS/
# rpmbuild -ba nagios.spec
Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/nagios-cn-buildroot
Wrote: /usr/src/redhat/SRPMS/nagios-cn-3.2.3-1.src.rpm
Wrote: /usr/src/redhat/RPMS/x86_64/nagios-cn-3.2.3-1.x86_64.rpm
Wrote: /usr/src/redhat/RPMS/x86_64/nagios-cn-www-3.2.3-1.x86_64.rpm
Wrote: /usr/src/redhat/RPMS/x86_64/nagios-cn-devel-3.2.3-1.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.64353
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd nagios-cn-3.2.3
+ rm -rf /var/tmp/nagios-cn-buildroot
+ exit 0
==++++++++++++++++++++++++++++++++++++++++++++++++++=======
rhel 6.5x64
# yum install gcc rpm-build pcre-devel
# yum install -y gd-devel zlib-devel libpng-devel libjpeg-devel gd-devel libjpeg-devel
# pwd
/usr/src/redhat
# ls
BUILD RPMS SOURCES SPECS SRPMS
# tar jxvf nagios-cn-3.2.3.tar.bz2
# tar czvf nagios-cn-3.2.3.tar.gz nagios-cn-3.2.3
# cp nagios-cn-3.2.3.tar.gz /usr/src/redhat/SOURCES/
# cd nagios-cn-3.2.3
# cp nagios.spec /usr/src/redhat/SPECS/
# cd /usr/src/redhat/SPECS/
# vim nagios.spec
41 BuildRequires: gd-devel > 1.8, zlib-devel > 1.2.2, libpng-devel > 1.2.30, libjpeg-devel > 6.1.9 //修改前
41 BuildRequires: gd-devel > 1.8, zlib-devel > 1.2.2, libpng-devel > 1.2.30, libjpeg-devel //修改后
#rpmbuild
-bp 只作準備 (解壓與打補丁)
-bc 準備并編譯
-bi 編譯并安裝
-bl 檢驗文件是否齊全
-ba 編譯后做成*.rpm和src.rpm
-bb 編譯后做成*.rpm
-bs 只做成*.src.rpm
# rpmbuild -bb nagios.spec
*******
Processing files: nagios-cn-devel-3.2.3-1
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: nagios-cn = 3.2.3
Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/nagios-cn-buildroot
Wrote: /usr/src/redhat/RPMS/x86_64/nagios-cn-3.2.3-1.x86_64.rpm
Wrote: /usr/src/redhat/RPMS/x86_64/nagios-cn-www-3.2.3-1.x86_64.rpm
Wrote: /usr/src/redhat/RPMS/x86_64/nagios-cn-devel-3.2.3-1.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.19349
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd nagios-cn-3.2.3
+ rm -rf /var/tmp/nagios-cn-buildroot
+ exit 0
You have new mail in /var/spool/mail/root
============================
分享名稱:nagios制作rpm包
瀏覽地址:http://vcdvsql.cn/article8/pcdeop.html
成都網站建設公司_創新互聯,為您提供建站公司、電子商務、服務器托管、外貿網站建設、用戶體驗、App開發
聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯