Last active
November 10, 2019 21:29
-
-
Save coder4web/c6d7c3810518063f80ed145e1ed0e562 to your computer and use it in GitHub Desktop.
Postgres Pro install, setup and maintenance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @see https://postgrespro.ru/docs/postgrespro/11/binary-installation-on-linux.html | |
#------------------------------- | |
# Debian 8/9/10: | |
#------------------------------- | |
sudo apt-get install lsb-release | |
sudo sh -c 'echo "deb http://repo.postgrespro.ru/pgpro-11/debian $(lsb_release -cs) main" > /etc/apt/sources.list.d/postgrespro.list' | |
wget --quiet -O - http://repo.postgrespro.ru/pgpro-11/keys/GPG-KEY-POSTGRESPRO | sudo apt-key add - | |
sudo apt-get update | |
#------------------------------- | |
# Ubuntu 18.04 LTS: | |
#------------------------------- | |
sudo apt remove postgresql* | |
sudo sh -c 'echo "deb http://repo.postgrespro.ru/pgpro-11/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/postgrespro.list' | |
wget --quiet -O - http://repo.postgrespro.ru/pgpro-11/keys/GPG-KEY-POSTGRESPRO | sudo apt-key add - | |
sudo apt update | |
sudo apt install postgrespro-std-11 postgrespro-std-11-dev | |
sudo -u postgres psql postgres | |
\password postgres | |
dpkg --listfiles postgrespro-std-11-server | |
# pg-setup https://postgrespro.ru/docs/postgrespro/11/pg-setup | |
sudo pg-setup service status | |
sudo pg-setup service enable | |
# pg_config | |
ln -s /opt/pgpro/std-11/bin/pg_config /usr/bin/ | |
# plv8 deps | |
sudo apt install libc++-dev libc++abi-dev | |
#------------------------------- | |
# CentOS 6/7: | |
#------------------------------- | |
sudo rpm -ivh http://repo.postgrespro.ru/pgpro-11/keys/postgrespro-std-11.centos.pro.yum-1.0-1.noarch.rpm | |
sudo yum update && sudo yum upgrade | |
sudo yum install postgrespro-std-11 | |
sudo pg-setup service enable | |
sudo pg-setup service start | |
sudo -i -u postgres | |
psql | |
\password postgres |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment