banner



What Is The Registered Srevice Forpostres In Linux

SUMMARY: This commodity covers how to install PostgreSQL on Ubuntu Server for Linux. It goes over iv steps for installation:

            1. Enable the PostgreSQL apt repository

           two. Install PostgreSQL on Ubuntu

           iii. Connect to PostgreSQL

           four. Log in to the cluster

Here, we are going to expect at how to install PostgreSQL on Ubuntu Server.

This post volition help you with installing the PostgreSQL database server on your Ubuntu 18.04, Ubuntu 16.04 and Ubuntu 14.04 systems.

Stride 1 – Enable the PostgreSQL apt repository

PostgreSQL packages are bachelor in the default Ubuntu repository, just other versions of PostgreSQL are besides available through the PostgreSQL apt repository.

To use the apt repository according to Ubuntu version, follow these steps:

one. Visit the PostgreSQL Ubuntu download site:

 https://www.postgresql.org/download/linux/ubuntu/

two. Select your version of Ubuntu and re-create the corresponding line for the apt repository.

For Example:

For Ubuntu xviii.04 you should select Bionic (18.04):

deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main

three. Create the file "/etc/apt/sources.listing.d/pgdg.list" and add together the corresponding line for the repository in it:

          root@pooja-virtual-machine:~# sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg chief" >> /etc/apt/sources.list.d/pgdg.listing'        

4. Import the repository signing key and update the parcel lists:

          root@pooja-virtual-motorcar:~# wget --serenity -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-fundamental add -        

Step 2 – Install PostgreSQL on Ubuntu

Nosotros accept added the PostgreSQL official repository to our system, now we need to update the repository list:

          root@pooja-virtual-machine:~# sudo apt-become update        

To install PostgreSQL on Ubuntu, use the apt-get (or other apt-driving) control:

          root@pooja-virtual-motorcar:~# apt-get install postgresql-eleven        

Step 3 – Connect to PostgreSQL

During PostgreSQL installation, by default, it creates a user "postgres" and also creates a system account (Operating Organization User) with the same name "postgres."

Then to connect to the PostgreSQL server, log in to your organization equally user "postgres."

          root@pooja-virtual-auto:~# su - postgres        

Step iv – Log in to the cluster

On Ubuntu, the cluster is initialized during the installation. You can invoke the below control to find the condition of the running PostgreSQL cluster:

          root@pooja-virtual-machine:~# ps -ef | grep postgres    postgres   4862      ane  0 05:32 ?        00:00:00 /usr/lib/postgresql/xi/bin/postgres -D /var/lib/postgresql/eleven/main -c config_file=/etc/postgresql/11/main/postgresql.conf  postgres   4864   4862  0 05:32 ?        00:00:00 postgres: 11/chief: checkpointer     postgres   4865   4862  0 05:32 ?        00:00:00 postgres: 11/main: background writer     postgres   4866   4862  0 05:32 ?        00:00:00 postgres: xi/main: walwriter     postgres   4867   4862  0 05:32 ?        00:00:00 postgres: xi/main: autovacuum launcher     postgres   4868   4862  0 05:32 ?        00:00:00 postgres: xi/main: stats collector     postgres   4869   4862  0 05:32 ?        00:00:00 postgres: 11/chief: logical replication launcher                  

Now yous can log in to the PostgreSQL cluster and query through the psql customer:

          postgres@pooja-virtual-car:~$ /usr/lib/postgresql/11/bin/psql -p 5432  psql (eleven.5 (Ubuntu 11.v-3.pgdg18.04+1))  Type "help" for help.    postgres=# \l                               Listing of databases     Proper noun    |  Owner   | Encoding | Collate | Ctype |   Access privileges     -----------+----------+----------+---------+-------+-----------------------   postgres  | postgres | UTF8     | en_IN   | en_IN |    template0 | postgres | UTF8     | en_IN   | en_IN | =c/postgres          +             |          |          |         |       | postgres=CTc/postgres   template1 | postgres | UTF8     | en_IN   | en_IN | =c/postgres          +             |          |          |         |       | postgres=CTc/postgres  (3 rows)        

Your PostgreSQL installation has been completed successfully.

Reference link for PostgreSQL 11.5 docs:

https://www.postgresql.org/docs/11/index.html

Source: https://www.enterprisedb.com/postgres-tutorials/how-install-postgres-ubuntu

Posted by: dunbarthoice.blogspot.com

0 Response to "What Is The Registered Srevice Forpostres In Linux"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel