Install Postgresql + Postgis on CentOS 7 - postgresql

I can see that CentOS 7 ships with Postgresql 9.2, but I cannot find Postgis in either central repo or epel 7, any solution please? Thanks a lot!

Postgres provide postgres 9.3 and postgis 2.1 for Centos 7. Link here.
Hopes it helps.

As Soni Harriz already mentioned, you can install PostgreSQL and PostGIS from a Postgresql.org maintained Yum repository. Yet, you do not need to manually install each package (that would be a dependency nightmare!). If you go to the PostgreSQL Yum page:
http://yum.postgresql.org/
You can select which version you wish to install. At the time of writing, this would be version 9.3, found here: http://yum.postgresql.org/repopackages.php#pg93. And more specifically for CentOS 7 here: http://yum.postgresql.org/9.3/redhat/rhel-7-x86_64/pgdg-centos93-9.3-1.noarch.rpm
This will setup a Yum repository and the needed GPG keys so you do not have to go and manually install the packages. More detailed install/setup information can be found here.
These repositories have a full install script available which will also initiate your cluster.

Related

How to install pgAdmin 4 on Fedora 30?

The RPM given on the official website does not have the pgadmin4 package for Fedora 30.
Is there a known workaround?
Edit: Relevant packages are now included in the RPM, so there is no issue anymore.
You can use the link that points to the x64 package:
sudo dnf -y install https://download.postgresql.org/pub/repos/yum/reporpms/F-30-x86_64/pgdg-fedora-repo-latest.noarch.rpm
then you will be able to dnf search and install pgadmin4 normally.
Apparently there is a mistake in the docs for that distro.
You'd have to wait until Devrim gets around to rolling RPMs for Fedora 30.
The alternative is to build the software from source.
EDIT: In the meantime, packages for Fedora 30 are available.

how to upgrade PostgreSQL 9.2.15 to 9.2.18 on a rhel6 linux server

We are using PostgreSQL 9.2.15 on our rhel6 linux server, and I want to upgrade to PostgreSQL 9.2.18.
Please let me know steps to upgrade minor versions in PostgreSQL.
I don't think that is possible.
Your best bet is probably to take the source RPM, replace 9.2.24 with 9.2.18 in the spec file, drop in the 9.2.18 source archive (which is available), and build your own RPM.
But, as has been mentioned in the comments, you should upgrade both databases to 9.2.24. Actually, you should upgrade to version 10.1 or 9.6.6.
Ignoring for now all the reasons why doing this is a bad idea
it's absolutely possible to upgrade to versions other than the latest, but first you will need a copy of the version you want to install
then you use your low-level package manager rpm -i packagefile or dpkg -i packagefile etc as apropriate...

Howto install PostgreSQL 9.6.6 using apt-get on Ubuntu

Is it possible to use apt-get to install a very specific version of PostgreSQL. I would like to install PostgreSQL 9.6.6. I followed the instructions on the postgres download page. This will get the current latest version which is 9.6.7.
Thanks in advance.

postgresql-9.3-pljava-gcj for 64 bit architecture

I need to install pljava for postgresql 9.3 on Ubuntu 14.04. I installed the 64bit version of postgre using the apt-get packet manager of Ubuntu, and I tried installing pljava in the same way
sudo apt-get install postgresql-9.3-pljava-gcj
but it gives me the "unmet dependencies error"
The following packages have unmet dependencies:
postgresql-9.3-pljava-gcj:i386 : Depends: postgresql-9.3:i386 but it is not going to be installed
Apparently, there's no version of pljava for 64bit architectures of pljava for postgresql 9.3. Also searching the Web led me to this conclusion (https://launchpad.net/ubuntu/+source/postgresql-pljava/1.4.3-3 - see the "not build" versions of the packet).
Now, my problem is that I have to use a 64bit version of postgresql-9.3, and I definitely need pljava to embed some "java triggering" inside the db. Does anyone know any solution to this issue? Can I use pljava-9.1 with postgresql-9.3? Anything else?
Thanks a lot
There is no maintained PL/JAVA package for Ubuntu anymore. The package you mentioned is using a too old version of PL/JAVA, depending on gcj. It is highly recommended to use PL/JAVA version 1.5.0, using a recent Oracle or OpenJDK java version.
The sad news is you have to build it yourself. For instructions, see
https://tada.github.io/pljava/build/build.html (building)
https://tada.github.io/pljava/install/install.html (installing)
At the time this question was asked, it was true that there were not maintained PL/Java packages for Ubuntu.
Just to update the story, more recently there are. They can be found in the PGDG apt repository.

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.