Building RPM packages from tar.gz archives

Building RPM packages from tar.gz archives

If you are runnig a system with RPM support, the preferred way to install httpd on your system will be the creation of a nice RPM package. First you should get the current source of httpd, either as a tar.gz archive from the httpd download page

If you have downloaded a tar.gz archives of httpd, create and install the RPMs just by doing the following steps

To build the httpd package and install it do:

1.

Go to your RPM "topdir". This normally is /usr/src/redhat for the redhat distribution

% cd /usr/src/redhat

2.

Put the tar.gz archive into the SOURCES subdirectory (you have to replace "somewhere" with the real directory where the files are, of course).

% cp /somewhere/httpd-XXX.tar.gz SOURCES

3.

Extract the spec file from the archives and put it into the SPEC subdirectory.

% tar -xOzf SOURCES/httpd-XXX.tar.gz \*.spec > SPECS/httpd.spec

4.

Let rpm do the compile job and generate the rpm of httpd. If you only want to make a binary package, you can specify -bb instead of -ba, or just -bs to build only a source package.

% rpmbuild -ba SPECS/kwave.spec

5.

If everything was ok, you can install the binary rpm of httpd, it will be in the BUILD directory. If you already have a version of httpd installed, please remove it first or use the parameter -U instead of -i for upgrading instead of installing.

% rpm -ivh BUILD/[arch]/httpd-XXX.[arch].rpm or % rpm -Uvh BUILD/[arch]/httpd-XXX.[arch].rpm

No comments:

Other Articles

Enter your email address: