Binary way, ignoring repositories, is very favourite and can be reproduced in any other linux distribution…
PostgreSQL is recommending (for non-package method) using packaging from EnterpriseDB = after downloading .run file you can run it as root:
root@debian:/home/j/install# ./postgresql-9.3.2-3-linux-x64.run
First you need to define installation directory:
Similar to previous option, defining data directory is also essential:
Password for user postgres is needed:
And of course listening port (default 5432):
Now very interesting option, can save a lot of issue later 😉 :
Installation lasts few seconds, initializing is following…:
You are also asked, if you want to download additional software related to PostgreSQL (highly recommended!).
Well, installation is over. No additional info given. Let´s investigate if postgresql is running 🙂
root@debian:/home/j/install# ps -ef | grep postgre
postgres 5079 1 0 14:40 ? 00:00:00 /opt/PostgreSQL/9.3/bin/postgres -D /opt/PostgreSQL/9.3/data
postgres 5080 5079 0 14:40 ? 00:00:00 postgres: logger process
postgres 5082 5079 0 14:40 ? 00:00:00 postgres: checkpointer process
postgres 5083 5079 0 14:40 ? 00:00:00 postgres: writer process
postgres 5084 5079 0 14:40 ? 00:00:00 postgres: wal writer process
postgres 5085 5079 0 14:40 ? 00:00:00 postgres: autovacuum launcher process
postgres 5086 5079 0 14:40 ? 00:00:00 postgres: stats collector process
Well, nice.
postgres@debian:~/bin$ pwd
/opt/PostgreSQL/9.3/bin
postgres@debian:~/bin$ ./psql
Password:
psql.bin (9.3.2)
Type „help“ for help.
No entry for terminal type „xterm“;
using dumb terminal settings.
postgres=#
Command line also working. We can try to restart server for verifying all init.d actions were successful:
root@debian:/etc/init.d# /etc/init.d/postgresql-9.3 restart
Restarting PostgreSQL 9.3:
waiting for server to shut down…. done
server stopped
waiting for server to start…. done
server started
PostgreSQL 9.3 restarted successfully
I found relict, .ini file in /etc directory, collecting all information done during installation process.
root@debian:/etc# cat postgres-reg.ini
[PostgreSQL/9.3]
InstallationDirectory=/opt/PostgreSQL/9.3
Version=9.3.2.3
Shortcuts=1
DataDirectory=/opt/PostgreSQL/9.3/data
Port=5432
ServiceID=postgresql-9.3
Locale=en_US.UTF-8
Superuser=postgres
Serviceaccount=postgres
Description=PostgreSQL 9.3
Branding=PostgreSQL 9.3
DisableStackBuilder=0
One more thing regarding configuration – in my case, Debian is just server, running on VirtualBox machine – so I want to use it as server, client = Windows. For non-conflict setting up I´m using Network „Network only with guest“, ip address for debian = 192.168.56.102. You need to know how it works with postgresql, connecting into database from other hosts. First of all you need to locate pg_hba.conf file. I have no idea where it is located in this binary installation:
root@debian:/opt/PostgreSQL/9.3/data# find / -name 'pg_hba.conf' 2>/dev/null
/opt/PostgreSQL/9.3/data/pg_hba.conf
Editing pg_hba.conf is essential, I just need to add this line:
host all all 192.168.56.1/32 md5
Done. No need to do anything else now.
-a-