使用openssl生成sha256自签名证书生成 RSA 密钥对openssl genrsa -out ca.key 2048# 若想对私钥进行加密可以加上 -des3 参数生成 ca crtopenssl req -new -x509 -days 365 -key ca.key -out ca.crtYou are about to be asked to enter information that will be incorporatedinto your certificate r...

nginx配置
2020年04月04日 linux

nginx配置http跳转httpsif ($scheme = http) { return 301 https://$host$request_uri;}如果状态码返回301或者302,当post数据到http协议时,重定向后会出现请求方法变为 get,post数据丢失。解决这个问题就要换返回的状态码。if ($scheme = http) { return 307 https://$host$request_uri;}307、308 都可以保持post数据的重定向,包括请求...

keytool
2020年04月04日 linux

cacerts 密钥库任何Java开发人员都知道Java密钥库(Java Keystores)的默认密码是changeit。如果您希望将密钥存储库文件包与Java一起使用(我们不推荐这样做),请将其更改为强密码。# 查看密钥库中的证书keytool -list -keystore lib/security/cacerts -storepass changeit | grep 'charles' --colorcharles-20240112123015, 2024年1月12日, trust...

if-eq =-gt >-lt <-ge >=-le <=-f 文件是否存在-x 给定变量包含的文件可执行-d 目录是否存在-w 可写-r 可读-L 链接是否存在-b 块设备标准语法使用字符串比较时,最好用双中括号,因为采用单个中括号可能产生错误,应避免if [[ $age -eq 1 ]]; then echo 1;elif [[ $age -eq 2 ]]; then echo 2;else echo 'unkown';fiif [[ -n $...

if for while case
阅读全文

分组:/etc/group /etc/gshadow用户:/etc/passwd /etc/shadow帐号UID范围:定义在/etc/login.defs文件中,由UID_MIN与UID_MAX决定(Ubuntu14.04 1000-60000)系统帐号UID范围:定义在/etc/login.defs文件中,由SYS_UID_MIN与SYS_UID_MAX决定(Ubuntu14.04 100-999)查看单个用户的用户组:id kay查看用户的登录信息:finger kay查看多个用户的...

linux shell
阅读全文