2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Ubuntu 22.04 に symbol-shoestring 0.2.1 をインストール

Last updated at Posted at 2025-04-09

symbol-shoestring 0.2.1 がリリースされました。

お試しで symbol-shoestring をインストールし、symbolノードをテストネットに同期させてみました。

参考資料(daiさんに感謝)

Windows 内に Ubuntu 22.04 を準備

インストール
> wsl.exe --install Ubuntu-22.04
⇒アカウントとパスワードを適宜
起動
> wsl.exe -d Ubuntu-22.04

OSバージョン確認

$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.5 LTS"

Dockerをインストール

$ sudo apt update
$ sudo apt install -y ca-certificates curl gnupg lsb-release jq
$ sudo mkdir -p /etc/apt/keyrings
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \
  sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
$ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
  https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
$ sudo apt update
$ sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin \
  docker-compose-plugin
$ docker version
 Version:           28.0.4
$ docker compose version
Docker Compose version v2.34.0

$ cat /etc/group | grep docker
$ sudo usermod -aG docker <権限を追加したいアカウント>
$ cat /etc/group | grep docker

pyenv と python 3.9 をインストール

未インストールを確認
$ python --version

ライブラリをインストール
$ sudo apt install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev \
  libnss3-dev libssl-dev libreadline-dev libffi-dev curl libbz2-dev libsqlite3-dev \
  liblzma-dev tk-dev

pyenv をインストール
$ git clone https://github.com/pyenv/pyenv.git ~/.pyenv
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
$ echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
$ echo 'eval "$(pyenv init -)"' >> ~/.bashrc
$ source ~/.bashrc
$ pyenv --version
pyenv 2.5.4-3-g67f474d3

python 3.9系の最新版をインストール
$ pyenv install -list
$ pyenv install 3.9.21
$ pyenv global 3.9.21
$ python --version
Python 3.9.21

symbol-shoestring をインストール

$ pip install symbol-shoestring

pemファイルの作成

$ mkdir symbol-shoestring
$ cd symbol-shoestring
$ openssl genpkey -algorithm ed25519 -out ca.key.pem
$ ls
ca.key.pem
※ca.key.pemはインストールし終わって不要になったら消したほうが安全

shoestringウィザードの起動(※ウィザードの中身は割愛します)

$ python -m shoestring.wizard
ノードの起動
$ docker compose up -d
動作確認
$ curl http://127.0.0.1:3000/node/info | jq
ノードの停止
$ docker compose down

同期させてしばらくするとノード一覧に表示されます

余談

セットアップウィザードでミスったらしく委任者(ハーベスター)を自動で受け入れない設定になってしまったので、修正しノードを再起動した。

$ cd ~/symbol-shoestring
$ vi userconfig/resources/config-user.properties
----
-enableDelegatedHarvestersAutoDetection = false   # 自動で委任者を受け入れない
+enableDelegatedHarvestersAutoDetection = true    # 自動で委任者を受け入れる
----
$ docker compose stop
$ docker compose up -d
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?