-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit_server.txt
53 lines (41 loc) · 1.39 KB
/
init_server.txt
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
yum search epel-release-el9
yum install -y oracle-epel-release-el9.x86_64
yum search screen
yum install screen.x86_64 86_64
yum install screen.x86_64
yum search rlwrap
yum install rlwrap.x86_64
firewall-cmd --zone=public --permanent --add-service=ssh
firewall-cmd --reload
usermod -a -G vboxsf maksim
############## VM preparation
# local
How to install pg on OEL: https://yum.postgresql.org/repopackages/
repo: https://yum.postgresql.org/repopackages/
yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm
yum makecache -y
yum install postgresql14-server.x86_64 -y
##### yacloud
# vm-side
sudo su - root
apt update
apt upgrade
# local action
ssh-keygen -t rsa -b 4096 -f yacloud -N ...
eval 'ssh-agent' #cygwin eval < <(ssh-agent)
ssh-add -v
ssh-add -l
##### install postgresql on ubuntu
# https://www.postgresql.org/download/linux/ubuntu/
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql
#### auth
# https://www.postgresql.org/docs/current/auth-pg-hba-conf.html
# /etc/postgresql/14/main/pg_hba.conf
########################################
# clients
https://github.com/dbcli/pgcli
https://github.com/mzarnitsa/psql
~/.psqlrc