如何在 console 畫面下使用 vim 快速操作及編輯檔案
瀏覽分類:
CentOS
Free SSL -免費憑證申請流程
Let’s Encrypt 介紹
Let’s Encrypt 是由許多大公司以及各大非營利團體為了推廣 HTTPS 而贊助的一家免費發佈 SSL certificate 的 Certificate Authority。
無論是你的個人網站還是官網,可以透過以下流程申請免費的 SSL 憑證。
Let’s Encrypt 官方限制
Let’s Encrypt 目前已經正式開放,但有發行數量限制,一般人可能會遇到的:
- Names/Certificate:單一 certificate 限制 100 個 hostname。
- Certificates/Domain:每個 domain 每個禮拜最多 20 個 certificate,但 renew 不計算在 quota 內 (需要憑證內的 hostname 與之前完全一樣)。
- Certificates/FQDNset:相同 hostname 的憑證每個禮拜最多發出五個。
最新的資訊以及完整的細節請參考「Rate Limits – Let’s Encrypt – Free SSL/TLS Certificates」這邊的說明。
Docker 安裝- docker-compose
如何在 linux 上安裝 docker-compose
因 docker-compose 的版本不同,或是自己的 version 版本問題,請在執行 curl 之前先到官網看一下新的版本 https://docs.docker.com/compose/install/
Docker 安裝-AWS EC2 流程
如何在AWS EC2 上安裝 Docker 環境
一、進入服務器後執行 yum install -y docker
[root@localhost ~]# yum install docker Loaded plugins: priorities, update-motd, upgrade-helper Resolving Dependencies --> Running transaction check ---> Package docker.x86_64 0:18.09.9ce-2.52.amzn1 will be installed --> Processing Dependency: runc = 1.0.0 for package: docker-18.09.9ce-2.52.amzn1.x86_64 --> Processing Dependency: containerd = 1.2.6 for package: docker-18.09.9ce-2.52.amzn1.x86_64 --> Processing Dependency: xfsprogs for package: docker-18.09.9ce-2.52.amzn1.x86_64 --> Processing Dependency: pigz for package: docker-18.09.9ce-2.52.amzn1.x86_64 --> Processing Dependency: libseccomp.so.2()(64bit) for package: docker-18.09.9ce-2.52.amzn1.x86_64 --> Running transaction check ---> Package containerd.x86_64 0:1.2.6-1.2.amzn1 will be installed ---> Package libseccomp.x86_64 0:2.3.1-2.4.amzn1 will be installed ---> Package pigz.x86_64 0:2.3.3-1.6.amzn1 will be installed ---> Package runc.x86_64 0:1.0.0-0.1.20190510.git2b18fe1.0.amzn1 will be installed ---> Package xfsprogs.x86_64 0:4.5.0-18.23.amzn1 will be installed --> Finished Dependency Resolution Dependencies Resolved ==================================================================================== Package Arch Version Repository Size ==================================================================================== Installing: docker x86_64 18.09.9ce-2.52.amzn1 amzn-updates 35 M Installing for dependencies: containerd x86_64 1.2.6-1.2.amzn1 amzn-updates 26 M libseccomp x86_64 2.3.1-2.4.amzn1 amzn-main 79 k pigz x86_64 2.3.3-1.6.amzn1 amzn-main 71 k runc x86_64 1.0.0-0.1.20190510.git2b18fe1.0.amzn1 amzn-updates 2.3 M xfsprogs x86_64 4.5.0-18.23.amzn1 amzn-updates 1.7 M Transaction Summary ==================================================================================== Install 1 Package (+5 Dependent packages) Total download size: 65 M Installed size: 223 M Is this ok [y/d/N]: y Downloading packages: (1/6): libseccomp-2.3.1-2.4.amzn1.x86_64.rpm | 79 kB 00:00:00 (2/6): pigz-2.3.3-1.6.amzn1.x86_64.rpm | 71 kB 00:00:00 (3/6): runc-1.0.0-0.1.20190510.git2b18fe1.0.amzn1.x86_64.rpm | 2.3 MB 00:00:01 (4/6): containerd-1.2.6-1.2.amzn1.x86_64.rpm | 26 MB 00:00:03 (5/6): xfsprogs-4.5.0-18.23.amzn1.x86_64.rpm | 1.7 MB 00:00:00 (6/6): docker-18.09.9ce-2.52.amzn1.x86_64.rpm | 35 MB 00:00:05 ------------------------------------------------------------------------------------ Total 11 MB/s | 65 MB 00:00:05 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : libseccomp-2.3.1-2.4.amzn1.x86_64 1/6 Installing : runc-1.0.0-0.1.20190510.git2b18fe1.0.amzn1.x86_64 2/6 Installing : containerd-1.2.6-1.2.amzn1.x86_64 3/6 Installing : pigz-2.3.3-1.6.amzn1.x86_64 4/6 Installing : xfsprogs-4.5.0-18.23.amzn1.x86_64 5/6 Installing : docker-18.09.9ce-2.52.amzn1.x86_64 6/6 Verifying : docker-18.09.9ce-2.52.amzn1.x86_64 1/6 Verifying : xfsprogs-4.5.0-18.23.amzn1.x86_64 2/6 Verifying : libseccomp-2.3.1-2.4.amzn1.x86_64 3/6 Verifying : containerd-1.2.6-1.2.amzn1.x86_64 4/6 Verifying : runc-1.0.0-0.1.20190510.git2b18fe1.0.amzn1.x86_64 5/6 Verifying : pigz-2.3.3-1.6.amzn1.x86_64 6/6 Installed: docker.x86_64 0:18.09.9ce-2.52.amzn1 Dependency Installed: containerd.x86_64 0:1.2.6-1.2.amzn1 libseccomp.x86_64 0:2.3.1-2.4.amzn1 pigz.x86_64 0:2.3.3-1.6.amzn1 runc.x86_64 0:1.0.0-0.1.20190510.git2b18fe1.0.amzn1 xfsprogs.x86_64 0:4.5.0-18.23.amzn1 Complete!
WOL (Wake On Lan) 網絡喚醒遠端開機功能-在外就能讓電腦開機
網路喚醒-在外就能讓電腦開機
因為在家裡有兩台PC 一台 Windows 10 及一台 Linux CentOS 7,不知道是機器太老還是電源問題,有時就給他突然掛了,回家時竟然看到他在休息,關機在那邊等按開機,後來上網找了一下資料,有關網路開機的方式找到了 WOL (Wake On Lan),所以想要來試試看,後來就設定好了,其實也不難,中間還有遇到一點問題,他的環境是在 LAN 下面執行的,但如果你在外面的話,就要用一些別的方式,如果家裡有分享器支援DMZ功能的話,那可以去設定外部IP指項到內部IP,但又另一個問題,如果你沒有固定IP的話,那就不行了,後來我是用一支沒有用的手機來做遠端 WOL(Wake On Lan),整理一下資料如下。
使用工具
- WOL 主機上的設定(Windows 10 / CentOS 7)
- Teamviewer HOST
- Wake On Lan (Android / 免費)