警告: 這些說明適用於安裝tor
網路守護程式,即little-t-tor.
有關安裝Tor 瀏覽器橋接中繼站的資訊,請參考洋蔥路由瀏覽器使用手冊。
Admin access: To install Tor you need root privileges.
Below all commands that need to be run as root user like apt and dpkg are prepended with '#
', while commands to be run as user with '$
' resembling the standard prompt in a terminal.
Debian / Ubuntu
千萬別使用Ubuntu官方universe套件庫裡的版本。
In the past they have not reliably been updated.
That means you could be missing stability and security fixes.
Configure Tor package repository.
Enable the Tor Project APT repository by following the instructions.
Package installation
# apt install tor
Fedora
Configure Tor Package repository
Enable the Tor Project's RPM package repository by following the instructions.
Package installation
# dnf install tor
FreeBSD
Package installation
# pkg install tor
OpenBSD
Package installation
# pkg_add tor
macOS版
Install a package manager
There are two package managers on OS X: Homebrew and Macports.
您可使用所選的套件管理器。
安裝 Homebrew 請依 brew.sh 指示。
To install Macports follow the instructions on macports.org.
Package installation
如果使用 Homebrew 請在終端視窗執行:
# brew install tor
如果使用 Macports 請在終端視窗執行:
$ sudo port install tor
Arch Linux
To install the tor
package on Arch Linux, run:
# 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
Recommended steps to setup 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
).
Installing the ca_root_nss
package:
# 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
Package installation
安裝tor
組件:
# pkg install tor
NetBSD
Setup pkg_add
目前版本的 NetBSD 作業系統可以設定為使用pkgin
,這是一款致力在像apt
或yum
一樣用於管理 pkgsrc 二進位套件的軟體。我們不會在這裡討論它的設置,而是選擇使用預設的pkg_add
。
# echo "PKG_PATH=https://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/$(uname -m)/$(uname -r)/All" > /etc/pkg_install.conf
Package installation
安裝tor
NetBSD的組件:
# pkg_add tor
Void Linux
To install the tor
package on Void Linux, please run:
# xbps-install -S tor
Installing Tor from source
Download latest release and dependencies
最新的 Tor 發行版本可以在 下載頁面找到。
如果是從源代碼建置,請先安裝 libevent並確認已有 openssl 與 zlib (包括適用的 -devel 套件)。
Install 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 來啟動它。