附錄 A. 取得 FreeBSD

This translation may be out of date. To help with the translations please access the FreeBSD translations instance .

目錄

A.1. CD 與 DVD 合集

FreeBSD CD 以及 DVD 組可從以下幾個線上零售商取得:

A.2. FTP 站

FreeBSD 的官方原始碼可從全球任一鏡像站透過匿名 FTP 取得。其中 ftp://ftp.FreeBSD.org/pub/FreeBSD/ 站可使用 HTTP 及 FTP,該站是由多台由計畫叢集管理員所維護的主機所組成,且在 GeoDNS 之後,可導向使用者到最近可用的鏡像站。

除此之外,FreeBSD 也可透過匿名 FTP 從下列鏡像站取得。要透過匿名 FTP 取得 FreeBSD 時,請先嘗試使用臨近的站台。列在 "主要鏡像站" 中的鏡像站通常會有完整的 FreeBSD 封存檔 (每一個架構目前所有可用的版本),但若要考慮下載速度,可能要使用您所在國家或區域的站台。區域的站台會有熱門架構最近期的版本,但不會有完整的 FreeBSD 封存檔。所有站台皆提供匿名 FTP 存取只有部份站台會以其他方式提供存取。每個站台可用的存取方式會列在主機名稱後的括號當中。

(as of UTC)

Central Servers

Primary Mirror Sites

In case of problems, please contact the hostmaster < mirror-admin@FreeBSD.org > for this domain.

Armenia

In case of problems, please contact the hostmaster < hostmaster@am.FreeBSD.org > for this domain.

Australia

In case of problems, please contact the hostmaster < hostmaster@au.FreeBSD.org > for this domain.

Austria

In case of problems, please contact the hostmaster < hostmaster@at.FreeBSD.org > for this domain.

Brazil

In case of problems, please contact the hostmaster < hostmaster@br.FreeBSD.org > for this domain.

Czech Republic

In case of problems, please contact the hostmaster < hostmaster@cz.FreeBSD.org > for this domain.

Denmark

In case of problems, please contact the hostmaster < staff@dotsrc.org > for this domain.

Estonia

In case of problems, please contact the hostmaster < hostmaster@ee.FreeBSD.org > for this domain.

Finland

In case of problems, please contact the hostmaster < hostmaster@fi.FreeBSD.org > for this domain.

France

In case of problems, please contact the hostmaster < hostmaster@fr.FreeBSD.org > for this domain.

Germany

In case of problems, please contact the hostmaster < de-bsd-hubs@de.FreeBSD.org > for this domain.

Greece

In case of problems, please contact the hostmaster < hostmaster@gr.FreeBSD.org > for this domain.

Hong Kong

Ireland

In case of problems, please contact the hostmaster < hostmaster@ie.FreeBSD.org > for this domain.

Japan

In case of problems, please contact the hostmaster < hostmaster@jp.FreeBSD.org > for this domain.

Korea

In case of problems, please contact the hostmaster < hostmaster@kr.FreeBSD.org > for this domain.

Latvia

In case of problems, please contact the hostmaster < hostmaster@lv.FreeBSD.org > for this domain.

Lithuania

In case of problems, please contact the hostmaster < hostmaster@lt.FreeBSD.org > for this domain.

Netherlands

In case of problems, please contact the hostmaster < hostmaster@nl.FreeBSD.org > for this domain.

New Zealand

Norway

In case of problems, please contact the hostmaster < hostmaster@no.FreeBSD.org > for this domain.

Poland

In case of problems, please contact the hostmaster < hostmaster@pl.FreeBSD.org > for this domain.

Russia

In case of problems, please contact the hostmaster < hostmaster@ru.FreeBSD.org > for this domain.

Saudi Arabia

In case of problems, please contact the hostmaster < ftpadmin@isu.net.sa > for this domain.

Slovenia

In case of problems, please contact the hostmaster < hostmaster@si.FreeBSD.org > for this domain.

South Africa

