centos 配置Openssl并创建证书
具体详情参考:http://wiki.centos.org/HowTos/Https
一、安装软件
yum install mod_ssl openssl
二、创建证书:
# Generate private key
openssl genrsa -out ca.key 2048
# Generate CSR
openssl req -new -key ca.key -out ca.csr
# Generate Self Signed Key
openssl x509 -req -days 365 -in ca.csr -signkey ca.key -out ca.crt
# Copy the files to the correct locations
cp ca.crt /etc/pki/tls/certs
cp ca.key /etc/pki/tls/private/ca.key
cp ca.csr /etc/pki/tls/private/ca.csr
三、重启apache:
/etc/init.d/httpd restart
or
service httpd restart
四、设置防火墙:
iptables -A INPUT -p tcp --dport 443 -j ACCEPT
/sbin/service iptables save
iptables -L -v
IT运维开发路上的点点滴滴。。。