How to install PostgreSQL client tool psql only

Source: Internet
Author: User
Tags psql postgresql client
The method for installing only the PostgreSQL client tool psql recently has a project. the customer uses ppas of edb and does not only install the psql installation package. the customer said that there was some inconvenience and the following DIY was available, green. Postgresql should be the same without testing. The idea is to combine the packages on which psql depends with psql so that psql can be found and loaded during execution.

The method for installing only the PostgreSQL client tool psql recently has a project. the customer uses ppas of edb and does not only install the psql installation package. the customer said that there was some inconvenience and the following DIY was available, green. Postgresql should be the same without testing. The idea is to combine the packages on which psql depends with psql so that psql can be found and loaded during execution.

How to install PostgreSQL client tool psql only

In a recent project, the customer used edb's ppas instead of installing only the psql installation package. the customer said that there was some inconvenience and the following DIY and green installation packages were available. Postgresql should be the same without testing. The idea is to combine the packages on which psql depends with psql so that psql can be found and loaded during execution. For detailed steps, see the following

1

1.1

To install the psql client only, you only need to copy the following files from the edb server to the client on windows (the server and client should be both 32-bit and 64-bit)

Libeay32.dll

Libintl-8.dll

Libpq. dll

Psql.exe

Ssleay32.dll

1.2

Then you can:

E: \ psql> psql.exe-h 192.168.1.117-p 5444-U enterprisedb beigang

Password for user login isedb:

Psql (9.2.1.3)

Type "help" for help.

Beigang = #

2

2.1

Create a folder psql_client, create a lib sub-folder in it, copy psql to psql_client, and copy libcrypto. so.1.0.0, libpq. so.5, and libssl. so.1.0.0 to lib.

[Root @ hadoopDataNode1 Desktop] # ll

Total 4

Drwxr-xr-x. 3 root 4096 May 30 psql_client

[Root @ hadoopDataNode1 Desktop] # ll psql_client/

Total 552

Drwxr-xr-x. 2 root 4096 May 30 lib

-Rwxr-xr-x. 1 root 559397 May 30 psql

[Root @ hadoopDataNode1 Desktop] # ll psql_client/lib/

Total 2736

-Rw-r --. 1 root 2126936 May 30 libcrypto. so.1.0.0

-Rw-r --. 1 root 209505 May 30 libpq. so.5

-Rw-r --. 1 root 455094 May 30 libssl. so.1.0.0

2.2

Create the file psql_client.conf in/etc/ld. so. conf. d/and write/root/Desktop/psql_client/lib/

[Root @ hadoopDataNode1 psql_client] # cat/etc/ld. so. conf. d/psql_client.conf

/Root/Desktop/psql_client/lib/

2.3

Run ldconfig in the command line

2.4

Then use psql to log on to the database.

Server :~ /Desktop/psql_client #./psql-U enterprisedb beigang

[Root @ Server psql_client] #./psql-h 192.168.10.55-p 5444-U enterprisedb beigang

Password for user login isedb:

Psql (9.2.0.1)

Type "help" for help.

Beigang = #

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.