使用jdk 自带工具keytool 生成证书
[root@localhost61 ~]# keytool -genkeypair-alias "tomcat" -keyalg "RSA" -keystore"/usr/local/src/apache-tomcat-7.0.72/ssl/192.168.10.61.keystore"
Enter keystore password: 输入密码
Re-enter new password:
What is your first and last name? 这里输入的名字应该与域名保持一致,否则道中无法访问
[Unknown]: 192.168.10.61
What is the name of your organizationalunit? 输入组织信息
[Unknown]: 192.168.10.61
What is the name of your organization? 输入组织信息
[Unknown]: 192.168.10.61
What is the name of your City or Locality? 输入城市名称
[Unknown]: suzhou
What is the name of your State or Province?输入省份名称
[Unknown]: jiangsu
What is the two-letter country code forthis unit? 输入组织编码
[Unknown]: cn
Is CN=192.168.10.61, OU=192.168.10.61,O=192.168.10.61, L=suzhou, ST=jiangsu, C=cn correct?
[no]: y 确认组织信息 ,确认输入yes
Enter key password for
(RETURNif same as keystore password):
Re-enter new password: # 输入设置证书设置的密码
备注:演示设置的密码为123123
二、修改server.xml 配置文件