温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

nagios制作rpm包

发布时间:2020-10-16 08:02:15 来源:网络 阅读:377 作者:zhaogaolong8 栏目:移动开发



rhel5.8 x64

# 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









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


向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI