To install PostgreSQL
in your container, you have to run the following commands in the IDE terminal.
On Ubuntu 16.04, the latest version of PostgreSQL is included in the APT package repository by default. Update the package index on your server and install the default postgresql
package and the postgresql-contrib
utility package.
sudo apt-get update
sudo apt-get install postgresql postgresql-contrib
You can check if your PostgreSQL server is running with the following command:
sudo service postgresql status
If PostgreSQL isn't running, you can start it using the command:
sudo systemctl start postgresql
Run the following commands to run the psql
command line interface tool.
sudo -i -u postgres
psql
See the official documentation for more information on interacting with your database.