Created
October 28, 2019 16:34
-
-
Save cwjohnston/d9b59e701266b69470aa60132815027d to your computer and use it in GitHub Desktop.
Setting up postgres on Centos 7 for Sensu Go
This file contains 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
# postgres setup on centos 7 | |
``` | |
yum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7.7-x86_64/pgdg-redhat10-10-2.noarch.rpm | |
yum install postgresql10-server postgresql10 | |
/usr/pgsql-10/bin/postgresql-10-setup initdb | |
systemctl start postgresql-10 | |
systemctl enable postgresql-10 | |
systemctl status postgresql-10 | |
sudo -u postgres psql | |
``` | |
Once in the psql command line: | |
``` | |
postgres=# CREATE DATABASE sensu_events; | |
CREATE DATABASE | |
postgres=# CREATE USER sensu WITH ENCRYPTED PASSWORD 'mypass'; | |
CREATE ROLE | |
postgres=# GRANT ALL PRIVILEGES ON DATABASE sensu_events TO sensu; | |
GRANT | |
``` | |
Add sensu user to the pg_hba.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment