apt install gcc
apt install python-dev
apt install libreadline-dev
apt install zlib zlib-dev
apt install libzzip-dev zziplib-bin zlib1g-dbg lib32z1 lib32z1-dev liblz1 liblz-dev liblz-dbg
apt install libpq-dev
apt install openssl-dev
apt install libssl-dev
apt install xml2 libxml2-dev libxml2-dbg libxml++2.6-dev libxml++2.6-2v5
apt install xslt xslt-dev
apt install libxslt1-dev
apt install libsystemd-dev
apt install tclsh-dev
apt install tcl-devel-package
apt install tcl-dev libtclcl1-dev
apt install libperl-dev
konfiguracja kompilacji
./configure --with-perl --with-python --with-tcl --with-openssl --with-systemd --with-libxml --with-libxslt CFLAGS='-O2 -pipe'
Pierwsze uruchomienie
adduser postgres
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test
konfiguracja w dla widoczności w podsieci 192.168.0.1-192.168.0.255 . md5 czyli password szyfrowany
# IPv4 local connections:
host all all 192.168.0.0/24 md5
host all all 192.168.0.0/24 md5
# - Connection Settings -
listen_addresses = '*' # what IP address(es) to listen on;
listen_addresses = '*' # what IP address(es) to listen on;
tworzymy nowy plik touch /etc/systemd/system/postgresql.service
i prosty plik konfiguracyjny ...
[Unit]
Description=PostgreSQL database server
Documentation=man:postgres(1)
[Service]
Type=notify
User=postgres
ExecStart=/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data
ExecReload=/bin/kill -HUP $MAINPID
KillMode=mixed
KillSignal=SIGINT
TimeoutSec=0
[Install]
WantedBy=multi-user.target
Description=PostgreSQL database server
Documentation=man:postgres(1)
[Service]
Type=notify
User=postgres
ExecStart=/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data
ExecReload=/bin/kill -HUP $MAINPID
KillMode=mixed
KillSignal=SIGINT
TimeoutSec=0
[Install]
WantedBy=multi-user.target