CentOS 5/6 改為可用的 yum 套件庫來源 (2022)

若執行 yum 出現:

http://mirror.centos.org/centos/6/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
To address this issue please refer to the below knowledge base article

表示系統預設的 yum 套件庫可能已經不存在!

我們可以在 vault.centos.org 找到可用的套件庫來源:

  • vault.centos.org: http
  • archive.kernel.org: http - rsync (rsync://archive.kernel.org::centos-vault/)
  • linuxsoft.cern.ch: http - rsync (rsync://linuxsoft.cern.ch/centos-vault/)
  • mirror.nsc.liu: http - rsync (rsync://mirror.nsc.liu.se::centos-store/)

繼續閱讀

CentOS 5/6 快速安裝 VPN Server (PPTP)

「VPN」是一種常用於中、大型企業或團體與團體間的私人網路的通訊方法。藉由 VPN 所建立的加密通道,可以讓你從外部存取公司內部的資源,或透過連線到 VPN 的 Server 當跳板,去存取被限制的外部資源 (俗稱「翻牆」)。

在使用 VPN 之前,你得先有一台提供服務的 VPN Server,現在滿多人會去租用國外的 VPS 當 Server,要架站兼翻牆,Linode 是不錯的選擇。

以下把握幾個重點即可快速完成 Linux 的 PPTP 的 VPN Server 架設:

  • PPP - 點對點協定 (Point-to-Point Protocol)
  • PPTP - 點對點通道協定 (Point-to-Point Tunneling Protocol)
  • iptables - 設定封包轉發規則

安裝步驟

1. 判斷 ppp 是否可用:

$ cat /dev/ppp
cat: /dev/ppp: No such device or address

如果出現跟上面一樣的訊息「No such device or address」,那不用擔心,這表示 ppp 是可用的,可以正常架設 pptp。

如果出現的是「Permission denied」,表示 ppp 是關閉的,下面的步驟就可以不用再看了。
繼續閱讀