W
W
WStanley2019-11-18 07:57:11
linux
WStanley, 2019-11-18 07:57:11

Centos7, how to upgrade postgresql from 9.2 to 10 version?

Shake!
The server is running Centos7, ispmanager5 lite, postgresql9.2
ispmanager does not let you update (from the panel) the postgresql version above 9.2, but you need to update it. Can you tell me the sequence of actions for updating, preferably with the commands that need to be executed on the server, so that the postgresql version is at least 10.1 (I have 10.1 on LAN) or is it better to set the latest 12? It is also required to transfer all the databases to the new postgresql.
I'm not an admin myself and I really don't want to break everything. there are active sites on the server.
Thank you!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey Dmitriev, 2019-11-18
@WStanley

1. Stop postgresql
2. make a backup of the databases with a dump + a copy of the directory with the databases.
3. make a backup of the /etc directory
4. Connect the postgresql 10 repository for yum https://tecadmin.net/install-postgresql-server-centos/
5. Check that the repository file in /etc/yum.repos.d has enabled =1
6. Run yum search postgre command to see the names of packages from version 10.
7. run yum update packagename
8. start postgresql.
This is a theoretical description, therefore:
First, it is better to do it in a virtual machine with Centos 7 first.
Second, instead of updating, you can use a clean installation and restore databases from backups.

S
Sergey, 2019-11-18
@feanor7

Hire an admin, it will be much easier. It's very easy to set up. https://www.postgresql.org/download/linux/redhat/
But before that, make a backup of the entire server, make a backup of the database (each), roll the backup and config after recovery.

R
rionnagel, 2019-11-18
@rionnagel

In standard centos 7 turnips, there is no postgres higher than 9. You can add turnips. You can bet, but if you don't know what you're doing, you'll break everything to hell. Make backups.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question