云证书管理服务 CCM-在Nginx服务器上安装国密标准SSL证书:步骤一:环境配置

时间:2025-03-14 14:54:00

步骤一:环境配置

  1. 准备gmssl_openssl

    下载页面https://www.gmssl.cn/gmssl/index.jsp中的openssl国密版

    拷贝到/root/目录并解压

    tar xzfm gmssl_openssl_1.1_b2024_x64_1.tar.gz -C /usr/local

    则/usr/local/gmssl为国密版openssl目录

  2. 准备nginx
  3. 下载nginx-1.18.0
  4. tar zxfm nginx-1.18.0.tar.gz
  5. cd httpd-2.4.46
  6. vi auto/lib/openssl/conf
  7. 将全部$OPENSSL/.openssl/修改为$OPENSSL/并保存
  8. ./configure \
  9. --without-http_gzip_module \
  10. --with-http_ssl_module \
  11. --with-http_stub_status_module \
  12. --with-http_v2_module \
  13. --with-file-aio \
  14. --with-openssl="/usr/local/gmssl" \
  15. --with-cc-opt="-I/usr/local/gmssl/include" \
  16. --with-ld-opt="-lm"
  17. 然后make install
  18. 则/usr/local/nginx为生成的国密版nginx目录
  19. 注:可能需要安装pcre-devel包。
support.huaweicloud.com/usermanual-ccm/ccm_01_0392.html