## 生成私钥
```
openssl genrsa -des3 -out server.key 2048
```
## 生成 CSR(证书签名请求)
```
openssl req -new -key server.key -out server.csr -config openssl.cnf
```
## 删除私钥中的密码(可选)
```
openssl rsa -in server.key -out server.key
```
## 生成自签名证书
```
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
```
## 安装私钥和证书
```
vim /etc/httpd/httpd.conf
SSLCertificateFile /etc/ssl/crt/cert.crt //证书文件
SSLCertificateKeyFile /etc/ssl/crt/ssl.key //私钥文件
```
- Linux Server
- 实用命令
- services
- Samba
- /etc/samba/smb.conf
- NFS
- Http
- httpd.conf
- lamp
- FTP
- /etc/vsftpd/vsftpd.conf
- ftp实例
- iSCSI
- SElinux
- DNS
- master
- slave
- subdomain
- 相关配置文件
- /etc/hosts
- /etc/resolv.conf
- /etc/named.conf
- /var/named/named.ca
- /var/named/named.localhost&named.loopback
- DHCP
- /etc/dhcp/dhcpd.conf
- mysql
- Redis
- Git
- HAProxy
- haproxy
- openssl
- nodejs