Skip to content

Instantly share code, notes, and snippets.

@TobiG77
Last active December 5, 2016 01:37
Show Gist options
  • Save TobiG77/2721a0a91dbc7733de8e8800002b2366 to your computer and use it in GitHub Desktop.
Save TobiG77/2721a0a91dbc7733de8e8800002b2366 to your computer and use it in GitHub Desktop.
pgadmin-on-centos7 for testing
#!/usr/bin/env bash
REPO_PREFIX="https://download.postgresql.org/pub/repos/yum"
REPO_SUFFIX="9.6/redhat/rhel-7-x86_64"
wget "$REPO_PREFIX/RPM-GPG-KEY-PGDG-96"
sudo rpm --import ./RPM-GPG-KEY-PGDG-96
rm -f ./RPM-GPG-KEY-PGDG-96
echo "
[postgres-repo]
name=Postgres Repo
baseurl=$REPO_PREFIX/$REPO_SUFFIX
gpgcheck=1
gpgkey=$REPO_PREFIX/RPM-GPG-KEY-PGDG-96
enabled=1
" |sudo tee /etc/yum.repos.d/pgadmin.repo
sudo yum update -y
sudo yum install pgadmin4-v1 pgadmin4-v1-web -y
sudo sed -i -e "s|DEFAULT_SERVER = 'localhost'|DEFAULT_SERVER = '0.0.0.0'|g" /usr/lib/python2.7/site-packages/pgadmin4-web/config.py
setenforce permissive
sudo systemctl enable /usr/lib/systemd/system/pgadmin4-v1.service
sudo systemctl start pgadmin4-v1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment