导入证书
处理步骤
- 下载证书。
- 证书下载成功后,将证书上传到服务器“/home”目录。
- 导入证书。
根据系统执行对应命令,输入“changeit”后回车,输入“yes”后回车。
- CentOS系统:
1
keytool -import -alias a1 -keystore /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.292.b10-1.el7_9.aarch64/jre/lib/security/cacerts -file /home/a1.cer
- openEuler系统:
keytool -import -alias a1 -keystore /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.272.b10-7.oe1.aarch64/jre/lib/security/cacerts -file /home/a1.cer
- CentOS系统:
- 可选:查看证书。
- CentOS系统:
ll /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.292.b10-1.el7_9.aarch64/jre/lib/security/cacerts keytool -list -keystore /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.292.b10-1.el7_9.aarch64/jre/lib/security/cacerts keytool -list -keystore /etc/java/java-1.8.0-openjdk/java-1.8.0-openjdk-1.8.0.292.b10-1.el7_9.aarch64/lib/security/cacerts keytool -list -alias a1 -keystore /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.292.b10-1.el7_9.aarch64/jre/lib/security/cacerts
- openEuler系统:
ll /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.272.b10-7.oe1.aarch64/jre/lib/security/cacerts keytool -list -keystore /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.272.b10-7.oe1.aarch64/jre/lib/security/cacerts keytool -list -keystore /etc/java/java-1.8.0-openjdk/java-1.8.0-openjdk-1.8.0.272.b10-7.oe1.aarch64/lib/security/cacerts keytool -list -alias a1 -keystore /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.272.b10-7.oe1.aarch64/jre/lib/security/cacerts
- CentOS系统:
- 可选:删除证书。
- CentOS系统:
keytool -delete -alias a2 -keystore /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.292.b10-1.el7_9.aarch64/jre/lib/security/cacerts
- openEuler系统:
keytool -delete -alias a2 -keystore /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.272.b10-7.oe1.aarch64/jre/lib/security/cacerts
- CentOS系统:
- 设置系统时间。
- 查看系统时间。
date
- 若系统时间与当前时间不一致,则修改系统时间为当前北京时间,例如:
1 2
date -s 20210720 date -s 11:45:00
- 查看系统时间。
父主题: 常用操作