我目前正在尝试在Raspberry Pi上安装和运行Phabricator供个人使用(即使Phacility不推荐它,我想我还是试一试)。到目前为止,我能够将除phd用户之外的所有内容设置为守护进程。
/ etc / passwd中
phd:x:1001:1001:,,,:/home/phd:/bin/bash
的/ etc /阴影
phd:NP:17107:0:99999:7:::
我创建了用户phd,并在阴影中给了im NP,但这仍然使得Phabricator在启动守护进程时无法切换到phd。
sudo ./bin/phd restart
Interrupting process 19517...
Process 19517 exited.
Freeing active task leases...
Freed 0 task lease(s).
Starting daemons as phd
Launching daemons:
(Logs will appear in "/var/tmp/phd/log/daemons.log".)
PhabricatorRepositoryPullLocalDaemon (Static)
PhabricatorTriggerDaemon (Static)
PhabricatorTaskmasterDaemon (Autoscaling: group=task, pool=4, reserve=0)
Usage Exception: Daemons are configured to run as user "phd" in
configuration option `phd.user`, but the current user is "root" and
`phd` was unable to switch to the correct user with `sudo`. Command output:
Command failed with error #255!
COMMAND
exec sudo -En -u 'phd' -- ./phd-daemon '--verbose'
STDOUT
(empty)
STDERR
[2016-11-04 08:54:54] EXCEPTION: (Exception) Specified daemon PID directory
('/var/tmp/phd/pid') does not exist or is not writable by the daemon user!
at [<phutil>/src/daemon/PhutilDaemonOverseer.php:115]
arcanist(head=master, ref.master=fad85844314b), phabricator(head=master,
ref.master=6982bded7124), phutil(head=master, ref.master=2b7b1007bf87)
#0 PhutilDaemonOverseer::__construct(array) called at
[<phabricator>/scripts/daemon/launch_daemon.php:13]
我尝试的是通过su phd -c "/home/phd/phabricator/bin/phd restart"
启动博士用户,但查询了我的密码。
我一直关注本指南https://secure.phabricator.com/book/phabricator/article/diffusion_hosting/以及此https://gist.github.com/sparrc/b4eff48a3e7af8411fc1
真的非常感谢任何帮助!
答案 0 :(得分:1)
感谢@JSON让我意识到我显然总是错过的一条线,解决方案是:
sudo chmod go+w /var/tmp/phd/pid
这将使directoy可写并且对所有人都是免费的,让我开始错误
答案 1 :(得分:0)
我们经常跑
sudo -u phd ./bin/phd restart