Installation of PostgreSQL and phpPgAdmin on Ubuntu 18.04
Today's tutorial I describe in a few steps to install PostgreSQL with a graphical management interface in Ubuntu phpPgAdmin 18.04.
Let's get started!.
At the beginning of the Ubuntu repositories we make an update command:
1 | sudo apt update |
Are installing PostgreSQL and phpPgAdmin:
1 | sudo apt -y install postgresql postgresql-contrib phppgadmin |
By default, PostgreSQL creates a new user named “postgres” for basic authentication.
We will log in to the user's command:
1 | su - postgres |
Now you can access the command prompt using PostgreSQL:
1 | psql |
We make the password change command:
1 | password postgres |
and leave.
1 | exit. |
Configuring Apache
1 | cd /etc/apache2/conf-available/ |
And edit:
1 | nano phppgadmin.conf |
1 | #Require local |
This line should be commented on by.
1 | Require all granted |
This line should be commented on.
Go to the directory:
1 | cd /etc/phppgadmin/ |
and edit:
1 | nano config.inc.php |
The following line set in the following manner:
1 | $conf['extra_login_security'] = false; |
We do restart services:
1 2 | systemctl restart postgresql systemctl restart apache2 |
Then we test the proper operation of the command:
1 | netstat -plntu |
Access to our phpPgAdmin is available at IPSERWERA:phppgadmin/
what the password must be entered after the su command – postgres ? (the administrator password for Linux does not accept)
That's a very good question…
You can reset the password by running passwd postgres from root