<span id='38jfa'></span>
    <i id='38jfa'></i>

    <acronym id='38jfa'><em id='38jfa'></em><td id='38jfa'><div id='38jfa'></div></td></acronym><address id='38jfa'><big id='38jfa'><big id='38jfa'></big><legend id='38jfa'></legend></big></address>

  • <tr id='38jfa'><strong id='38jfa'></strong><small id='38jfa'></small><button id='38jfa'></button><li id='38jfa'><noscript id='38jfa'><big id='38jfa'></big><dt id='38jfa'></dt></noscript></li></tr><ol id='38jfa'><table id='38jfa'><blockquote id='38jfa'><tbody id='38jfa'></tbody></blockquote></table></ol><u id='38jfa'></u><kbd id='38jfa'><kbd id='38jfa'></kbd></kbd>
  • <fieldset id='38jfa'></fieldset>

    <dl id='38jfa'></dl>

        <ins id='38jfa'></ins>

          <code id='38jfa'><strong id='38jfa'></strong></code>
          <i id='38jfa'><div id='38jfa'><ins id='38jfa'></ins></div></i>
          1. Centos下rpm包如何制作?

            • 时间:
            • 浏览:10
            • 来源:124软件资讯网

                Centos下rpm包怎样制作?

              谈论RPM对很多多少编译安装的朋侪来多  ,RPM安装是傻瓜安装  。

                呵呵 ,实在RPM是一种很是有用果的集中部署的解决方案  。

                yum+RPM是很是快速便捷的大规模部署方案 。

                下面简朴先容下rpm的制作:

                以cronolog为例:

                首先下载cronolog的源码包  。

                解开源码包,tar xzvf cronolog-1.6.2.tar.gz

                找到 cronolog.spec 该文件是定制怎样天生RPM包的设置文件

                ?

              1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 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 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

                复制代码然后  ,将源码包复制到 /usr/src/redhat/SOURCES/

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

                执行  ,rpmbuild -ba cronolog.spec

                这样RPM包就天生了 ,^_^

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