How to make a non-dependent PostgreSQL database RPM package on REDHAT6 (7) or CentOS6 (7)

Source: Internet
Author: User
Tags postgresql git clone rpmbuild

This article solves the source code installation needs to check the system on whether the application depends on the software package to worry about the source code developers also have some help. Can be modified on the basis of the appropriate to meet their own requirements.

The REDHAT5 or CentOS5 has provided a directory for RPM packages that can be placed directly into the system-specific directory of the applications that need to make the RPM package, without having to create a directory of RPM packages yourself, like on REDHAT6 (7) or CentOS6 (7).

1 Adding a normal user

Useradd Redhat

passwd Redhat

Redhat

Redhat

2 Switch to normal user Redhat

Su–redhat

3 Create rpmbuild directory in Redhat's home directory

MKDIR–PV Rpmbuild/{build,rpms,sources,specs,srpms}

4 Cloning The Pgrpms Project (http://git.postgresql.org/gitweb/?p=pgrpms.git) to a local

Cd/opt

mkdir pgrpm

git clone git://git.postgresql.org/git/pgrpms.git

/opt/pgrpm/pgrpms

5 copy files from the PGRPMS project to the local system version in the directory to the created source directory

cp/opt/pgrpm/pgrpms/rpm/redhat/9.4/postgresql/el-6/*/home/redhat/rpmbuild/source

Cd/home/redhat/rpmbuild/source

CP Postgresql-9.4.spec. /spec

6 Download PG9.4.5 source package with PG9.4.5 official documents to/opt/soft_bak

POSTGRESQL-9.4.5.TAR.BZ2 postgresql-9.4-a4.pdf

7 Copy the PG9.4.5 source package and the PG9.4.5 document to/home/redhat/rpmbuild/source

Directory under

8 Installing the PostgreSQL dependency pack

Glibc-devel Bison Flex perl-extutils-embed per (extutils::makemaker) Python-devel tcl-devel readline-devel Openssl-devel krb5-devel e2fsprogs-devel libxml2-devel libxslt-devel pam-devel libuuid-devel openldap-devel openjade OPENSP Docbook-dtds

Docbook-style-dsssl

9 start playing PG9.4.5 binary RPM package

(Yum install–y rpm-build)

Cd/home/redhat/rpmbuild/spec

RPMBUILD–BB Postgresql-9.4.spec

10 View the RPM package.

The RPM package is stored in the RPMs directory.

How to make a non-dependent PostgreSQL database RPM package on REDHAT6 (7) or CentOS6 (7)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.