GitBook: [master] one page modified

This commit is contained in:
Daniel Farina 2018-07-12 02:44:08 +00:00 committed by gitbook-bot
parent d9ada04e8f
commit 3da47d0bf8
No known key found for this signature in database
GPG Key ID: 07D2180C7B12D0FF
1 changed files with 61 additions and 4 deletions

View File

@ -8,6 +8,29 @@ Short guide to run bitcore-node as a service. This guide will get updated once w
1. Copy your service file into the /etc/systemd/system folder.
{% tabs %}
{% tab title="Digital Ocean" %}
```text
[Unit]
Description=Bitcore-node
After=network.target
[Service]
ExecStart=/home/ubuntu/btcp-explorer/start-service.sh
WorkingDirectory=/home/ubuntu/btcp-explorer/
[Install]
WantedBy=multi-user.target
#/root/btcp-explorer/node_modules/bitcore-node-btcp/bin/bitcore-node start
```
{% endtab %}
{% tab title="AWS" %}
```text
[Unit]
Description=Bitcore-node
@ -22,13 +45,30 @@ WantedBy=multi-user.target
#/home/ubuntu/btcp-explorer/node_modules/bitcore-node-btcp/bin/bitcore-node start
```
{% endtab %}
{% endtabs %}
1. a Create a new start-service.sh in the /home/ubuntu/btcp-explorer/ folder
{% tabs %}
{% tab title="Digital Ocean" %}
```text
#!/bin/bash
sudo /usr/local/bin/node /root/btcp-explorer/node_modules/bitcore-node-btcp/bin/bitcore-node start
```
{% endtab %}
{% tab title="AWS" %}
```text
#!/bin/bash
sudo /usr/local/bin/node /home/ubuntu/btcp-explorer/node_modules/bitcore-node-btcp/bin/bitcore-node start
```
{% endtab %}
{% endtabs %}
1. b Give start-service.sh executable permissions.
@ -38,10 +78,27 @@ sudo /usr/local/bin/node /home/ubuntu/btcp-explorer/node_modules/bitcore-node-bt
2. Create system link for the .zcash-params & btcp-exploer folder the ubuntu directory to the /root directory as the script is currently outdated and looks for them in the incorrect directory
```text
sudo ln -s /home/ubuntu/.zcash-params/ /root/.zcash-params/
sudo ln -s /home/ubuntu/btcp-explorer /root/btcp-explorer
```
{% tabs %}
{% tab title="Digital Ocean" %}
```text
sudo ln -s /root/.zcash-params/ /root/.zcash-params/
sudo ln -s /root/btcp-explorer /root/btcp-explorer
```
{% endtab %}
{% tab title="AWS" %}
```text
sudo ln -s /home/ubuntu/.zcash-params/ /root/.zcash-params/
sudo ln -s /home/ubuntu/btcp-explorer /root/btcp-explorer
```
{% endtab %}
{% endtabs %}
Done. You can now use the following commands: