[英]Run bitcore-node as a service in the background in Ubuntu 16.04
I successfully installed bitcore and able to run with the bitcore-node start. 我已经成功安装了bitcore,并且能够与bitcore-node start一起运行。 But I want to run it as service in the background.
但是我想在后台将其作为服务运行。
Installation Step of Bitcore-node.
Bitcore节点的安装步骤。
curl -sL https://deb.nodesource.com/setup_4.x | sudo bash -
sudo apt-get install nodejs
sudo apt-get install python
sudo apt-get install libzmq3-dev build-essential
npm install -g bitcore-node (https://github.com/bitpay/bitcore-node)
On Running bitcore-node start
its working perfectly 在运行
bitcore-node start
正常运行
I created a service in the
/etc/systemd/system
我在
/etc/systemd/system
创建了一个服务
[Unit]
Description=bitcored.service
After=network.target
[Service]
Type=simple
User=ubuntu
Environment="PATH=$PATH:/home/ubuntu/usr/bin"
ExecStart=/root/bin/node /usr/lib/node_modules/bitcore-node/bin/bitcore-node
ExecReload=/bin/kill -2 $MAINPID
KillMode=process
Restart=on-failure
[Install]
WantedBy=multi-user.target
On Executing the command
sudo service bitcore status
, I am getting following Error.在执行命令
sudo service bitcore status
时,出现以下错误。
Any help would be appreciated. 任何帮助,将不胜感激。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.