GitBook: [master] 4 pages modified

This commit is contained in:
Daniel Farina 2018-07-11 08:09:05 +00:00 committed by gitbook-bot
parent 2e82305635
commit 5beacdce14
No known key found for this signature in database
GPG Key ID: 07D2180C7B12D0FF
4 changed files with 91 additions and 3 deletions

View File

@ -10,5 +10,7 @@
* [Getting Started](self-hosted-guide/getting-started.md)
* [Digital Ocean Server Setup](self-hosted-guide/digital-ocean-server-setup.md)
* [Connecting to your Server](self-hosted-guide/connecting-to-your-server.md)
* [Bitcore Installation](self-hosted-guide/bitcore-installation.md)
* [BTCP Store Server Installation](self-hosted-guide/bitcore-installation.md)
* [Starting the Server](self-hosted-guide/testing-the-new-installation.md)
* [Run service with systemctl](self-hosted-guide/run-service-with-systemctl.md)

View File

@ -1,8 +1,8 @@
---
description: 'Javascript full-node,bitcore & btcpd daemon.'
description: 'Javascript full-node, bitcore & btcpd daemon.'
---
# Bitcore Installation
# BTCP Store Server Installation
## Clone the BTCP Bitcore installer
@ -23,3 +23,5 @@ The installer will install everything you need to run the store demo application
![](../.gitbook/assets/setup.gif)
Once everything is finished you should be ready to do a few tests to make sure everything is running properly.

View File

@ -0,0 +1,65 @@
# Run service with systemctl
Short guide to run bitcore-node as a service. This guide will get updated once we have the service running with PM2.
#### Create bitcore-node service with systemctl
1. Copy your service file into the /etc/systemd/system folder.
```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
#/home/ubuntu/btcp-explorer/node_modules/bitcore-node-btcp/bin/bitcore-node start
```
1. a Create a new start-service.sh in the /home/ubuntu/btcp-explorer/ folder
```text
#!/bin/bash
sudo /usr/local/bin/node /home/ubuntu/btcp-explorer/node_modules/bitcore-node-btcp/bin/bitcore-node start
```
1. b Give start-service.sh executable permissions.
```text
chmod +x start-service.sh
```
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
```
Done. You can now use the following commands:
**Start the service**
```text
sudo systemctl start bitcore-node
```
**Stop Service**
```text
sudo systemctl stop bitcore-node
```
**See the console log**
```text
journalctl -u bitcore-node
```

View File

@ -0,0 +1,19 @@
# Starting the Server
Once your server is installed you are ready to run it. In this example we will run it from bash. In the next chapters we will show you how to run the server behind a service manager such as PM2.
## Start Server
```text
cd ~/btcp-explorer
./bitcore-node start
```
{% hint style="info" %}
In digital ocean you might need to create a system link for node
ln -s /usr/bin/nodejs /usr/bin/node
{% endhint %}