DBMS & NoSQL PostgreSQL Current: postgresql 데이타베이스와 사용자 생성 postgresql 데이타베이스와 사용자 생성 포스트그레스 사용자와 데이타베이스 생성. Confluence 나 JIRA 설치용 Creating user먼저 postgres 사용자로 전환 $ sudo -i -u postgres CODE User 생성 $ createuser jira --createdb --no-superuser --no-createrole $ createuser confluence --createdb --no-superuser --no-createrole $ createuser bamboo --createdb --no-superuser --no-createrole $ createuser bitbucket --createdb --no-superuser --no-createrole CODE 또는 psql 프롬프트에서도 가능 # CREATE USER confluence WITH ENCRYPTED PASSWORD 'secret123'; CODE Database 생성postgres 사용자로 전환 $ sudo -i -u postgres CODE DB 생성 $ createdb jiradb -O jira --encoding='utf-8' --locale=en_US.utf-8 --template=template0 $ createdb confluencedb -O confluence --encoding='utf-8' --locale=en_US.utf-8 --template=template0 $ createdb bamboodb -O bamboo --encoding='utf-8' --locale=en_US.utf-8 --template=template0 $ createdb bitbucketdb -O bitbucket --encoding='utf-8' --locale=en_US.utf-8 --template=template0 CODE 또는 psql 프롬프트에서 입력 가능 $ sudo -i -u postgres psql CODE postgres=# CREATE DATABASE jiradb OWNER jira ENCODING 'utf-8'; postgres=# CREATE DATABASE confluencedb OWNER confluence ENCODING 'utf-8'; postgres=# CREATE DATABASE bamboodb OWNER bamboo ENCODING 'utf-8'; postgres=# CREATE DATABASE bitbucketdb OWNER bitbucket ENCODING 'utf-8'; CODE 사용자 생성과 DB 생성을 매번 치기 번거로우니까 bash script 사용 권장 Click here to expand...Creating Role 생성psql 구동 $ sudo -i -u postgres psql CODE Role 생성 postgres=# ALTER ROLE jira WITH PASSWORD 'password' ; postgres=# ALTER ROLE confluence WITH PASSWORD 'password' postgres=# ALTER ROLE bitbucket WITH PASSWORD 'password'; postgres=# ALTER ROLE bamboo WITH PASSWORD 'password'; CODE 연결 확인 옵션 대소문자 구분하니 주의 $ psql -U confluence -d confluencedb -W -h localhost CODE -U : username-d : database name-W : password 사용-h: 연결할 호스트. 제외할 경우 "peer authentication failed" 에러 발생 가능See Alsopg_dump 시 Peer authentication failed for user “postgres” 에러Refhttps://confluence.atlassian.com/doc/database-setup-for-postgresql-173244522.htmlhttps://medium.com/coding-blocks/creating-user-database-and-adding-access-on-postgresql-8bfcd2f4a91ehttps://www.postgresql.org/docs/9.6/sql-createuser.htmlhttp://michaelpatterson.me/atlassian/2016/05/02/jira-confluence-setup-part-2.html ×