티스토리 뷰

컴퓨타/연습공부

wsl, centos, postgresql 설치

우리집강아지깜순이 2022. 2. 12. 00:30
반응형


1. postgresql 설치 = 9.x버전
sudo yum install -y postgresql

2. respository 설치
sudo rpm -Uvh https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
-U(--upgrade) : 패키지를 업그레이드한다.
-v : 자세한 정보를 출력한다.
-h : 설치 진행 상황을 # 문자를 이용하여 출력한다.


3. 11버전으로 설치
 sudo yum install -y postgresql11-server postgresql11-contrib

 

4. 디비생성

/usr/pgsql-11/bin/postgresql-11-setup initdb 

아래와 같이 오류가 발생하면

Failed to get D-Bus connection: Operation not permitted
failed to find PGDATA setting in postgresql-11.service

아래의 명령어 돌리기
mv /usr/bin/systemctl /usr/bin/systemctl.old
curl https://raw.githubusercontent.com/gdraheim/docker-systemctl-eplacement/master/files/docker/systemctl.py > /usr/bin/systemctl
chmod +x /usr/bin/systemctl


반응형
댓글
최근에 올라온 글
반응형