## 生成私鑰
```
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