添加 mysql redis postgres 插件
This commit is contained in:
9
plugins/postgres/scripts/create_ssl_certs.sh
Executable file
9
plugins/postgres/scripts/create_ssl_certs.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
postgres_service_dir="$1"
|
||||
|
||||
cd "$postgres_service_dir"
|
||||
mkdir certs && cd certs
|
||||
openssl req -new -newkey rsa:4096 -x509 -days 365000 -nodes -out server.crt -keyout server.key -batch
|
||||
12
plugins/postgres/scripts/enable_ssl.sh
Executable file
12
plugins/postgres/scripts/enable_ssl.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
cd /var/lib/postgresql/data
|
||||
|
||||
cp ../certs/* .
|
||||
chown postgres:postgres server.key
|
||||
chmod 600 server.key
|
||||
|
||||
sed -i "s/^#ssl = off/ssl = on/" postgresql.conf
|
||||
sed -i "s/^#ssl_ciphers =.*/ssl_ciphers = 'AES256+EECDH:AES256+EDH'/" postgresql.conf
|
||||
Reference in New Issue
Block a user