sudo apt update && sudo apt upgrade -y
sudo apt install curl tar wget clang pkg-config protobuf-compiler libssl-dev jq build-essential protobuf-compiler bsdmainutils git make ncdu gcc git jq chrony liblz4-tool -y
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
rustup default stable
rustup update
rustup update nightly
rustup target add wasm32-unknown-unknown --toolchain nightly
Download dan membangun binaries
git clone https://github.com/availproject/avail-light.git
cd avail-light
wget -O config.yaml https://raw.githubusercontent.com/meowment/testnet_tutorial/main/avail/config.yaml
git checkout v1.7.2
cargo build --release
sudo cp $HOME/avail-light/target/release/avail-light /usr/local/bin
Membuat Service Light Avail
nano /etc/systemd/system/availightd.service
[Unit]
Description=Avail Light Client
After=network-online.target
[Service]
User=$USER
ExecStart=$(which avail-light) --config $HOME/avail-light/config.yaml --network biryani
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
Jalankan Service Light Avail
sudo systemctl daemon-reload
sudo systemctl enable availightd
sudo systemctl restart availightd
systemctl status availightd.service
journalctl -f -u availightd.service
curl "http://localhost:7000/v1/latest_block"
curl "localhost:7000/v1/status"
curl -I "localhost:7000/health"