Install Postgresql in Ubutnu 16.04 LTS

Source: Internet
Author: User
Tags deprecated postgresql postgresql packages psql unpack

The PostgreSQL database is a high-performance, full-featured, open-source relational database that explains how to install PostgreSQL 10 under Ubuntu 16.04 LTS.

Add a software source
wget -q -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -sudo sh -c ‘echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list‘
Update local cache
apt update
Installation
[email protected] ~ $ apt Install postgresql-10-yreading package lists ... Donebuilding Dependency Tree Reading state information ... Donethe following packages were automatically installed and is no longer required:bbswitch-dkms lib32gcc1 libc6-i386 Li Bjansson4 libvdpau1 libxnvctrl0 screen-resolution-extra xserver-xorg-legacyuse ' sudo apt autoremove ' to remove them. The following additional packages'll be Installed:libjs-underscore libpq5 libwxbase3.0-0v5 libwxgtk3.0-0v5 pgadmin3-da Ta pgdg-keyring postgresql-client-10 postgresql-client-common postgresql-commonsuggested Packages:javascript-common Postgresql-contrib locales-all postgresql-doc-10 libjson-perlrecommended packages:pgagent sysstatThe following NEW Packages'll be Installed:libjs-underscore libwxbase3.0-0v5 libwxgtk3.0-0v5 pgadmin3 pgadmin3-data pgdg-keyring postgr Esql-10 postgresql-client-10 Postgresql-client-common postgresql-commonthe following packages would be upgraded:libpq51 Upgraded, ten newlyinstalled, 0 to remove and 1 not upgraded. Need to get 17.3 MB of archives. After this operation, 70.0 MB of additional disk space would be used. Get:1 Http://mirrors.ustc.edu.cn/ubuntu xenial/main amd64 libjs-underscore all 1.7.0~DFSG-1UBUNTU1 [46.7 kb]get:2 http ://mirrors.ustc.edu.cn/ubuntu xenial-updates/universe amd64 libwxbase3.0-0v5 amd64 3.0.2+dfsg-1.3ubuntu0.1 [971 KB] Get:3 http://mirrors.ustc.edu.cn/ubuntu xenial-updates/universe amd64 libwxgtk3.0-0v5 amd64 3.0.2+dfsg-1.3ubuntu0.1 [ 4,344 kb]get:4 http://apt.postgresql.org/pub/repos/apt xenial-pgdg/main amd64 libpq5 amd64 10.1-1.pgdg16.04+1 [157 KB] Get:5 http://apt.postgresql.org/pub/repos/apt xenial-pgdg/main amd64 pgadmin3-data all 1.22.2-2.pgdg16.04+1 [2,516 KB]                                                                                                                          Get:6 http://apt.postgresql.org/pub/repos/apt xenial-pgdg/main amd64 pgadmin3 amd64 1.22.2-2.pgdg16.04+1 [3,067 KB] Get:7 h Ttp://apt.postgresql.org/pub/repos/apt xenial-pgdg/main amd64 pgdg-keyring all 2017.3 [10.3 KB] Get:8 http://apt.postgresql.org/pub/repos/                                                                                                                  Apt Xenial-pgdg/main amd64 postgresql-client-common all 188.pgdg16.04+1 [81.5 KB] Get:9 http://apt.postgresql.org/pub/repos/apt Xen                                                                                                                Ial-pgdg/main AMD64 postgresql-client-10 amd64 10.1-1.pgdg16.04+1 [1,277 KB] Get:10 http://apt.postgresql.org/pub/repos/apt XENIAL-PG                                                                                                                         Dg/main AMD64 Postgresql-common All 188.pgdg16.04+1 [KB]  Get:11 http://apt.postgresql.org/pub/repos/apt Xenial-pgdg/main AMD64 postgresql-10 AMD10.1-1.pgdg16.04+1 [4,635 KB]                                                                                                                                                                                 Fetched 17.3 MB in 6min 12s (46.5 kb/s) preconfiguring packages ... Selecting previously unselected package Libjs-underscore. (Reading database ... 210818 files and directories currently installed.) Preparing to unpack .../libjs-underscore_1.7.0~dfsg-1ubuntu1_all.deb ... Unpacking Libjs-underscore (1.7.0~DFSG-1UBUNTU1) ... Preparing to unpack .../libpq5_10.1-1.pgdg16.04+1_amd64.deb ... Unpacking Libpq5:amd64 (10.1-1.pgdg16.04+1) over (9.5.10-0ubuntu0.16.04) ... Selecting previously unselected package libwxbase3.0-0v5:amd64. Preparing to unpack .../libwxbase3.0-0v5_3.0.2+dfsg-1.3ubuntu0.1_amd64.deb ... Unpacking Libwxbase3.0-0v5:amd64 (3.0.2+dfsg-1.3ubuntu0.1) ... Selecting previously unselected package libwxgtk3.0-0v5:amd64. Preparing to unpack .../libwxgtk3.0-0v5_3.0.2+dfsg-1.3ubuntu0.1_amd64.deb ... Unpacking libwxgtk3.0-0v5:amd64 (3.0.2+dfsg-1.3ubuntu0.1) ... Selecting previously unselected package pgadmin3-data. Preparing to unpack .../pgadmin3-data_1.22.2-2.pgdg16.04+1_all.deb ... Unpacking Pgadmin3-data (1.22.2-2.pgdg16.04+1) ... Selecting previously unselected package pgadmin3. Preparing to unpack .../pgadmin3_1.22.2-2.pgdg16.04+1_amd64.deb ... Unpacking pgadmin3 (1.22.2-2.pgdg16.04+1) ... Selecting previously unselected package pgdg-keyring. Preparing to unpack .../pgdg-keyring_2017.3_all.deb ... Unpacking pgdg-keyring (2017.3) ... Selecting previously unselected package Postgresql-client-common. Preparing to unpack .../postgresql-client-common_188.pgdg16.04+1_all.deb ... Unpacking Postgresql-client-common (188.pgdg16.04+1) ... Selecting previously unselected package postgresql-client-10. Preparing to unpack .../postgresql-client-10_10.1-1.pgdG16.04+1_amd64.deb ... Unpacking postgresql-client-10 (10.1-1.pgdg16.04+1) ... Selecting previously unselected package Postgresql-common. Preparing to unpack .../postgresql-common_188.pgdg16.04+1_all.deb ... Adding ' Diversion of/usr/bin/pg_config to/usr/bin/pg_config.libpq-dev by Postgresql-common ' Unpacking Postgresql-common (188.pgdg16.04+1) ... Selecting previously unselected package postgresql-10. Preparing to unpack .../postgresql-10_10.1-1.pgdg16.04+1_amd64.deb ... Unpacking postgresql-10 (10.1-1.pgdg16.04+1) ... Processing triggers for Libc-bin (2.23-0UBUNTU9) ... Processing triggers for doc-base (0.10.7) ... Processing 1 added Doc-base file ... Registering Documents with Scrollkeeper ... Processing triggers for Gnome-menus (3.13.3-6ubuntu3.1) ... Processing triggers for desktop-file-utils (0.22+LINUXMINT1) ... Processing triggers for mime-support (3.59UBUNTU1) ... Processing triggers for man-db (2.7.5-1) ... Processing triggers for SYSTEMD (229-4UBUNTU21) ... Processing triggers for Ureadahead (0.100.0-19) ... ureadahead'll be reprofiled on next rebootsetting up Libjs-underscore (1.7.0~DFSG-1UBUNTU1) ... Setting up Libpq5:amd64 (10.1-1.pgdg16.04+1) ... Setting up Libwxbase3.0-0v5:amd64 (3.0.2+dfsg-1.3ubuntu0.1) ... Setting up Libwxgtk3.0-0v5:amd64 (3.0.2+dfsg-1.3ubuntu0.1) ... Setting up Pgadmin3-data (1.22.2-2.pgdg16.04+1) ... Setting up pgadmin3 (1.22.2-2.pgdg16.04+1) ... Setting up pgdg-keyring (2017.3) ... Removing apt.postgresql.org key from trusted.gpg:OKSetting up Postgresql-client-common (188.pgdg16.04+1) ... Setting up postgresql-client-10 (10.1-1.pgdg16.04+1) ... update-alternatives:using/usr/share/postgresql/10/man/man1 /psql.1.gz to Provide/usr/share/man/man1/psql.1.gz (psql.1.gz) in auto modesetting up Postgresql-common (188.pgdg16.04+ 1) ... Adding user postgres to group ssl-certcreating config file/etc/postgresql-common/createcluster.conf with new Versionbuil Ding PostgreSQL dictionaries from installed Myspell/hunspell packages ... en_usremoving obsolete dictionary fiLes:setting up postgresql-10 (10.1-1.pgdg16.04+1) ... Unescaped left brace in regex are deprecated, passed through in regex; Marked by <---in-m/(? <!\\) \${<--here ([^}]+]}/at/usr/sbin/pam_getenv line 78.Unescaped left brace in reg Ex is deprecated, passed through in regex; Marked by <---in-m/(? <!\\) \${<--here ([^}]+]}/at/usr/sbin/pam_getenv line 78.Unescaped left brace in reg Ex is deprecated, passed through in regex; Marked by <---in-m/(? <!\\) \${<--here ([^}]+]}/at/usr/sbin/pam_getenv line 78.Unescaped left brace in reg Ex is deprecated, passed through in regex; Marked by <---in-m/(? <!\\) \${<--here ([^}]+]}/at/usr/sbin/pam_getenv line 78.Unescaped left brace in reg Ex is deprecated, passed through in regex; Marked by <---in-m/(? <!\\) \${<--here ([^}]+]}/at/usr/sbin/pam_getenv line 78.Unescaped left brace in reg Ex is deprecated, passed through in regex; Marked by <--here in m/(? <!\\) \${<--here ([^}]+)}/at/usr/sbin/pam_getenv line 78.Unescaped left brace in regex was deprecated, passed through in regex; Marked by <---in-m/(? <!\\) \${<--here ([^}]+]}/at/usr/sbin/pam_getenv line 78.Unescaped left brace in reg Ex is deprecated, passed through in regex; Marked by <---in-m/(? <!\\) \${<--here ([^}]+]}/at/usr/sbin/pam_getenv line 78.Unescaped left brace in reg Ex is deprecated, passed through in regex; Marked by <---in-m/(? <!\\) \${<--here ([^}]+]}/at/usr/sbin/pam_getenv line 78.Unescaped left brace in reg Ex is deprecated, passed through in regex; Marked by <---in-m/(? <!\\) \${<--here ([^}]+]}/at/usr/sbin/pam_getenv line 78.Unescaped left brace in reg Ex is deprecated, passed through in regex; Marked by <---in-m/(? <!\\) \${<--here ([^}]+]}/at/usr/sbin/pam_getenv line 78.Unescaped left brace in reg Ex is deprecated, passed through in regex; Marked by <--here in m/(? <!\\) \${<--here ([^}]+]}/ At/usr/sbin/pam_getenv line 78.Unescaped left brace in regex was deprecated, passed through in regex; Marked by <---in-m/(? <!\\) \${<--here ([^}]+]}/at/usr/sbin/pam_getenv line 78.Unescaped left brace in reg Ex is deprecated, passed through in regex; Marked by <---in-m/(? <!\\) \${<--here ([^}]+]}/at/usr/sbin/pam_getenv line 78.Unescaped left brace in reg Ex is deprecated, passed through in regex; Marked by <---in-m/(? <!\\) \${<--here ([^}]+]}/at/usr/sbin/pam_getenv line 78.Creating new PostgreSQL CLU Ster 10/main/usr/lib/postgresql/10/bin/initdb-d/var/lib/postgresql/10/main--auth-local peer--auth-host md5The Files belonging to this database system is owned by user "Postgres". This user must also own the server process. The database cluster is initialized with locales Collate:en_us. UTF-8 Ctype:en_us. UTF-8 Messages:en_us. UTF-8 MONETARY:ZH_CN. UTF-8 NUMERIC:ZH_CN. UTF-8 Time:en_us. Utf-8the default Database Encoding have accordingly been set to "UTF8". The default text search configuration is set to "中文版". Data page checksums is disabled.fixing permissions on existing Directory/var/lib/postgresql/10/main ... okcreating Subdi Rectories ... okselecting default max_connections ... 100selecting Default Shared_buffers ... 128MBselecting Dynamic shared Memory implementation ... posixcreating configuration files ... okrunning bootstrap script. .. Okperforming post-bootstrap initialization ... oksyncing data to disk ... oksuccess. You can now start the database server using:/usr/lib/postgresql/10/bin/pg_ctl-d/var/lib/postgresql/10/main-l logfil E startver Cluster Port Status Owner Data directory Log file10 main 5432 down Postgres/var/lib/post gresql/10/main/var/log/postgresql/postgresql-10-main.logupdate-alternatives:using/usr/share/postgresql/10/man/ Man1/postmaster.1.gz to Provide/usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in Auto modeProcessingTriggers for Libc-bin (2.23-0UBUNTU9) ... Processing triggers for SYSTEMD (229-4UBUNTU21) ... Processing triggers for ureadahead (0.100.0-19) ...

Resources
PostgreSQL packages for Debian and Ubuntu

Install Postgresql in Ubutnu 16.04 LTS

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.