- Setup Locally
- Initializing a Node
Download the latest version of the sonr node's binary
Download latest sonrd
binary
To install the latest version of your blockchain node’s binary, execute the following command on your machine:
curl https://get.ignite.com/sonr-io/sonr@latest! | sudo bash
Learn more about the install process.
Write permission
Sonr CLI installation requires write permission to the /usr/local/bin/
directory. If the installation fails because you do not have write permission to /usr/local/bin/
, run the following command:
curl https://get.ignite.com/sonr-io/sonr@latest! | bash
Then run this command to move the sonr executable to /usr/local/bin/
:
sudo mv sonrd `/usr/local/bin/`
On some machines, a permissions error occurs:
mv: rename ./ignite to /usr/local/bin/ignite: Permission denied
============
Error: mv failed
In this case, use sudo before curl and before bash:
sudo curl https://get.ignite.com/sonr-io/sonr@latest/cli! | sudo bash
Upgrading your Sonr CLI installation
Before you install a new version of Ignite CLI, remove all existing Sonr CLI installations.
To remove the current Sonr CLI installation:
- On your terminal window, press Ctrl+C to stop the chain that you started with
ignite chain serve
. - Remove the Sonr CLI binary with
rm $(which sonrd)
. Depending on your user permissions, run the command with or without sudo. - Repeat this step until all sonr installations are removed from your system.
After all existing Sonr CLI installations are removed, follow the [Installing Sonr CLI] instructions.
Summary
- Verify the prerequisites.
- To setup a local development environment, install Sonr CLI locally on your computer.
- Install Sonr CLI by fetching the binary using cURL or by building from source.
- The latest version is installed by default. You can install previous versions of the precompiled sonrd binary.
- Stop the chain and remove existing versions before installing a new version.