In case of problems, please contact the hostmaster < hostmaster@za.FreeBSD.org > for this domain.

Spain

In case of problems, please contact the hostmaster < hostmaster@es.FreeBSD.org > for this domain.

Sweden

In case of problems, please contact the hostmaster < hostmaster@se.FreeBSD.org > for this domain.

Switzerland

In case of problems, please contact the hostmaster < hostmaster@ch.FreeBSD.org > for this domain.

Taiwan

In case of problems, please contact the hostmaster < hostmaster@tw.FreeBSD.org > for this domain.

Ukraine

United Kingdom

In case of problems, please contact the hostmaster < hostmaster@uk.FreeBSD.org > for this domain.

United States of America

In case of problems, please contact the hostmaster < hostmaster@us.FreeBSD.org > for this domain.

A.3. 使用 Subversion

A.3.1. 簡介

自 2012 年 7 月起,FreeBSD 儲存所有 FreeBSD 的原始碼、文件與 Port 套件集均使用 Subversion 作為其唯一的版本控制系統。

Subversion 只是一套開發人員工具。一般使用者可能會較喜歡使用 freebsd-update ( FreeBSD 更新 ) 來更新 FreeBSD 基礎系統及 portsnap ( 使用 Port 套件集 ) 來更新 FreeBSD Port 套件集。

本節將示範如何在 FreeBSD 系統安裝 Subversion 以及使用它建立一個本地的 FreeBSD 檔案庫複本,也包含使用 Subversion 的其他資訊。

A.3.2. 根 SSL 憑證

安裝 security/ca_root_nss 可讓 Subversion 能夠驗証 HTTPS 檔案庫伺服器的身份。root SSL 憑証可從 Port 安裝:

# cd /usr/ports/security/ca_root_nss
# make install clean

或從套件:

# pkg install ca_root_nss

A.3.3. Svnlite

輕量化版的 Subversion svnlite 已會隨 FreeBSD 安裝。Port 或套件版的 Subversion 僅在要使用其 Python 或 Perl API 時需要,或是新想要使用最新版本 Subversion 時才需要。

與正常 Subversion 唯一的差別只是指令名稱改為 svnlite 。

A.3.4. 安裝

若無法使用 svnlite 或需要完整版本的 Subversion 就必須安裝。

Subversion 可從 Port 套件集安裝:

# cd /usr/ports/devel/subversion
# make install clean

Subversion 也可以以套件安裝:

# pkg install subversion

A.3.5. 執行 Subversion

要下載原始碼乾淨的複本到本地目錄可使用 svn 。在此目錄中的檔案稱作 本地工作複本 (Local working copy) 。

在第一次使用 checkout 前請先移動或刪除目地現有的目錄。

在現有非 svn 目錄存在的情況下做取出 (Checkout) 的動作會導致現有檔案與檔案庫中的檔案發生衝突。

Subversion 使用 URL 來指定檔案庫,使用的格式為 protocol://hostname/path 。路徑的第一個部份為要存取的 FreeBSD 檔案庫,目前有三個檔案庫, base 為 FreeBSD 基礎系統原始碼、 ports 為 Port 套件集以及 doc 為說明文件。舉例來說,URL https://svn.FreeBSD.org/ports/head/ 代表 Port 檔案庫的主要分支,使用 https 通訊協定。

使用指令從指定的檔案庫取出 (Checkout) 原始碼如下:

# svn checkout https://svn.FreeBSD.org/repository/branch lwcdir

where:

  • repository 要是下列專案檔案庫其中之一: base , ports 或 doc 。

  • branch 則依據使用的檔案庫來決定。 ports 與 doc 大部份的更新皆在 head 分支,而 base 則會將 -CURRENT 的最新版本存放在 head 下,-STABLE 分支各自最新的版本則會放在 stable/9 (9. x ) 與 stable/10 (10. x ) 下。

  • lwcdir 則是要存放指定分支內容的目標目錄,通常 ports 會置於 /usr/ports , base 會置於 /usr/src 以及 doc 會置於 /usr/doc 。

