3. Cài đặt node với CNTOOLS

mkdir "$HOME/tmp";cd "$HOME/tmp"
# Install curl
# CentOS / RedHat - sudo dnf -y install curl
# Ubuntu / Debian - sudo apt -y install curl
curl -sS -o guild-deploy.sh https://raw.githubusercontent.com/cardano-community/guild-operators/master/scripts/cnode-helper-scripts/guild-deploy.sh
chmod 755 guild-deploy.sh

  Usage: guild-deploy.sh [-n <mainnet|preprod|guild|preview>] [-p path] [-t <name>] [-b <branch>] [-u] [-s [p][b][l][f][d][c][o][w][x]]
  Set up dependencies for building/using common tools across cardano ecosystem.
  The script will always update dynamic content from existing scripts retaining existing user variables

  -n    Connect to specified network instead of mainnet network (Default: connect to cardano mainnet network) eg: -n guild
  -p    Parent folder path underneath which the top-level folder will be created (Default: /opt/cardano)
  -t    Alternate name for top level folder - only alpha-numeric chars allowed (Default: cnode)
  -b    Use alternate branch of scripts to download - only recommended for testing/development (Default: master)
  -u    Skip update check for script itself
  -s    Selective Install, only deploy specific components as below:
    p   Install common pre-requisite OS-level Dependencies for most tools on this repo (Default: skip)
    b   Install OS level dependencies for tools required while building cardano-node/cardano-db-sync components (Default: skip)
    l   Build and Install libsodium fork from IO repositories (Default: skip)
    f   Force overwrite entire content of scripts and config files (backups of existing ones will be created) (Default: skip)
    d   Download latest (released) binaries for bech32, cardano-address, cardano-node, cardano-cli, cardano-db-sync and cardano-submit-api binaries (Default: skip)
    c   Install/Upgrade CNCLI binary (Default: skip) 
    o   Install/Upgrade Ogmios Server binary (Default: skip)
    w   Install/Upgrade Cardano Hardware CLI (Default: skip)
    x   Install/Upgrade Cardano Signer binary (Default: skip)
  ./guild-deploy.sh -b master -n mainnet -t cnode -s pdlcowx
  . "${HOME}/.bashrc"
/opt/cardano/cnode            # Top-Level Folder
├── ...
├── files                     # Config, genesis and topology files
│   ├── ...
│   ├── byron-genesis.json    # Byron Genesis file referenced in config.json
│   ├── shelley-genesis.json  # Genesis file referenced in config.json
│   ├── alonzo-genesis.json    # Alonzo Genesis file referenced in config.json
│   ├── config.json           # Config file used by cardano-node
│   └── topology.json         # Map of chain for cardano-node to boot from
├── db                        # DB Store for cardano-node
├── guild-db                  # DB Store for guild-specific tools and additions (eg: cncli, cardano-db-sync's schema)
├── logs                      # Logs for cardano-node
├── priv                      # Folder to store your keys (permission: 600)
├── scripts                   # Scripts to start and interact with cardano-node
└── sockets                   # Socket files created by cardano-node
  cd ~/git
  git clone https://github.com/input-output-hk/cardano-node
  cd cardano-node
  git fetch --tags --all
  git pull
  # Replace tag against checkout if you do not want to build the latest released version
  git checkout $(curl -s https://api.github.com/repos/input-output-hk/cardano-node/releases/latest | jq -r .tag_name)
  #git checkout x (x là phiên bản cardano node nếu muốn chạy bản khác VD: 8.9.2)
  # Use `-l` argument if you'd like to use system libsodium instead of IOG fork of libsodium while compiling
  $CNODE_HOME/scripts/cabal-build-all.sh

Kiểm tra cardano-cli và cardano-node xem quá trình xây dựng đã thành công chưa:

cd $CNODE_HOME/scripts
./cnode.sh -d
# chạy node
sudo systemctl start cnode.service
# kiểm tra trạng thái node
sudo systemctl status cnode.service
# theo dõi node với gLiveView
cd $CNODE_HOME/scripts
./gLiveView.sh

Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *

Nội dung