PostgreSQL provides client installation packages and the required dynamic shared library packages for different OSs on its official website. Click here to obtain the latest PostgreSQL 9.5 client installation package for Red Hat Linux 6. The following procedure uses the latest version of PostgreSQL 9.5 as an example to illustrate how to obtain the required installation package and install the PostgreSQL client.
Find the link to the required version on the download page. postgresql95 is used as an example in the following figure.
Find the link to the required version on the download page. postgresql95-libs is used as an example in the following figure.
When you create an ECS, select an OS, such as Red Hat 6.6, and bind an EIP to it. Then, upload the installation and dynamic shared library packages to the ECS using a remote tool, and use PuTTY to connect to the ECS.
sudo rpm -ivh postgresql95-9.5.7-1PGDG.rhel6.x86_64.rpm postgresql95-libs-9.5.7-1PGDG.rhel6.x86_64.rpm
rpm -ivh --replacefiles postgresql95-9.5.7-1PGDG.rhel6.x86_64.rpm postgresql95-libs-9.5.7-1PGDG.rhel6.x86_64.rpm
rpm -ivh --nodeps postgresql95-9.5.7-1PGDG.rhel6.x86_64.rpm postgresql95-libs-9.5.7-1PGDG.rhel6.x86_64.rpm