The OpenNET Project / Index page

[ новости /+++ | форум | wiki | теги | ]

Поиск:  Каталог документации

Next Previous Contents

2. Install RPM

To install RPM program you need gcc and BerkeleyDB. First you should decide the version of Redhat Linux which you want to use. The versions of Redhat Linux are 7.1 (latest), 6.2, 5.x (old versions).

To build rpm package you need atleast BerkeleyDB and gcc compiler. It is very important that you MUST select proper versions of gcc, BerkeleyDB and RPM source based on whether you want to represent Redhat 7.1, Redhat 6.2 or 5.x. If you happen to have a Redhat Linux box then do -

bash$ rpm -qa | grep -i gcc
bash$ rpm -qi gcc-2.96-81

bash$ rpm -qa | grep -i db3
bash$ rpm -qi db3-3.1.17-7

bash$ rpm -qa | grep -i rpm
bash$ rpm -qi rpm-4.0.2-8 

From above, you can get the proper version numbers.

WARNING: If you do not use proper version numbers of gcc, db3 and rpm combinations then RPM program may not compile or work properly..

For example - to target Redhat Linux 7.1 on Solaris, you should use gcc version 2.96, Sleepycat Berkeley DB version 3.1.17 and RPM source version 4.0.2. Any other combination of versions WILL NOT work.

You can see the list of files and programs needed to build rpm. Login on linux box and:

bash$ rpm -qR rpm-4.0.2-8
glibc >= 2.1.92
db1 = 1.85
rpmlib(CompressedFileNames) <= 3.0.4-1

To see to which package gawk belongs to do:

bash$ rpm -qif /usr/bin/gawk
Name        : gawk                         Relocations: (not relocateable)
Version     : 3.0.6                             Vendor: Red Hat, Inc.
Group       : Applications/Text             Source RPM: gawk-3.0.6-1.src.rpm

2.1 Get Gnu "gcc"

First, you need to install the Gnu C compiler gcc. You can use one of the following three sources:

If you downloaded Solaris/Unix package:

# su - root
# man pkgadd
# pkgadd -d gcc-sparc*.pkg

If you downloaded rpm package:

bash$ mkdir my_temp_build
bash$ cd my_temp_build
bash$ rpm2cpio gcc-*.src.rpm | cpio -dimv
bash$ tar zxvf gcc*.tar.gz
bash$ cd gcc-2.96
bash$ ./configure
bash$ make

2.2 Get BerkeleyDB

Second, you need to install the BerkeleyDB embedded database from RPM internally uses the embedded database BerkeleyDB to store the package information. You can use one of the following three sources:

If you downloaded source rpm or source tar.gz file:

bash$ mkdir my_temp_build
bash$ cd my_temp_build
bash$ rpm2cpio db3-3.1.17-7.src.rpm | cpio -dimv 
bash$ tar zxvf db3*.tar.gz
bash$ cd db3-3.1.17
bash$ cd build_unix
bash$ ../dist/configure --enable-compat185
bash$ make
bash$ make install

If you downloaded Unix package:

# su - root
# man pkgadd
# pkgadd -d db-3*-sparc*.pkg

Next Previous Contents

Inferno Solutions
Hosting by

Закладки на сайте
Проследить за страницей
Created 1996-2022 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру