说明: RHELAS4 U2-U4 以Apache 2.0.X Released 产品线最新版本httpd-2.0.59.tar.gz+
apr-0.9.13+apr-util-0.9.13来制作最新版本的rpm软件安装包
第一步 编译环境
mkdir $HOME/rpm
mkdir $HOME/rpm/SOURCES
mkdir $HOME/rpm/SPECS
mkdir $HOME/rpm/BUILD
mkdir $HOME/rpm/SRPMS
mkdir $HOME/rpm/RPMS
mkdir $HOME/rpm/RPMS/i386
echo "%_topdir $HOME/rpm" >> $HOME/.rpmmacros
第二下 下载httpd-2.0.59对应的apr的版本apr-0.9.13+apr-util-0.9.13
rpmbuild -ta --nodeps apr-0.9.13.tar.gz
rpm ivh /root/rpm/RPMS/i386/apr-0.9.13-1.i386.rpm (如果系统里有用 Uvh升级安装)
rpm ivh /root/rpm/RPMS/i386/apr-devel-0.9.13-1.i386.rpm
rpmbuild -ta --nodeps apr-util-0.9.13.tar.gz (系统里有apr-0.9.13才能编译此步)
rpm ivh /root/rpm/RPMS/i386/apr-util-0.9.13-1.i386.rpm
rpm ivh /root/rpm/RPMS/i386/apr-util-devel-0.9.13-1.i386.rpm
第三步 http://httpd.apache.org 下载
注: Apache 2.2.X Released 为一个产品线
Apache 2.0.X Released httpd-2.0.59.tar.gz为此产品线的最新版本
Apache 1.3.X Released
第四步 提取 httpd.spces
tar -zxvf httpd-2.0.59.tar.gz
cp httpd.spec $HOME/rpm/SPECS下
cp httpd-2.0.59.tar.gz $HOME/rpm/SOURCES
vi $HOME/rpm/SPECS/httpd.spec
在
%prep
%setup -q
上面插入以下
[Copy to clipboard] [ - ]
CODE:
%package suexec
Group: System Environment/Daemons
Summary: suexec binary for the Apache HTTP server
PreReq: httpd = %{version}-%{release}
%description suexec
This package includes the /usr/sbin/suexec binary which can be installed
to allow the Apache HTTP server to run CGI programs (and any programs
executed by SSI pages) as a user other than the 'apache' user.
在%changelog的上方插入以下
[Copy to clipboard] [ - ]
CODE:
%files suexec
%defattr(-,root,root)
%attr(4510,root,%{suexec_caller}) %{_sbindir}/suexec
%{_mandir}/man8/suexec.8*
下面开始用rpmbuild制作最新httpd-2.0.X 最新rpm安装包
rpmbuild -ba --nodeps $HOME/rpm/SPECS/httpd.spec
到些你就会得到以下提示
Wrote: /root/rpm/SRPMS/httpd-2.0.59-1.src.rpm
Wrote: /root/rpm/RPMS/i386/httpd-2.0.59-1.i386.rpm
Wrote: /root/rpm/RPMS/i386/httpd-devel-2.0.59-1.i386.rpm
Wrote: /root/rpm/RPMS/i386/httpd-manual-2.0.59-1.i386.rpm
Wrote: /root/rpm/RPMS/i386/mod_ssl-2.0.59-1.i386.rpm
Wrote: /root/rpm/RPMS/i386/httpd-suexec-2.0.59-1.i386.rpm
Wrote: /root/rpm/RPMS/i386/httpd-debuginfo-2.0.59-1.i386.rpm
到些结束谢谢观看!!!!!!!!!!!!!