在RedHat 7安装中使用couchdb 1.6,我无法以任何非root用户身份运行它。对于普通用户,它显示
(no error lo{"init terminating in do_boot",{badarg,[{erl_prim_loader,check_file_result,3,[]},
{init,patch_dir,2,[]},{init,'-patch_path/2-lc$^0/1-0-',2,[]},{init,eval_script,8,[]},{init,do_boot,3,[]}]}}gger present) error: "Error in process <0.2.0> with exit value:
{badarg,[{erl_prim_loader,check_file_result,3,[]},{init,patch_dir,2,[]},{init,'-patch_path/2-lc$^0/1-0-',2,[]},{init,eval_script,8,[]},{init,do_boot,3,[]}]}\n"
Crash dump was written to: erl_crash.dump
init terminating in do_boot ()
将它作为couchdb用户运行时我得到了
(no error logger present) e{"init terminating in do_boot",{badarg,[{erl_prim_loader,check_file_result,3,[]},{init,patch_dir,2,[]},{init,'-patch_path/2-lc$^0/1-0-',2,[]},{init,eval_script,8,[]},{init,do_boot,3,[]}]}}
rror: "Error in process <0.2.0> with exit value: {badarg,[{erl_prim_loader,check_file_result,3,[]},{init,patch_dir,2,[]},{init,'-patch_path/2-lc$^0/1-0-',2,[]},
{init,eval_script,8,[]},{init,do_boot,3,[]}]}\n"
init terminating in do_boot ()
任何建议如何以非root用户身份运行它,我有需要自动运行并停止couchdb的脚本。它以普通用户身份运行。
couchdb与root用户运行良好。
答案 0 :(得分:1)
不确定如何在Red Hat上执行此操作,但系统特定的安装指南中记录了各种安装说明:
https://wiki.apache.org/couchdb/Installation#System_specific_installation_guides
以下是我为ubuntu所做的事情 - 创建一个用户并将其归属于couchdb文件夹:
sudo adduser --disabled-login --disabled-password --no-create-home couchdb
sudo chown -R couchdb:couchdb /usr/local/var/log/couchdb
sudo chown -R couchdb:couchdb /usr/local/var/lib/couchdb
sudo chown -R couchdb:couchdb /usr/local/var/run/couchdb
sudo ln -s /usr/local/etc/logrotate.d/couchdb /etc/logrotate.d/couchdb
sudo ln -s /usr/local/etc/init.d/couchdb /etc/init.d
sudo update-rc.d couchdb defaults