GNU/Linux >> Tutoriales Linux >  >> Ubuntu

Instalar y configurar phpPgAdmin en Ubuntu 20.04

Instalar y configurar phpPgAdmin en Ubuntu 20.04

phpPgAdmin es una interfaz web para administrar PostgreSQL. Permite crear bases de datos, ejecutar consultas y gestionar usuarios sin depender solo de la línea de comandos.

Requisitos

  • Servidor Ubuntu 20.04.
  • Usuario con sudo.
  • Conexión a internet.

Actualizar e instalar PostgreSQL

$ sudo apt-get update -y
$ sudo apt install postgresql postgresql-contrib -y

Inicia el servicio si hace falta:

$ sudo systemctl start postgresql.service
$ sudo systemctl enable postgresql.service

Crear base de datos y usuario

$ sudo su - postgres
$ psql
CREATE USER jerry WITH PASSWORD 'mystrongpassword';
CREATE DATABASE pgadmindb;
GRANT ALL PRIVILEGES ON DATABASE pgadmindb TO jerry;
\q

Instalar phpPgAdmin

$ sudo apt-get install phppgadmin -y

Por defecto, Apache solo sirve phpPgAdmin desde localhost. Para acceder desde otro equipo, edita:

$ sudo nano /etc/apache2/conf-available/phppgadmin.conf

Cambia:

Require local

Por:

Require all granted

Valida y reinicia Apache:

$ sudo apachectl configtest
$ sudo systemctl restart apache2

Configurar UFW

$ sudo ufw allow http
$ sudo ufw allow https
$ sudo ufw status verbose

Acceder a phpPgAdmin

Abre:

https://server-ip/phppgadmin

Expande Servers, selecciona PostgreSQL e inicia sesión con el usuario creado. Restringe el acceso si el servidor es accesible desde redes no confiables.


Ubuntu
  1. Cómo instalar PostgreSQL en Ubuntu 18.04

  2. Instalar PostgreSQL y phpPgAdmin en Ubuntu 15.04

  3. Instalar y configurar Logstash en Ubuntu 18.04

  4. Cómo instalar phpPgAdmin en Ubuntu 20.04

  5. Instalar y usar R en Ubuntu 18.04

Instalar Podman en Ubuntu 20.04 y gestionar contenedores

Cómo instalar OpenMAINT en Ubuntu 20.04

Cómo instalar phpPgAdmin en Ubuntu 18.04 / 16.04 y Linux Mint 19 / 18

Cómo instalar TimescaleDB en Ubuntu 20.04

Cómo instalar PostgreSQL 14 en Ubuntu 20.04

Cómo instalar OpenCV en Ubuntu 20.04