瀏覽標籤:

centos

Let’s Encrypt 憑證 – CentOS 7 – Nginx 環境安裝 (Certbot工具)

先前因為 SSL 憑證需要付費問題,後來找到了 Let’s Encrypt 憑證頒發機構 (Certificate Authority, CA) (https://letsencrypt.org/zh-tw/getting-started/),讓用戶可自行申請免費憑證,因為免費所以有些限制,相關限制可參考官網說明(https://letsencrypt.org/zh-tw/docs/rate-limits/)

月前收到Email Let’s Encrypt 寄來的通知「Let’s Encrypt certificate expiration notice for domain」,主要是說明你的網址要過期了,請記得要進行更新(如下圖)

整理了一下新的更新方式,這次找到 Certbot 工具,可以利用 Let’s Encrypt 進行申請免費的 HTTPS 憑證。

以下為操作流程

閱讀更多

Linux tmux 安裝及常用指令說明

之前在 Linux 上都是使用 Screen 來切換畫面,後來看到用朋友使用 tmux 來進行多視窗管理,這看起來又好用多了,可以很直覺清楚知道每個視窗在操作什麼,查資料及問題也方便多了,整理一下安裝及操作方式。

閱讀更多

Let’s Encrypt 憑證 – CentOS 7 – Apache 環境安裝 (Certbot工具)

先前因為 SSL 憑證需要付費問題,後來找到了 Let’s Encrypt 憑證頒發機構 (Certificate Authority, CA) (https://letsencrypt.org/zh-tw/getting-started/),讓用戶可自行申請免費憑證,因為免費所以有些限制,相關限制可參考官網說明(https://letsencrypt.org/zh-tw/docs/rate-limits/)

月前收到Email Let’s Encrypt 寄來的通知「Let’s Encrypt certificate expiration notice for domain」,主要是說明你的網址要過期了,請記得要進行更新(如下圖)

整理了一下新的更新方式,這次找到 Certbot 工具,可以利用 Let’s Encrypt 進行申請免費的 HTTPS 憑證。

以下為操作流程

閱讀更多

如何將 Docker 升級至最新版本

最近在安裝 Docker 時發現,怎麼使用 yum install -y docker 安裝的 Docker 版本都會是 Docker version 1.13.1 (官網),這版本已經是 2017年2月8日,好舊的版本,目前官方都已經更新到 Docker version 20.10.3 (官網) 2021年2月1日。

整理了一下,如何將舊版本強制更新至最新版流程。
使用的OS為 CentOS7

一、確認目前的版本

可使用以下指令確認,並記錄目前已安裝的套件
docker -v or docker version
rpm -qa | grep docker

[root@web ~]# docker -v
Docker version 1.13.1, build 0be3e21/1.13.1
[root@web ~]# rpm -qa | grep docker
docker-common-1.13.1-203.git0be3e21.el7.centos.x86_64
docker-client-1.13.1-203.git0be3e21.el7.centos.x86_64
docker-1.13.1-203.git0be3e21.el7.centos.x86_64
閱讀更多

如何建立私人的 docker registry 架設教學 (一)

一、建立自己的 docker registry 主機

參考docker registry 來源:https://hub.docker.com/_/registry

環境:CentOS 7

  • Docker-Registry:私倉主機(docker-registry.com.cc:5000)
  • nginx:連線至Docker_Registry主機進行 image push 流程

Docker-Registry主機上執行指令docker run -d -p 5000:5000 -v /home/docker-registry/storage:/var/lib/registry --name registry registry:latest

[root@Docker-Registry ~]# docker run -d -p 5000:5000 -v /home/docker-registry/storage:/var/lib/registry --name registry registry:latest
Unable to find image 'registry:latest' locally
Trying to pull repository docker.io/library/registry ... 
latest: Pulling from docker.io/library/registry
cbdbe7a5bc2a: Pull complete 
47112e65547d: Pull complete 
46bcb632e506: Pull complete 
c1cc712bcecd: Pull complete 
3db6272dcbfa: Pull complete 
Digest: sha256:8be26f81ffea54106bae012c6f349df70f4d5e7e2ec01b143c46e2c03b9e551d
Status: Downloaded newer image for docker.io/registry:latest
4c8c0b3e0981716be24d49c360a46c38ccdeaafd9f52ee541a250e8154f17941

指令說明:

-d 背景執行
-p 5000:5000 使用5000 port
-v 將本地的 /home/docker-registry/storage 關連至 /var/lib/registry
–name docker令名,可自定
registry:latest 取得docker hub 上 registry 最新的版本

建立完成後,可執行 docker ps -a 查看是否正常運行

[root@Docker-Registry ~]# docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES
4c8c0b3e0981        registry:latest     "/entrypoint.sh /e..."   18 minutes ago      Up 18 minutes       0.0.0.0:5000->5000/tcp   registry
閱讀更多

如何在CentOS 8 上安裝 Docker 流程

How to install Docker CE on RHEL 8 / CentOS 8

今天在新的CentOS 8.2 上進行 Docker install,發生了一些問題,後來查了一下網路資料,整理了一下記錄安裝流程,之後有人要使用比較方便,之前沒有用過 DNF 都是使用 YUM,這一次也用到了,也查了一下相關資料。

閱讀更多

[OpenFire] CentOS 上的安裝流程

在 CentOS 上安裝 OpenFire Server 流程

1.安裝 OpenFire Server 版程式

進入Openfire官網,下載最新版本的OpenFire,目前最新版本為4.2.3-1

官方下載:openfire-4.2.3-1.x86_64.rpm
本地下載:openfire-4.2.3-1.x86_64.rpm

[root@ip-192-168-0-11 tmp]# wget https://www.igniterealtime.org/downloadServlet?filename=openfire/openfire-4.2.3-1.x86_64.rpm
--2018-10-04 01:49:35--  https://www.igniterealtime.org/downloadServlet?filename=openfire/openfire-4.2.3-1.x86_64.rpm
Resolving www.igniterealtime.org... 52.58.216.59
Connecting to www.igniterealtime.org|52.58.216.59|:443... connected.
HTTP request sent, awaiting response... 302
Location: http://download.igniterealtime.org/openfire/openfire-4.2.3-1.x86_64.rpm [following]
--2018-10-04 01:49:36--  http://download.igniterealtime.org/openfire/openfire-4.2.3-1.x86_64.rpm
Resolving download.igniterealtime.org... 52.58.216.59
Connecting to download.igniterealtime.org|52.58.216.59|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github.com/igniterealtime/Openfire/releases/download/v4.2.3/openfire-4.2.3-1.x86_64.rpm [following]
--2018-10-04 01:49:37--  https://github.com/igniterealtime/Openfire/releases/download/v4.2.3/openfire-4.2.3-1.x86_64.rpm
Resolving github.com... 192.30.255.113, 192.30.255.112
Connecting to github.com|192.30.255.113|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/18511687/1bd89d1a-2e8c-11e8-8519-efffef7273cc?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20181004%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20181004T014937Z&X-Amz-Expires=300&X-Amz-Signature=e571f68b7e78991c49d9b04dec816923c201ba2116e9656c96ce055edf8b8b73&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dopenfire-4.2.3-1.x86_64.rpm&response-content-type=application%2Foctet-stream [following]
--2018-10-04 01:49:37--  https://github-production-release-asset-2e65be.s3.amazonaws.com/18511687/1bd89d1a-2e8c-11e8-8519-efffef7273cc?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20181004%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20181004T014937Z&X-Amz-Expires=300&X-Amz-Signature=e571f68b7e78991c49d9b04dec816923c201ba2116e9656c96ce055edf8b8b73&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dopenfire-4.2.3-1.x86_64.rpm&response-content-type=application%2Foctet-stream
Resolving github-production-release-asset-2e65be.s3.amazonaws.com... 52.216.101.147
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com|52.216.101.147|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 105731242 (101M) [application/octet-stream]
Saving to: âdownloadServlet?filename=openfire%2Fopenfire-4.2.3-1.x86_64.rpmâ
100%[=================================================>] 105,731,242 11.0M/s   in 2m 21s

2018-10-04 01:51:59 (735 KB/s) - âdownloadServlet?filename=openfire%2Fopenfire-4.2.3-1.x86_64.rpmâ

[root@ip-192-168-0-11 tmp]# yum install downloadServlet\?filename\=openfire%2Fopenfire-4.2.3-1.x86_64.rpm
Loaded plugins: presto, security
Setting up Install Process
Examining downloadServlet?filename=openfire%2Fopenfire-4.2.3-1.x86_64.rpm: openfire-4.2.3-1.x86_64
Marking downloadServlet?filename=openfire%2Fopenfire-4.2.3-1.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package openfire.x86_64 0:4.2.3-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===========================================================================================
 Package Arch   Version Repository                                                    Size
===========================================================================================
Installing:
 openfire
         x86_64 4.2.3-1 /downloadServlet?filename=openfire%2Fopenfire-4.2.3-1.x86_64 256 M

Transaction Summary
===========================================================================================
Install       1 Package(s)

Total size: 256 M
Installed size: 256 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : openfire-4.2.3-1.x86_64                                                 1/1
  Verifying  : openfire-4.2.3-1.x86_64                                                 1/1

Installed:
  openfire.x86_64 0:4.2.3-1

Complete!

閱讀更多