-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.sh
33 lines (22 loc) · 876 Bytes
/
init.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
# Bash script to install Goland and PostgreSQL on RHEL 7.3
### Set up Golang
sudo yum install golang
# put these in ~/.bash_profile
# GOROOT must be set only if go was installed in another location and not `/usr/local/go`
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
export GOPATH="$HOME/go"
export GOBIN="$GOPATH/bin"
### Set up PostgreSQL
sudo yum install postgresql-server postgresql-contrib
sudo postgresql-setup initdb
# change the `ident`s to `trust`s for a pw-free experience
# or to `md5` to do pws in the following file:
# $ sudo vi /var/lib/pgsql/data/pg_hba.conf
# then restart if already started
# $ sudo systemctl restart postgresql
sudo systemctl start postgresql
sudo systemctl enable postgresql
### to access a db called `ipcmdb` with a user called `postgres`
sudo -u postgres psql ipcmdb
# create a new user with a password, please