在CentOS6,CentOS7安装 Let'sEncrypt 免费SSL安全证书 HTTPS

本文详细介绍了在CentOS6和CentOS7上安装Let's Encrypt免费SSL安全证书的过程,包括更新系统、安装依赖、下载CertBot、配置Apache以及开启防火墙设置,确保HTTPS安全连接。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一、安装

1、更新: # yum -y update

2、安装依赖: EPEL库,为CertBot提供最新的Python包

# yum -y install epel-release

3、下载CertBot (文件下载到apache的文件夹下)

(1)CentOS7: # yum -y install python-certbot-apache 

(2)CentOS6: # wget https://dl.eff.org/certbot-auto 

 # chmod 755 certbot-auto

4、配置: # ./certbot-auto --apache

 

根据提示填写信息

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

 

/root/.local/share/letsencrypt/lib/python2.6/site-packages/cryptography/__init__.py:26: DeprecationWarning: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of cryptography will drop support for Python 2.6
DeprecationWarning
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel):输入管理员邮箱
 
-------------------------------------------------------------------------------
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf. You must agree
in order to register with the ACME server at
https://acme-v01.api.letsencrypt.org/directory
-------------------------------------------------------------------------------
(A)gree/(C)ancel: A
 
-------------------------------------------------------------------------------
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about EFF and
our work to encrypt the web, protect its users and defend digital rights.
-------------------------------------------------------------------------------
(Y)es/(N)o: Y
 
Which names would you like to activate HTTPS for?
-------------------------------------------------------------------------------
1: www.xi-chuang.com
-------------------------------------------------------------------------------
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel):1
Obtaining a new certificate

 

5、打开防火墙:

#-A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT

#service iptables restart

 

如需再次对认证:

1、 ./certbot-auto --apache

2、

详解:

 

  1、启动命令

2、域名

3、选择是否重定向。 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值