Line 1: |
Line 1: |
| + | {{Warning box|For Koozali SME Server 10.x there is no contrib yet. We have detailed a basic install in the [[https://wiki.koozali.org/Postgres#Koozali_SME_v10_and_systemd|last section]] on this page and previous versions or method should be ignored. We may build an updated Contrib in due course}} |
| + | |
| {{Note box|For SME Server 9.x, 64-bit, we advise you to use [[Software_Collections:PostgreSQL]]}} | | {{Note box|For SME Server 9.x, 64-bit, we advise you to use [[Software_Collections:PostgreSQL]]}} |
| | | |
Line 112: |
Line 114: |
| | | |
| | | |
− | == How to install Postgres 12 == | + | == How to install Postgres 12 - old method == |
| + | |
| + | This is an old method and the systemd method below should be used |
| | | |
| {{Note box|This howto is intended for use with SME Server 10, although it may work for other versions.}} | | {{Note box|This howto is intended for use with SME Server 10, although it may work for other versions.}} |
Line 134: |
Line 138: |
| | | |
| | | |
− | ==Koozali SME v10 and systemd - still testing this== | + | ==Koozali SME v10 and systemd== |
| | | |
| db yum_repositories set postgresql12 repository \ | | db yum_repositories set postgresql12 repository \ |
Line 151: |
Line 155: |
| yum --enablerepo=postgresql12 install postgresql12-server postgresql12-contrib | | yum --enablerepo=postgresql12 install postgresql12-server postgresql12-contrib |
| | | |
− | Set a config key | + | Set a config key for SME to recognise the service: |
| config set postgresql-12 service status enabled access private | | config set postgresql-12 service status enabled access private |
| | | |
Line 157: |
Line 161: |
| | | |
| mkdir -p /usr/lib/systemd/system/postgresql-12.service.d | | mkdir -p /usr/lib/systemd/system/postgresql-12.service.d |
− |
| |
| nano /usr/lib/systemd/system/postgresql-12.service.d/50koozali.conf | | nano /usr/lib/systemd/system/postgresql-12.service.d/50koozali.conf |
| | | |
− | Something like:
| + | Add something like this: |
| | | |
| [Unit] | | [Unit] |
Line 168: |
Line 171: |
| | | |
| Reconfigure and reboot: | | Reconfigure and reboot: |
− |
| |
| signal-event post-upgrade;signal-event reboot | | signal-event post-upgrade;signal-event reboot |
| | | |
− | The service will show as failed at this point | + | The service will show as failed at this point. |
− | | |
| systemctl status postgresql-12 | | systemctl status postgresql-12 |
| | | |
− | So we need to init the DB | + | So we need to init the DB: |
| /usr/pgsql-12/bin/postgresql-12-setup initdb | | /usr/pgsql-12/bin/postgresql-12-setup initdb |
| | | |
| Then start it: | | Then start it: |
− |
| |
| systemctl start postgresql-12 | | systemctl start postgresql-12 |
| | | |
| And now we can see it running. | | 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 |
| + | |
| + | There is an old v8 contrib that could possibly be updated to install this. |
| + | |
| + | smeserver-postgresql |
| + | |
| | | |
| ---- | | ---- |
| [[Category:Howto]] | | [[Category:Howto]] |
| [[Category:Administration]] | | [[Category:Administration]] |