最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Centos下rpm包如何制作?Centos下rpm包制作的方法

  發(fā)布時(shí)間:2016-12-08 12:04:35   作者:佚名   我要評(píng)論
很多朋友還不知道Centos下rpm包如何制作?下面小編就為大家?guī)?lái)Centos下rpm包制作的方法;有需要的朋友可以過(guò)來(lái)看看

談?wù)揜PM對(duì)好多編譯安裝的朋友來(lái)多,RPM安裝是傻瓜安裝。

呵呵,其實(shí)RPM是一種非常有效果的集中部署的解決方案。

yum+RPM是非??焖俦憬莸拇笠?guī)模部署方案。

下面簡(jiǎn)單介紹下rpm的制作:

以cronolog為例:

首先下載cronolog的源碼包。

解開(kāi)源碼包,tar xzvf cronolog-1.6.2.tar.gz

找到 cronolog.spec 該文件是定制如何生成RPM包的配置文件

vim cronolog.spec
%define name cronolog
%define version 1.6.2
%define release 1
%define group System Networking/Daemons
Summary:        a flexible log file rotation program for Apache
Name:           %{name}
Version:        %{version}
Release:        %{release}
Copyright:      Apache license
Group:          %{group}
Packager:       Andrew Ford <A.Ford@ford-mason.co.uk>
URL:            http://www.ford-mason.co.uk/resources/cronolog/
Source:         http://www.ford-mason.co.uk/resources/cronolog/cronolog-%version.tar.gz
BuildRoot:      /tmp/%{name}-root
%description
"cronolog" is a simple program that reads log messages from its input
and writes them to a set of output files, the names of which are
constructed using template and the current date and time.  The
template uses the same format specifiers as the Unix date command
(which are the same as the standard C strftime library function).
%changelog
%prep
%setup -n %{name}-%{version}
%build
./configure
make 
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/share/doc/%{name}-${RPM_PACKAGE_VERSION} -m 755
make prefix=$RPM_BUILD_ROOT/usr mandir=$RPM_BUILD_ROOT/usr/share/man install
install -m 644 README $RPM_BUILD_ROOT/usr/share/doc/%name-${RPM_PACKAGE_VERSION}
#install -m 644 $RPM_SOURCE_DIR/doc/cronolog.1m $RPM_BUILD_ROOT/usr/man/man1/cronolog.1
#install -m 755 $RPM_SOURCE_DIR/src/cronolog $RPM_BUILD_ROOT/usr/sbin/cronolog
#strip  $RPM_BUILD_ROOT/usr/sbin/* || echo Ignored strip on a non-binary file
%post
%preun
%postun
%clean
rm -rf $RPM_BUILD_ROOT
%files
#%attr(-,root,root) /usr/share/doc/%{name}-%{version}/README
%attr(-,root,root) /usr/sbin/cronolog
%attr(-,root,root) /usr/sbin/cronosplit
#%files man
%attr(644,root,root) /usr/share/man/man1/*.1*
%doc README

復(fù)制代碼然后,將源碼包復(fù)制到 /usr/src/redhat/SOURCES/

cp cronolog-1.6.2.tar.gz /usr/src/redhat/SOURCES/

執(zhí)行,rpmbuild -ba cronolog.spec

這樣RPM包就生成了,^_^

ls -l /usr/src/redhat/RPMS/i386/

相關(guān)文章

最新評(píng)論

宁乡县| 迁安市| 鹤庆县| 故城县| 微博| 汝州市| 高陵县| 韶山市| 千阳县| 天水市| 莆田市| 枝江市| 巴彦淖尔市| 广安市| 广安市| 郓城县| 开原市| 阳高县| 施甸县| 绥德县| 绥德县| 吴川市| 江孜县| 兴海县| 贺州市| 敦化市| 孟村| 谢通门县| 祥云县| 同德县| 尉犁县| 西丰县| 高安市| 罗城| 博客| 黑水县| 阿克苏市| 饶平县| 宣恩县| 宿松县| 龙江县|