openssl genrsa -des3 -out server.key 1024openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout server.key -out server.crt Common Name根据域名或者ip生成