How to Install Postgresql ???

Discussions Regarding Software

Moderator: Moderators

How to Install Postgresql ???

Postby juniorsatanas » Wed Apr 26, 2017 14:53

Good morning, I used Debian for years, since Marumbi, I see a lot of Sabayon talk, and I decided to test, I am Systems Engineer, I need the following installed tools:
JDK
JAVA
W
POSTGRES
MONGODB
VISUAL STUDIO CODE
Where can I find wikis books on how to install all this?

When I try to connect and access or start PostgreSQL I get this error!

Sabayon postgresql-9.6 # sudo su -c "createuser --superuser gisuser" postgres Createuser: could not connect to database postgres: could not connect to server: File or directory not found The server is running locally and accepting Connections in the Unix domain socket "/run/postgresql/.s.PGSQL.5432"? Sabayon postgresql-9.6 # psql --version Psql (PostgreSQL) 9.6.2

linux postgresql
juniorsatanas
Baby Hen
 
Posts: 3
Joined: Tue Apr 25, 2017 18:03

Re: How to Install Postgresql ???

Postby svantoviit » Tue Sep 12, 2017 19:47

juniorsatanas wrote:I need the following installed tools:

  1. JDK, JAVA
    Code: Select all
    # equo install --ask dev-java/oracle-jdk-bin
    If you need the latest version, you will have to dig into Portage.

  2. W
    If you mean the tool which shows who is logged on and what they are doing, you need procps
    Code: Select all
    # equo install --ask sys-process/procps

  3. POSTGRES
    There are several versions in Entropy available:
    Code: Select all
    # equo s -vq dev-db/postgresql
    dev-db/postgresql-9.2.21
    dev-db/postgresql-9.3.17
    dev-db/postgresql-9.4.12
    dev-db/postgresql-9.5.7
    dev-db/postgresql-9.6.5

    To install a specific version you can specify the slot like this:
    Code: Select all
    # equo i -a dev-db/postgresql:9.6
    Read the postinstall messages, they will probably give an answer to your setup issues.

  4. MONGODB
    Code: Select all
    # equo i -a dev-db/mongodb

  5. VISUAL STUDIO CODE
    Just download the tar.gz package from the website https://code.visualstudio.com/Download, unpack and run the code binary.
    Code: Select all
    $ wget -O vscode.tar.gz "https://go.microsoft.com/fwlink/?LinkID=620884"
    $ tar -xzvf vscode.tar.gz
    $ cd VSCode-linux-x64/
    $ ./code
svantoviit
Old Dear Hen
 
Posts: 691
Joined: Sun Feb 28, 2010 17:55

Re: How to Install Postgresql ???

Postby mdonkers » Thu Sep 21, 2017 23:37

Also useful for especially the database servers is Docker. Use docker search to find an image and get it via docker pull. These have full dependencies already configured and installed, so you do not have to mess with your development system.

Instructions on how to start images can usually be found on the image's page on docker hub. In addition to the run command specified one can use parameter "--net=host" to quickly fix problems with inaccessible network ports (be careful with this on public networks and production systems).

e.g. for postgres image https://hub.docker.com/_/postgres/.

Find the image:
Code: Select all
$ docker search postgres
NAME                              DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
postgres                          The PostgreSQL object-relational database ...   3988      [OK]       
etc...

Get the image:
Code: Select all
$ docker pull postgres
(wait to complete)

List your images:
Code: Select all
$ docker images
REPOSITORY              TAG                 IMAGE ID            CREATED             SIZE
postgres                latest              1227c4263c8c        3 days ago          265MB

Run an image:
Code: Select all
$ docker run --net=host --name postgresdb -e POSTGRES_PASSWORD="masterpassword" -d postgres

List running containers (adding -a parameter displays all containers):
Code: Select all
$ docker ps
...

Use e.g. the psql client (it's in Sabayon dev-db/postgresql package) to connect to the running database:

Code: Select all
$ psql -h localhost -U postgres


Or install Squirrel http://squirrel-sql.sourceforge.net/
mdonkers
Baby Hen
 
Posts: 1
Joined: Thu Sep 21, 2017 22:16


Return to Software in General

Who is online

Users browsing this forum: No registered users and 2 guests

cron