Changes

Jump to navigation Jump to search
1,045 bytes added ,  03:32, 29 May 2022
m
Unnilennium moved page Talk:Postgres to Talk:Postgresql
Line 1: Line 1: −
Thanks for the warn message Cactus! --[[User:PicsOne|Normando Hall]] 01:20, 4 November 2007 (MST)
+
===Koozali SME v10 and manual install with systemd===
: You are welcome! - [[User:Cactus|Cactus]] 01:24, 4 November 2007 (MST)
     −
see the smeserver-postgresql rpm by charlie
+
{{Note box| There is now a contrib for Koozali SME Server v10 - See above for [[Postgres#How_to_install_Postgresql_13|easy installation]]}}
   −
http://fisheye1.cenqua.com/browse/smeserver/smeserver-postgresql/F/smeserver-postgresql.spec?r=1.26
+
This is for reference with PostGresql12 and manual installation:
   −
I suggest you start the page with howto install the current version,
+
db yum_repositories set postgresql12 repository \
[I thought it would be in smedev but yum can't find it]
+
  BaseURL https://download.postgresql.org/pub/repos/yum/12/redhat/rhel-7Server-\$basearch/ \
yum install smeserver-postgresql --enablerepo=smedev
+
  EnableGroups no \
 +
  GPGCheck yes \
 +
  Name "Postgresql-12" \
 +
  GPGKey https://download.postgresql.org/pub/repos/yum/RPM-GPG-KEY-PGDG-12 \
 +
  Visible no \
 +
  status disabled
   −
then as an option, you can say how you upgrade to ver.8
+
Update yum
 +
signal-event yum-modify
 +
 
 +
 
 +
Install the rpms
 +
yum --enablerepo=postgresql12 install postgresql12-server postgresql12-contrib
 +
 
 +
Set a config key for SME to recognise the service:
 +
config set postgresql-12 service status enabled access private
 +
 
 +
We will need a file:
 +
 
 +
mkdir -p /usr/lib/systemd/system/postgresql-12.service.d
 +
nano /usr/lib/systemd/system/postgresql-12.service.d/50koozali.conf
 +
 
 +
Add something like this:
 +
 
 +
[Unit]
 +
After=network.target network.service wan.service
 +
[Install]
 +
WantedBy=sme-server.target
 +
 
 +
Reconfigure and reboot:
 +
signal-event post-upgrade;signal-event reboot
 +
 
 +
The service will show as failed at this point.
 +
systemctl status postgresql-12
 +
 
 +
So we need to init the DB:
 +
/usr/pgsql-12/bin/postgresql-12-setup initdb
 +
 
 +
Then start it:
 +
systemctl start postgresql-12
 +
 
 +
And now we can see it running.
 +
 
 +
We can check some of the defaults:
 +
 
 +
grep '^[[:blank:]]*[^[:blank:]#;]' /var/lib/pgsql/12/data/pg_hba.conf
 +
grep '^[[:blank:]]*[^[:blank:]#;]' /var/lib/pgsql/12/data/postgresql.conf
Super Admin, Wiki & Docs Team, Bureaucrats, Interface administrators, Administrators
3,250

edits

Navigation menu