189 8069 5689

nagios制作rpm包-创新互联

rhel5.8 x64

创新互联公司成立于2013年,先为玛沁等服务建站,玛沁等地企业,进行企业商务咨询服务。为玛沁企业网站制作PC+手机+微官网三网同步一站式服务解决您的所有建站问题。

# 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

============================

另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


本文名称:nagios制作rpm包-创新互联
当前URL:http://cdxtjz.com/article/hiois.html

其他资讯