Offline installation of PostgreSQL

Source: Internet
Author: User
Tags postgresql

PostgreSQL is easy to install online, but in many cases the server is not networked and needs to be installed offline. Here are the steps to install offline:


1. First enter the official website:

https://www.postgresql.org/


2. Click Download

3. Select the desired operating system version

4. Select the desired version

5. Download the Yum source on a network-capable machine

Yum Install https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-6-x86_64/pgdg-centos95-9.5-3.noarch.rpm


6. Download Postgres software

Yum Search Postgres

mkdir psql95

Yum install--downloadonly--downloaddir=psql95 postgresql95 postgresql95-server


7. View the downloaded package

# ls

postgresql95-9.5.13-1pgdg.rhel6.x86_64.rpm

postgresql95-libs-9.5.13-1pgdg.rhel6.x86_64.rpm

postgresql95-server-9.5.13-1pgdg.rhel6.x86_64.rpm


8. Package and transfer to an offline server that needs to be installed

# TAR-ZCVF Pg.tar.gz *

postgresql95-9.5.13-1pgdg.rhel6.x86_64.rpm

postgresql95-libs-9.5.13-1pgdg.rhel6.x86_64.rpm

postgresql95-server-9.5.13-1pgdg.rhel6.x86_64.rpm


9. In the need of installation side decompression, installation

RPM-IVH postgresql95-*


10. Start

# service postgresql-9.5 Initdb

# service postgresql-9.5 Start

# Chkconfig postgresql-9.5 on


11. Connecting Postgres

Su-postgres

Psql

postgres=# \l                                    List of databases   Name    |  Owner    | Encoding |   Collate   |    Ctype     |   Access privileges   -----------+----------+---------- +-------------+-------------+----------------------- postgres  | postgres | utf8     | en_us. Utf-8 | en_us. utf-8 |  template0 | postgres | utf8     | en _us. Utf-8 | en_us. utf-8 | =c/postgres          +             |       |         |            |              | postgres=ctc/postgres template1 | postgres |  utf8     | en_us. Utf-8 | en_us. utf-8 | =c/postgres          +          |         |            |             |            | postgres=ctc/ Postgres (3 rows)


At this point, the offline installation is complete.


Offline installation of PostgreSQL

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.