Changes

Jump to navigation Jump to search
1,116 bytes added ,  18:42, 12 December 2022
Line 1: Line 1:  +
{{Languages}}
 +
<!-- here we define the contrib name variable -->
 +
<!-- we get the page title, remove suffix for translated version; if needed you can define there with the value you want-->
 +
{{#vardefine:contribname| {{lc: {{#titleparts:  {{BASEPAGENAME}} |1}} }} }}
 +
{{#vardefine:smecontribname| smeserver-{{lc: {{#titleparts:  {{BASEPAGENAME}} |1}} }} }}
 +
<!-- we define the language -->
 +
{{#vardefine:lang| {{lc:  {{#titleparts:    {{PAGENAME}} | | -1}}  }} |en }}
 +
{{Infobox contribs
 +
|name={{#var:contribname}}
 +
|image=Postgresql.png
 +
|description_image= {{#var:contribname}} logo
 +
|maintainer=
 +
|licence= AGPLv3
 +
|url= https://www.postgresql.org/
 +
|category= database
 +
|tags=database,db,pgsql
 +
}}
   −
== How to install Postgres 8 ==
+
===Version===
 +
{{#smeversion:smeserver-postgresql}}
   −
This howto are created with information extracted from forums. Proceed at your own risk. Work for me.
+
===Install Postgresql 13===
   −
Enable centosplus repository and install postgres (at the time writen this howto is 8.1.9 version)
+
yum install smeserver-extrarepositories-pgsql -y
 +
yum --enablerepo=smecontribs,pgsql13 install smeserver-postgresql
   −
yum --enablerepo=centosplus install postgresql postgresql-contrib postgresql-devel postgresql-docs postgresql-pl postgresql-python postgresql-test
     −
The above command install postgres and update postgres-libs, and install for dependency tcl and mx from base repository. If you see other packages, such as perl or php, abort the installation now!. This ocur because maybe you have installed perl-CGI-Session or perl-DBD-Pg. These two packages are in your system because you have installed otrs oe other aplication. In my case I have remove these two packages (because I not need otrs), and run again the installation.
+
enable repo to allow further updates
 +
db yum_repositories setprop pgsql13 status enabled
 +
signal-event yum-modify
   −
The make the necesary custom templates:
+
=== Upgrade ===
 +
yum  update {{#var:smecontribname}} --enablerepo=smecontribs
   −
  /etc/init.d/postgresql start
+
=== Uninstall ===
mkdir -p /etc/e-smith/templates/var/lib/pgsql/data
+
yum remove {{#var:smecontribname}} {{#var:contribname}}*
mkdir -p /etc/e-smith/templates-custom/var/lib/pgsql/data
+
 
cp /var/lib/pgsql/data/postgresql.conf /etc/e-smith/templates/var/lib/pgsql/data
+
=== Manually restore db ===
cp /var/lib/pgsql/data/pg_hba.conf /etc/e-smith/templates/var/lib/pgsql/data
+
after you upgraded you server or migrate, here how to restore db
  cp /var/lib/pgsql/data/postgresql.conf /etc/e-smith/templates-custom/var/lib/pgsql/data
+
 
cp /var/lib/pgsql/data/pg_hba.conf /etc/e-smith/templates-custom/var/lib/pgsql/data
+
using psql<syntaxhighlight lang="bash">
 +
exec chpst -u postgres /usr/pgsql-13/bin/psql < /home/e-smith/db/pgsql/pgsql.dump
 +
</syntaxhighlight>using pg_restore
 +
 
 +
<syntaxhighlight lang="bash">
 +
exec chpst -u postgres /usr/pgsql-13/bin/pg_restore < /home/e-smith/db/pgsql/pgsql.dump
 +
</syntaxhighlight>
 +
 
 +
=== Bugs ===
 +
Please raise bugs under the SME-Contribs section in [http://bugs.contribs.org/enter_bug.cgi bugzilla]
 +
and select the {{#var:smecontribname}} component or use {{BugzillaFileBug|product=SME%20Contribs|component={{#var:smecontribname}}|title=this link}}
 +
 
 +
Below is an overview of the current issues for this contrib:{{#bugzilla:columns=id,product,version,status,summary|sort=id|order=desc|component={{#var:smecontribname}} |noresultsmessage=No open bugs found.}}
 +
 
 +
===Changelog===
 +
Only released version in smecontrib are listed here.
 +
 
 +
{{#smechangelog: {{#var:smecontribname}} }}
 +
 
 +
 
 +
===References===
 +
  <ol><li>[http://forums.contribs.org/index.php?topic=38250.msg173298#msg173298 RE: How do I install postgreSQL 8+] by hedererjs</li><li>
 +
[http://www.issociate.de/board/post/272215/Fwd:_resetting_superuser_password.html Resetting the postgres superuser password]</li></ol>
 +
----
 +
[[Category:Contrib]]
 +
[[Category:Administration]]
Super Admin, Wiki & Docs Team, Bureaucrats, Interface administrators, Administrators
3,250

edits

Navigation menu