First, thanks to all, for this wonderful distribution of Linux.
I really like openSuse…
Hope this can help others…
Fresh install of 13.1
with Yast Software manager
Select to install postgreSQL-server(will be 9.2.4-4.1.3 that comes with OpenSuse13.1)
also select postgresql-contrib- [size=1]Contributed Extensions and Additions to PostgreSQL[/size]
Apparently the file for systemd is missing and the soft link too.
so the postgresql service does not show up in the YaST SERVICE MANAGER
My fix (all as root)
-
Set in /etc/sysconfig (with YaST)
the POSTGRES_DATADIR to /home/postgres92/data
(/home has the big partition…) -
Run from command line
service postgresql start
This will run the old script in /etc/init.d/postgresql and initialize a new database in /home/postgres92/data -
create this file postgresql.service in /usr/lib/systemd/system/
cd /usr/lib/systemd/system/
vi postgresql.service
(copy this and save )
[Unit]
Description=PostgreSQL database server
After=network.target
[Service]
Type=forking
TimeoutSec=120
User=postgres
Group=postgres
Environment=PGROOT=/home/postgres92
SyslogIdentifier=postgres
PIDFile=$PGROOT/data/postmaster.pid
ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGROOT}/data
ExecStart= /usr/bin/pg_ctl -s -D ${PGROOT}/data start -w -t 120
ExecReload=/usr/bin/pg_ctl -s -D ${PGROOT}/data reload
ExecStop= /usr/bin/pg_ctl -s -D ${PGROOT}/data stop -m fast
Due to PostgreSQL’s use of shared memory, OOM killer is often overzealous in
killing Postgres, so adjust it downward
OOMScoreAdjust=-200
[Install]
WantedBy=multi-user.target
- Run this (to create the soft link)
ln -s /usr/lib/systemd/system/postgresql.service /etc/systemd/system/multi-user.target.wants/postgesql.service
reboot
now postgresql will show up as a service with systemd in YaST SERVICE MANAGER
and will be set to Enable and Active so it will start after every reboot
thanks for the help from these links for pointing me in the right direction
and
https://bbs.archlinux.org/viewtopic.php?pid=1213552
Yossi