警告: 這些說明適用於安裝tor
網路守護程式,即little-t-tor.
有關安裝Tor 瀏覽器橋接中繼站的資訊,請參考洋蔥路由瀏覽器使用手冊。
需要管理員權限: 要安裝 Tor,您需要 root 權限
下面所有需要有 root 權限執行的指令(如 apt 和 dpkg)帶有#
前綴,而以用戶身份運行的指令則帶有$
,類似於終端機標準提示符。
Debian / Ubuntu
千萬別使用Ubuntu官方universe套件庫裡的版本。
過去它們並未得到可靠的更新。
這意味著該版本可能會缺乏穩定性以及安全性修補。
Configure Tor package repository.
Enable the Tor Project APT repository by following the instructions.
套件安裝
# apt install tor
Fedora
Configure Tor Package repository
Enable the Tor Project's RPM package repository by following the instructions.
套件安裝
# dnf install tor
FreeBSD
套件安裝
# pkg install tor
OpenBSD
套件安裝
# pkg_add tor
macOS版
安裝一個套件管理器
OS X 有兩種套件管理器: Homebrew 與 Macports。
您可以使用您選擇的套件管理器。
安裝 Homebrew 請依 brew.sh 指示。
To install Macports follow the instructions on macports.org.
套件安裝
如果使用 Homebrew 請在終端視窗執行:
# brew install tor
如果使用 Macports 請在終端視窗執行:
$ sudo port install tor
Arch Linux
要在 Arch Linux 上安裝 tor
套件,請執行:
# pacman -Syu tor
DragonFlyBSD
Bootstrap pkg
DragonFlyBSD's daily snapshots and releases (starting with 3.4) come with pkg
already installed. Upgrades from earlier releases, however, will not have it. If pkg
is missing on the system for any reason, it can be quickly bootstrapped without having to build it from source or even having DPorts installed:
# cd /usr
# make pkg-bootstrap
# rehash
# pkg-static install -y pkg
# rehash
設定 pkg
的推薦步驟
Here, it will be similar to what we have on a FreeBSD system, and we are going to use HTTPS to fetch our packages, and updates - so here we also need an extra package to help us out (ca_root_nss
).
正在安裝ca_root_nss
組件:
# pkg install ca_root_nss
For fresh installations, the file /usr/local/etc/pkg/repos/df-latest.conf.sample
is copied to /usr/local/etc/pkg/repos/df-latest
. The files ending in the ".sample" extension are ignored; pkg(8) only reads files that end in ".conf" and it will read as many as it finds.
DragonflyBSD 有兩個套件儲存庫:
- Avalon (mirror-master.dragonflybsd.org);
- Wolfpond (pkg.wolfpond.org).
We can simply edit the URL used to point out the repositories on /usr/local/etc/pkg/repos/df-latest
and that's it! Remember to use pkg+https:// for Avalon.
在確認這些所有的變更後,我們再次更新軟體包列表,並嘗試檢查是否已經有新的更新要套用:
# pkg update -f
# pkg upgrade -y -f
套件安裝
安裝tor
組件:
# pkg install tor
NetBSD
設定pkg_add
目前版本的 NetBSD 作業系統可以設定為使用pkgin
,這是一款致力在像apt
或yum
一樣用於管理 pkgsrc 二進位套件的軟體。我們不會在這裡討論它的設置,而是選擇使用預設的pkg_add
。
# echo "PKG_PATH=http://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/$(uname -m)/$(uname -r)/All" > /etc/pkg_install.conf
套件安裝
安裝tor
NetBSD的組件:
# pkg_add tor
Void Linux
To install the tor
package on Void Linux, please run:
# xbps-install -S tor
正在從原始碼安裝Tor
Download latest release and dependencies
最新的 Tor 發行版本可以在 下載頁面找到。
如果是從原始碼建置,請先安裝 libevent並確認已有 openssl 與 zlib (包括適用的 -devel 套件)。
安裝 tor
tar -xzf tor-<version>.tar.gz; cd tor-<version>
Replace <version>
with the latest version of tor
, for example, tor-0.4.8.12
./configure && make
現在你可以執行tor作為 src/app/tor
(0.4.3.x 或更新),或者你也可以執行make install
(如有必要,請用 root 身分) 來將其安裝在 /usr/local/
,然後你就可以透過執行 tor 來啟動它。