-
Notifications
You must be signed in to change notification settings - Fork 3
Installing PostgreSQL database server on Lubuntu
Asterios Raptis edited this page Oct 19, 2022
·
7 revisions
Add the repository for your ubuntu release to your apt list with this command line:
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
add the apt-key from postgresql with this command line:
wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql postgresql-contrib
First you have to connect to postgres server:
sudo -u postgres psql
then your connected with the postgres server shell. This looks something like this:
postgres=#
than you can set the password with the following command:
\password postgres
that looks at the shell as following:
postgres=# \password postgres
Enter new password: [enter the new password]
Enter it again: [retype the new password]
enter the password twice and you can than quit with the following command:
\q
that looks at the shell as following:
postgres=# \q
A good and detailed desciption can be found here
pgAdmin 3 is a db client for PostgreSQL. You can install it with the following command:
sudo apt-get install pgadmin3