centos 下tomcat使用开源SSL证书启用HTTPS

centos 下tomcat使用开源SSL证书启用HTTPS

项目需求使用HTTPS安全访问方式:

现有环境

centos 7,tomcat

查阅了大量的资料,方案

开源证书Let's Encrypt (linux下申请 ,windows下申请


申请证书,可以看我另一个转载的博客

 证书到手,就是配置了
 tomcat配置pem证书,需要arp支持,所有在centos 7中先安装

 

 //配置gcc依赖
yum install gcc

//安装openssl
wget  https://www.openssl.org/source/openssl-1.1.0f.tar.gz
tar -zxvf openssl-1.1.0f.tar.gz
cd openssl-1.1.0f
./config --prefix=/usr/local/openssl
make && make install
   
   
  
   
   //安装apr
cd
wget http://mirror.bit.edu.cn/apache/apr/apr-1.6.2.tar.gz
tar -zxvf apr-1.6.2.tar.gz
cd apr-1.6.2
./configure --prefix=/usr/local/apr
make && make install

//安装apr-util
cd
wget http://mirror.bit.edu.cn/apache/apr/apr-util-1.6.0.tar.gz
tar -zxvf apr-util-1.6.0.tar.gz
cd apr-util-1.6.0
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make && make install

//安装tomcat-native
cd
wget http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-connectors/native/1.2.12/source/tomcat-native-1.2.12-src.tar.gz
tar -zxvf tomcat-native-1.2.12-src.tar.gz
cd tomcat-native-1.2.12-src/native
./configure --with-apr=/usr/local/apr --with-ssl=/usr/local/openssl
make && make install


//配置环境变量
vi /etc/profile
//在末尾添加
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/apr/lib
source /etc/profile

 就是配置tomcat



 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值