以下範例會使用 HTTPS 協定從 FreeBSD 的檔案庫取出 Port 套件集,並將本地工作複本放置於 /usr/ports 。若 /usr/ports 已存在,且不是由 svn 所建立的,記得要在取出之前重新命名或刪除。

# svn checkout https://svn.FreeBSD.org/ports/head /usr/ports

由於首次取出的動作必須下載遠端檔案庫中完整的分支,會需要花費一段時間,請耐心等候。

首次取出之後,往後要更新本地工作複本可以執行:

# svn update lwcdir

要更新上述範例所建立的 /usr/ports 可執行:

# svn update /usr/ports

因為只會傳輸有更新過的檔案,更新的動作會比取出還要快速。

另一種在取出之後更新本地工作複本的方式是透過 /usr/ports , /usr/src 以及 /usr/doc 目錄所提供的 Makefile 。設定 SVN_UPDATE 並使用 update 目標。例如要更新 /usr/src :

# cd /usr/src
# make update SVN_UPDATE=yes

A.3.6. Subversion 鏡像站

FreeBSD Subversion 的檔案庫為:

svn.FreeBSD.org

這是可公開存取的鏡像站,使用了 GeoDNS 會自動選擇適合的後端伺服器。若要由瀏覽器檢視 Subversion 檔案庫可以使用 https://svnweb.FreeBSD.org/ 。

HTTPS is the preferred protocol, but the security/ca_root_nss package will need to be installed in order to automatically validate certificates.

A.3.7. 取得更多資訊

要取得其他有關使用 Subversion 的資訊請參考 "Subversion Book",其書名為 Version Control with Subversion 或是 Subversion Documentation 。

A.4. 使用 rsync

這些站台讓 FreeBSD 可透過 rsync 通訊協定取得。rsync 工具只會傳輸兩個檔案集之間的差異,所以能夠大大的加快在網路上同步的速度,這對大多數 FreeBSD FTP 伺服器的鏡像站非常有用。rsync 在許多作業系統上也可以使用,在 FreeBSD 上請參考 net/rsync Port 或使用套件。

捷克 (Czech Republic)

rsync://ftp.cz.FreeBSD.org/

可用的檔案集:

  • ftp: FreeBSD FTP 伺服器的部份鏡像。

  • FreeBSD: FreeBSD FTP 伺服器的完整鏡像。

荷蘭 (Netherlands)

rsync://ftp.nl.FreeBSD.org/

可用的檔案集:

  • FreeBSD: FreeBSD FTP 伺服器的完整鏡像。

俄羅斯 (Russia)

rsync://ftp.mtu.ru/

可用的檔案集:

  • FreeBSD: FreeBSD FTP 伺服器的完整鏡像。

  • FreeBSD-Archive: FreeBSD 封存 FTP 伺服器的鏡像。

瑞典 (Sweden)

rsync://ftp4.se.freebsd.org/

可用的檔案集:

  • FreeBSD: FreeBSD FTP 伺服器的完整鏡像。

台灣 (Taiwan)

rsync://ftp.tw.FreeBSD.org/

rsync://ftp2.tw.FreeBSD.org/

rsync://ftp6.tw.FreeBSD.org/

可用的檔案集:

  • FreeBSD: FreeBSD FTP 伺服器的完整鏡像。

英國 (United Kingdom)

rsync://rsync.mirrorservice.org/

可用的檔案集:

  • ftp.freebsd.org: FreeBSD FTP 伺服器的完整鏡像。

美國 (USA)

rsync://ftp-master.FreeBSD.org/

此伺服器僅供 FreeBSD 主要鏡像站使用。

可用的檔案集:

  • FreeBSD: FreeBSD FTP 伺服器的主要封存。

  • acl: FreeBSD 主要 ACL 清單。

    rsync://ftp13.FreeBSD.org/

    可用的檔案集:

  • FreeBSD: FreeBSD FTP 伺服器的完整鏡像。


最後修改於 : February 18, 2025 由 Fernando Apesteguía