Difference between revisions of "PostgreSQL Install"

From UVOO Tech Wiki
Jump to navigation Jump to search
 
Line 7: Line 7:
 
# Install pgadmin4
 
# Install pgadmin4
 
- https://www.pgadmin.org/download/pgadmin-4-apt/
 
- https://www.pgadmin.org/download/pgadmin-4-apt/
 +
 +
install-pgadmin4.sh
 
```
 
```
 
#
 
#
Line 34: Line 36:
 
sudo /usr/pgadmin4/bin/setup-web.sh
 
sudo /usr/pgadmin4/bin/setup-web.sh
 
```
 
```
 +
 +
chmod +x install-pgadmin4.sh && ./install-pgadmin4.sh

Latest revision as of 20:47, 21 November 2020

sudo apt install postgresql
sudo -i -u postgres psql
CREATE ROLE myrole WITH SUPERUSER CREATEDB CREATEROLE LOGIN ENCRYPTED PASSWORD 'secretpass';

Install pgadmin4

install-pgadmin4.sh

#
# Setup the repository
#

# Install the public key for the repository (if not done previously):
curl https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo apt-key add

# Create the repository configuration file:
sudo sh -c 'echo "deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs) pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'

#
# Install pgAdmin
#

# Install for both desktop and web modes:
sudo apt install pgadmin4

# Install for desktop mode only:
sudo apt install pgadmin4-desktop

# Install for web mode only: 
sudo apt install pgadmin4-web 

# Configure the webserver, if you installed pgadmin4-web:
sudo /usr/pgadmin4/bin/setup-web.sh

chmod +x install-pgadmin4.sh && ./install-pgadmin4.sh