Linux: December 2017 Archives

Certbot

user-pic
Vote 0 Votes

Certbot 已經成為 Let's Encrypt 的官方 Client
使用很簡單
cd /usr/local/bin
wget https://dl.eff.org/certbot-auto
chmod a+x certbot-auto
certbot-auto certonly --webroot -w /var/www/html -m yourname@email.com -d yourdomain.com -d www.yourdomain.com
若有更多域名, 繼續加 -d 參數指定
憑證會產生在 /etc/letsencrypt/live/

剩下不到30天內到期可以執行 Renew 指令
certbot-auto renew

Apache 設定
Uncomment Include conf/extra/httpd-ssl.conf in httpd.conf
conf/extra/httpd-ssl.conf 內容
SSLCertificateFile "/etc/letsencrypt/live/yourdomain.com/cert.pem"
SSLCertificateKeyFile "/etc/letsencrypt/live/yourdomain.com/privkey.pem"
SSLCertificateChainFile "/etc/letsencrypt/live/yourdomain.com/chain.pem"
SSLCACertificateFile "/etc/letsencrypt/live/yourdomain.com/fullchain.pem"

Add time stamps in bash history

user-pic
Vote 0 Votes

echo HISTTIMEFORMAT=\"%F %T \" >> /etc/profile

history
996 2017-12-14 12:49:18 ifconfig
997 2017-12-15 12:06:55 ifconfig
998 2017-12-15 12:49:08 ifconfig
999 2017-12-15 12:51:11 ifconfig
1000 2017-12-15 13:38:41 ifconfig

About this Archive

This page is an archive of entries in the Linux category from December 2017.

Linux: November 2017 is the previous archive.

Linux: February 2018 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Linux: Monthly Archives

Monthly Archives