From 60bcfd7a69eaa98a0002783cea7192e39c29a96a Mon Sep 17 00:00:00 2001 From: DarianShawn <103929061+DarianShawn@users.noreply.github.com> Date: Tue, 24 Oct 2023 15:07:33 +0800 Subject: [PATCH] Fix full node script (#41) Running service failed due to not exists dir. --- docs/get-started/full-node-deployment.md | 69 ++++++++++++------------ 1 file changed, 33 insertions(+), 36 deletions(-) diff --git a/docs/get-started/full-node-deployment.md b/docs/get-started/full-node-deployment.md index 0c2e2f1..7c75a9c 100644 --- a/docs/get-started/full-node-deployment.md +++ b/docs/get-started/full-node-deployment.md @@ -36,39 +36,38 @@ Full node deployment of the Dogechain blockchain. * wget: ```shell -$ DOGECHAIN_VERSION=$(wget -qO- https://api.github.com/repos/dogechain-lab/dbsc/releases/latest | grep tag_name | cut -d '"' -f 4 | cut -d 'v' -f 2) -$ wget -c https://github.com/dogechain-lab/dbsc/releases/download/v${DOGECHAIN_VERSION}/dogechain_${DOGECHAIN_VERSION}_linux_amd64.tar.gz +DOGECHAIN_VERSION=$(wget -qO- https://api.github.com/repos/dogechain-lab/dbsc/releases/latest | grep tag_name | cut -d '"' -f 4 | cut -d 'v' -f 2) +# You should check the binary architecture to meet your platform. +wget -c https://github.com/dogechain-lab/dbsc/releases/download/v${DOGECHAIN_VERSION}/geth_linux ``` * curl: ```shell -$ DOGECHAIN_VERSION=$(curl -s https://api.github.com/repos/dogechain-lab/dbsc/releases/latest | grep tag_name | cut -d '"' -f 4 | cut -d 'v' -f 2) -$ curl -OL https://github.com/dogechain-lab/dbsc/releases/download/v${DOGECHAIN_VERSION}/dogechain_${DOGECHAIN_VERSION}_linux_amd64.tar.gz +DOGECHAIN_VERSION=$(curl -s https://api.github.com/repos/dogechain-lab/dbsc/releases/latest | grep tag_name | cut -d '"' -f 4 | cut -d 'v' -f 2) +# You should check the binary architecture to meet your platform. +curl -OL https://github.com/dogechain-lab/dbsc/releases/download/v${DOGECHAIN_VERSION}/geth_linux ``` ## copy binary to /usr/local/bin ```shell -$ tar -xvf dogechain_${DOGECHAIN_VERSION}_linux_amd64.tar.gz -$ cp dogechain /usr/local/bin/dogechain -$ chmod +x /usr/local/bin/dogechain +cp geth_linux /usr/local/bin/geth +chmod +x /usr/local/bin/geth ``` ## Create system user ```shell -$ useradd -m -s /usr/sbin/nologin -d /var/lib/dogechain dogechain +useradd -m -s /usr/sbin/nologin -d /var/lib/dogechain dogechain ``` ## Create Data Directory ```shell -$ mkdir -p /data/dbsc -$ mkdir -p /etc/dbsc +mkdir -p /data/dbsc # set permission -$ chown -R dogechain:dogechain /data/dbsc -$ chown -R dogechain:dogechain /etc/dbsc +chown -R dogechain:dogechain /data/dbsc ``` ## Copy genesis.json to etc directory @@ -279,12 +278,12 @@ The bootnodes are hosted by the official network, and not yet set within the cod Remember `daemon-reload` your system config and re-run your dbsc client, if you change the bootnodes or other configuration. ```shell -$ tee /etc/systemd/system/dbsc.service < You need to append set `--nat` flag of `ExecStart` command if you’re in NAT network or gateway. @@ -336,19 +333,19 @@ ExecStart= ...... ### Start service ```shell -$ systemctl daemon-reload -$ systemctl enable dbsc -$ systemctl start dbsc +systemctl daemon-reload +systemctl enable dbsc +systemctl start dbsc ``` ### Check service status ```shell -$ systemctl status dbsc +systemctl status dbsc ``` ### Check service logs ```shell -$ journalctl -u dbsc +journalctl -u dbsc ```