설문조사
PostgreSQL/PPAS 관련 듣고 싶은 교육은


Powered by EnterpriseDB
총 게시물 59건, 최근 0 건
   

openssl 구성

글쓴이 : 주킹 날짜 : 2014-11-18 (화) 15:22 조회 : 1734

#서버에 대한 인증서 생성  (password 설정하여 주시고 common name에 서버 hostname을 입력해 주시면 됩니다.)
Generating a 2048 bit RSA private key
..................................+++
.......+++
writing new private key to 'privkey.pem'
Enter PEM pass phrase: sslgusung
Verifying - Enter PEM pass phrase: sslsusung
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [XX]:
State or Province Name (full name) []:
Locality Name (eg, city) [Default City]:
Organization Name (eg, company) [Default Company Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server's hostname) []: 192.168.101.121
Email Address []:
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
 
#서버 개인키 생성
[postgres@king2 ~]$ openssl rsa -in privkey.pem -out server.key
Enter pass phrase for privkey.pem:
writing RSA key
 

#서버 인증서 생성
[postgres@king2 ~]$ openssl req -x509 -in server.req -text -key server.key -out server.crt
Enter pass phrase for privkey.pem:
#postgresql.conf 수정
ssl = on
#pg_hba.conf (hostssl로 접속하도록 수정)

# TYPE  DATABASE        USER            ADDRESS                 METHOD
local   all all      trust
# "local" is for Unix domain socket connections only
# IPv4 local connections:
hostssl    all             all     0.0.0.0/0                    md5
# IPv6 local connections:
host    all             all             ::1/128                 trust
 
 
#서버 start
pg_ctl start -w -D ./data
# 확인
[postgres@RND07 ~]$ psql -p 5432
Password:
psql.bin (9.3.1)
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
Type "help" for help.
 
 
 
 

   

postgresdba.com