Install Postgis in cpanel with an already installed PostgreSQL? - postgresql

How can i install Postgis in cpanel with an already installed PostgreSQL?

I don't think you can install PostGIS from cPanel.
I use PostGIS as part of a shared hosting environment (love A2 Hosting - since PostGIS is definitely not available on many hosts) - and A2 took care of the installation for me.
If you're installing it on your own server, dump your db, reinstall Postgres with the PostGIS extension as a package, then restore your data.
Good luck!

Related

install pg_stat_monitor on edb advanced server

I started playing with edb advanced server and got it installed on Rocky Linux. It is working fine with no issues.
I now want to install percona pg_stat_monitor extension using dnf.
This extension is available via PostgreSQL dnf repositories.
When I install the extension via PostgreSQL dnf repositories, It installs postgres server with it as a dependency.
This results in 2 postgres instances running on my server. i.e. 1 from edb and the other from PostgreSQL.
Is there a way to fix this issue?
All I want is to install the postgres pg_stat_monitor extension on my edb Advanced server.
thanks

Can I do a hard upgrade of a PostGIS-enabled database without the old PostGIS binaries?

I want to upgrade a database that was created in Postgresql 10 & PostGIS 2.4 to Postgresql 11 & PostGIS 2.5. However, due to Homebrew constantly updating, I do not have the old Postgres/PostGIS database installed on my MacOS 10.14 system anymore.
As asked in this question and discussed in this answer and also my own, upgrading a PostGIS-enabled PostgreSQL database requires a Hard Upgrade. In other words, dump the old database and restore it with a special PostGIS script.
However, I now find myself in a situation where I could install the old PostgreSQL 10 with brew install postgresql#10, but not PostGIS, because Homebrew has no more PostGIS 2.4 formula. Therefore, pg_dump will terminate with:
[26040] ERROR: could not access file "$libdir/postgis-2.4": No such file or directory
Is there another way to upgrade an older PostGIS-enabled database?
Update
The brew install postgis installation is not recognizsed by the old postgres (postgres#10) version. Therefore, I cannot simply upgrade PostGIS, as suggested in the comments.
ALTER EXTENSION postgis UPDATE
ERROR: could not open extension control file "/usr/local/Cellar/postgresql#10/10.6_1/share/postgresql#10/extension/postgis.control": No such file or directory
I ended up using an older version of the Postgress.app, which offers the option to use PostgreSQL 10.7 & PostGIS 2.4.6. From there I can use the older binaries in /Applications/Postgres.app/Contents/Versions/10/bin.

Which PostgreSQL Package to Install

We have the following requirements. Could anyone suggest which PostgreSQL package to choose?
Server supporting multiple connections on the same port
Trigger
GUI to interact with the server
Features to support back up & restore database
Ability to connect to a remote postgreSQL server
We would require it for both Windows 7 & OS X El Capitan
UPDATE:
The below link contains multiple links to download PostgreSQL. As we can not download all of them & try out, require someone's help to point us to the right package with the above mentioned components/features
postgres
postgres
pgAdmin
pg_dump, pg_restore, psql
psql lets you specify database (including remote) to connect to
All above works both windows and osX
EnterpriseDb has free packages for postgres that include commonly used components like pgAdmin (a GUI). They have packages for both Windows and OS X but I would use homebrew instead for OS X. Homebrew is an OS X package manager. There's several tutorials for installing postgres via Homebrew. Here is one.
You would install pgAdmin separately.
Installing via Homebrew is a little more complex but gives you more flexibility and capability.
If you're just starting out with postgres, the EnterpriseDB packages will be easier.

PostGis Extension Installed in AlFresco PostgreSQL

I am working in a project that uses AlFresco-4.2.c as the main program in Ubuntu 16.04, and also uses geoserver in tomcat configured with PostgreSQL.
The problem is that I have been searching for a week about how to install the postgis extension in the own postgresql of alfresco. I have searched in the official documentation of alfresco(http://docs.alfresco.com/4.0/tasks/postgresql-config.html) and other forums, but I have found nothing about extensions.
Do you know a way of installing it?
I have tried to use apt-get and the installer of DBEnterprises, but none of that worked.
I'm not sure what you've followed, but here is what I would have done.
As quickly read from the PostGis page, it's a separate extension on PostgreSQL.
So you'll need to forget about Alfresco for one second, find your local PostgreSQL installation.
It's mostly bundled by Alfresco in the alfresco folder, so e.g. /opt/alfresco-4.2.c/postgresql and the data resides /opt/alfresco-4.2.c/alf_data/postgresql.
If this doesn't work for you, just do the following:
Create a dump file from the current PostgreSQL
Install a PostgreSQL distro from Ubuntu (check the version numbers)
Install the PostGIS extension
Import the dump file

PostGIS - can't create spatially-enabled database

I'm using Ubuntu 10.10, PostgreSQL 9.0 and PostGIS 1.5.
I've installed PostGIS 1.5 from:
https://launchpad.net/~ubuntugis/+archive/ubuntugis-unstable
I used PPA first then the command:
sudo apt-get install postgis
to install postgis.
I've been following these instructions to create a spatially-enabled database:
http://ostgis.refractions.net/docs/ch02.html
I got to the point where it's saying:
Now load the PostGIS object and
function definitions into your
database by loading the postgis.sql
definitions file (located in
[prefix]/share/contrib as specified
during the configuration step).
psql -d [yourdatabase] -f postgis.sql
Well, there is no postgis.sql on my server after the installation. I did an sudo updatedb to make sure I can find postgis.sql but it's not there.
Any ideas? Thank you!
The "ubuntugis-unstable" PPA repository that you're using does not ship PostGIS for PostgreSQL 9.0. It includes a package named "postgresql-8.4-postgis", which contains the file /usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql. This is what they're referring to.
Unfortunately, the PPA does not include a version of the PostGIS extension for PostgreSQL 9.0 because 9.0 isn't yet shipped with any Ubuntu release. It will be included in the upcoming Ubuntu 11.04 Natty, which will probably also ship an up-to-date PostGIS in the official repositories.
So, you can follow these instructions to build your own PostGIS, or stick with PostgreSQL 8.4 from the official repos.
edit: ubuntu 11.04 don't ship postgres 9.0
The newers Postgres and Postgis versions that work with it are available from
https://launchpad.net/~pitti/+archive/postgresql/+packages
Following this guide that incorporates all needed software for PostGIS, you can set it up easily. It's for 10.04 but the PPA works with 10.10 as well.
I'd recommend 9.x and the latest PostGIS since we had severe (known) speed problems for a project. SO choose either 8.3 or 9.0.
There is a tutorial for PostGIS 8.4 on Ubuntu 10.10 here.