Talking about RPM to many compiled and installed friends, RPM installation is a fool to install.
Oh, in fact, RPM is a very effective centralized deployment of the solution.
YUM+RPM is a very fast and convenient large-scale deployment scenario.
Below is a brief introduction to the production of RPM:
Take Cronolog as an example:
First download the Cronolog source package.
Unlock the source package, tar xzvf cronolog-1.6.2.tar.gz
Find Cronolog.spec The file is a configuration file that customizes how to generate the RPM package
1
2
3
4
5
6
7
8
9
Ten
one
,
,
,
,
The
(a)
"
"
to
-
(a)
-
$
Panax notoginseng
+
|
%define Group System Networking/daemons
Summary:a Flexible log filerotation for Apache
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
"
cronolog" is "a", "reads" Log messages from its input
and writes them to a setof output files, the names of whichare
Constructed using template and the current dateand time. The
Template uses the same formatspecifiers as the Unix Datecommand
( whichare the same as the standard C strftime library function).
%setup-n%{name}-%{version}
mkdir-P $RPM _build_root/usr/share/doc/%{name}-${rpm_package_version}-M 755
makeprefix= $RPM _build_root/usrmandir= $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
#%attr (-,root,root)/usr/share/doc/%{name}-%{version}/readme
%attr (-,root,root)/usr/sbin/cronolog
%attr (-,root,root)/usr/sbin/cronosplit
%attr (644,root,root)/usr/share/man/man1/*.1*
|
Copy the code and then copy the source package to the/usr/src/redhat/sources/
CP cronolog-1.6.2.tar.gz/usr/src/redhat/sources/
execution, Rpmbuild-ba Cronolog.spec
So the RPM package is generated, ^_^