日本乱偷中文字幕,美女脱内衣18禁免费看,亚洲国产精品丝袜在线观看,18女人腿打开无遮挡,廖承宇chinese野战做受

Redis 6.0新特性----TLS 通道加密

Redis 6實(shí)現了通道加密,提高了redis的安全性。Redis作為緩存數據庫,里面很有可能緩存重要的敏感信息,所以支持tls通道加密還是很有必要的,當然敏感信息還是建議加密保存。

創(chuàng )建證書(shū)

mkdir -p tests/tls
openssl genrsa -out tests/tls/ca.key 2048
openssl req \
    -x509 -new -nodes -sha256 \
    -key tests/tls/ca.key \
    -days 3650 \
    -subj '/O=Redis Test/CN=Certificate Authority' \
    -out tests/tls/ca.crt
openssl genrsa -out tests/tls/redis.key 2048
openssl req \
    -new -sha256 \
    -key tests/tls/redis.key \
    -subj '/O=Redis Test/CN=Server' | \
    openssl x509 \
        -req -sha256 \
        -CA tests/tls/ca.crt \
        -CAkey tests/tls/ca.key \
        -CAserial tests/tls/ca.txt \
        -CAcreateserial \
        -days 365 \
        -out tests/tls/redis.crt
openssl dhparam -out tests/tls/redis.dh 2048

生成的證書(shū)如下圖所示:

image.png

編譯redis

使用下面命令編譯redis:

make BUILD_TLS=yes -j8

編譯結果如下:

image.png

啟動(dòng)服務(wù)端

使用下面命令啟動(dòng)redis服務(wù):

./src/redis-server --tls-port 6379 --port 0 \
        --tls-cert-file ./tests/tls/redis.crt \
        --tls-key-file ./tests/tls/redis.key \
        --tls-ca-cert-file ./tests/tls/ca.crt

結果如下:

image.png

客戶(hù)端鏈接

使用客戶(hù)端鏈接redis服務(wù):

./src/redis-cli --tls \
        --cert ./tests/tls/redis.crt \
        --key ./tests/tls/redis.key \
        --cacert ./tests/tls/ca.crt

結果如下:

image.png

也可以使用下面命令:

./src/redis-cli --tls --insecure

結果如下:

image.png



標 題:《Redis 6.0新特性----TLS 通道加密
作 者:zeekling
提 示:轉載請注明文章轉載自個(gè)人博客:浪浪山旁那個(gè)村

    評論
    9 評論
    2021-11-06 21:29 回復?

    ??

    zzc
    2021-11-06 14:33 回復?

    ??

    lss
    2021-11-06 14:01 回復?

    mark

    2021-09-18 16:26 回復?

    靜態(tài)的可以用cdn的

    2021-09-06 16:44 回復?

    ??

    2021-09-05 15:33 回復?

    學(xué)習了

    2021-09-05 15:31 回復?

    學(xué)習了

    2021-09-02 15:21 回復?

    想給博客套個(gè)緩存,奈何是靜態(tài)站!

    2021-08-08 17:55 回復?

    技術(shù)文章,學(xué)習了。
    80% WordPress/Typecho,都是在講開(kāi)發(fā)

avatar

取消
日本乱偷中文字幕,美女脱内衣18禁免费看,亚洲国产精品丝袜在线观看,18女人腿打开无遮挡,廖承宇chinese野战做受