Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 그래픽
- DataFrame
- 이스케이프시퀀스
- 탈출문자
- barplot in r
- 데이터분석
- await
- 배열삭제
- 버스분석
- 값추가
- plot in r
- React
- 백준 11718
- useState
- 값삭제
- 백준 10172
- react #회원가입 #비밀번호비교
- R 그래프
- vetor
- setstate
- 백준
- 광명시버스분석
- 10172
- asynchronization
- 그대로 출력하기
- R데이터형태
- getline
- 배열추가
- barplot
- 이용현황분석
Archives
- Today
- Total
devlog_zz
postgreSQL 설치 - centos7 인터넷 안되는 환경 본문
728x90
1. 사용자계정 추가 (root 계정에서)
adduser postgres
passwd postgres
password12#
su - postgres
https://www.postgresql.org/ftp/source/v12.0/
url에서 tar 다운로드하기
2. tar 압축해제
tar xvfz postgresql-12.0.tar.gz
cd postgresql-12.0
3. configure 파일 설정
sudo ./configure --prefix=/home/postgres/postgresql --without-readline --without-zlib
--prefix 로 설치할 디렉토리 경로 설정
4. postgresql 설치
sudo make
sudo make install
5. DB 설치
cd /home/postgres/postgresql/bin
./initdb -D /home/postgres/postgresql/data
./postgres -D /home/postgres/postgresql/data >logfile 2>&1 &
./psql test
/home/postgres/postgresql/data 경로에 DB 설치
6. DB 기동
./pg_ctl status -D /home/postgres/postgresql/data //상태확인
./pg_ctl restart -D /home/postgres/pgsql/data // 재기동 start,stop 가능
7. 외부 접속 허용
root계정으로 로그인해서
iptables -I INPUT 1 -p tcp --dport 5432 -j ACCEPT
iptables -I OUTPUT 1 -p tcp --dport 5432 -j ACCEPT
다시 postgrs 계정 로그인
vi /home/postgres/postgresql/data/postgresql.conf
listen_addresses = 'localhost' -> listen_addresses='*' 주석풀고 수정
( :/listen으로 검색 )
vi /home/postgres/postgresql/data/pg_hba.conf
host all all 0.0.0.0/0 password 추가
8. psql 접속
cd /home/postgres/postgresql/bin
./psql
9. 접속 한뒤 database 생성 및 user 생성
postgres=# CREATE DATABASE {DBname};
postgres=# CREATE USER {UserName};
postgres=# ALTER USER {UserName} WITH PASSWORD '{Password}';
해당 데이터 베이스 접속
\\connect {databaseName};
참고 : https://hyeonyeee.tistory.com/78 [hyeoneee's blog]
728x90
Comments