我刚刚通过 apt 安装了 tor,看起来服务运行正常:
$ sudo service tor status
● tor.service - Anonymizing overlay network for TCP (multi-instance-master)
Loaded: loaded (/lib/systemd/system/tor.service; enabled; vendor preset: enabled)
Active: active (exited) since Wed 2018-06-13 19:04:12 UTC; 12min ago
Process: 8050 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 8050 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/tor.service
Jun 13 19:04:11 NanoPi-NEO systemd[1]: Starting Anonymizing overlay network for TCP (multi-instance-master)...
Jun 13 19:04:12 NanoPi-NEO systemd[1]: Started Anonymizing overlay network for TCP (multi-instance-master).
但在运行过程中我看不到它:
$ ps -aux | grep /usr/bin/tor
michail 10962 0.0 0.1 4140 536 pts/0 S+ 19:16 0:00 grep --color=auto /usr/bin/tor
另一方面,我的伙伴在他的计算机上做了同样的事情,并且服务似乎也可以运行:
$ sudo service tor status
● tor.service - Anonymizing overlay network for TCP (multi-instance-master)
Loaded: loaded (/lib/systemd/system/tor.service; enabled; vendor preset: enabled)
Active: active (exited) since Thu 2016-02-11 17:28:03 CET; 2 years 4 months ago
Main PID: 676 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/tor.service
Feb 11 17:28:03 odroid64 systemd[1]: Starting Anonymizing overlay network for TCP (multi-instance-master)...
Feb 11 17:28:03 odroid64 systemd[1]: Started Anonymizing overlay network for TCP (multi-instance-master).
而且他也可以看到它正在运行 ps:
$ ps -aux | grep /usr/bin/tor
debian-+ 988 0.1 2.0 42804 35752 ? Ss 18:32 0:16 /usr/bin/tor --defaults-torrc /usr/share/tor/tor-service-defaults-torrc -f /etc/tor/torrc --RunAsDaemon 0
szklarz 10098 0.0 0.0 6772 900 pts/8 S+ 21:16 0:00 grep --color=auto /usr/bin/tor
最后,我的 occ 上的 tor 服务并没有真正运行,直到我输入命令启动它:
$sudo tor
我猜想这是由某些权限问题引起的,但哪一个呢?你能帮忙吗?
$ ps -A | grep tor
67 ? 00:00:00 file-storage
484 ? 00:00:00 rpimonitord
492 ? 00:00:00 rpimonitord
493 ? 00:00:00 rpimonitord
1637 ? 00:00:00 (tor)
$ sudo netstat -anutp | grep tor
michail@NanoPi-NEO:~$
答案1
这项工作 100%:
sudo apt install -y tor
sudo apt install -y apparmor-utils
sudo aa-complain system_tor
sudo service tor@default restart
sudo service tor@default status