Cardano Node Installation process
After we have done all the prerequisites we are finally ready to do the installation process of Cardano Node!
Let's start by downloading the Cardano Node source code from git (GitHub)
1
mkdir -p ~/git && cd ~/git
2
git clone https://github.com/input-output-hk/cardano-node.git
Copied!
git clone in action
You should have now a new folder - cardano-node with the source code of the cardano node, let's go to that directory and choose which version we would like to install (compile)
1
cd cardano-node
2
git fetch --all --recurse-submodules --tags
3
git checkout tags/1.30.1
Copied!
Let's force the installation process to use the GHC version that we just installed.
1
cabal configure --with-compiler=ghc-8.10.4
Copied!
let's add the libsodium libraries to Cardano node project:
1
echo "package cardano-crypto-praos" >> cabal.project.local
2
echo " flags: -external-libsodium-vrf" >> cabal.project.local
Copied!
Now we are ready to start the installation (compilation) process. This will take a while... if you are installing this on the VPS server, then you can go and grab coffee/beer/wine/water... as it will take a while.
1
cabal build all
Copied!
as the last step in our installation process is to copy newly compiled bin (executive) files to an early created folder: .local/bin
if you had a previous version of Cardano node running, then before you copy the new binary files, make sure that you have stopped your current Cardano-node processes, otherwise, you will not be able to overwrite the new file.
1
mkdir -p ~/.local/bin/
2
cp -p ~/git/cardano-node/dist-newstyle/build/x86_64-linux/ghc-8.10.4/cardano-cli-1.30.1/x/cardano-cli/build/cardano-cli/cardano-cli ~/.local/bin/
3
cp -p ~/git/cardano-node/dist-newstyle/build/x86_64-linux/ghc-8.10.4/cardano-node-1.30.1/x/cardano-node/build/cardano-node/cardano-node ~/.local/bin/
4
echo PATH="$PATH:$HOME/.local/bin/" >> $HOME/.bashrc
5
source ~/.bashrc
Copied!
Let's check if we have installed the binary files in the correct location and the latest version
1
which cardano-node && which cardano-cli
2
cardano-node --version
3
cardano-cli --version
4
Copied!
you should see something like this:
Great! We have installed the Cardano node on our server!
Congratulations on installing Cardano Node!
Last modified 22d ago
Copy link