THIS GUIDE IS FOR EDUCATIONAL PURPOSE ONLY. IT COMES WITH NO WARRANTY AND SHOULD BE USED AT YOUR OWN RISKS. MAKE THE APPROPRIATE BACKUPS!!! THIS GUIDE ASSUME YOU FOLLOWED https://www.coincashew.com/coins/overview-ada/guide-how-to-build-a-haskell-stakepool-node
Written by QCPOL (https://qcpol.stakepool.quebec)
sudo apt update -y
sudo apt upgrade -y
sudo apt autoremove -y
cd $HOME/git
git clone https://github.com/IntersectMBO/cardano-node.git cardano-node-9.1.0
cd cardano-node-9.1.0
git fetch --all --recurse-submodules --tags
git checkout tags/9.1.0
echo -e "package cardano-crypto-praos\n flags: -external-libsodium-vrf" > cabal.project.local
echo "with-compiler: ghc-8.10.7" >> cabal.project.local
rm -rf $HOME/git/cardano-node-9.1.0/dist-newstyle/build/x86_64-linux/ghc-8.10.7
cabal update
cabal build cardano-node cardano-submit-api
cd $HOME/git
git clone https://github.com/IntersectMBO/cardano-cli.git cardano-cli-9.2.1.0
cd cardano-cli-9.2.1.0
git fetch --all --recurse-submodules --tags
git checkout tags/cardano-cli-9.2.1.0
echo -e "package cardano-crypto-praos\n flags: -external-libsodium-vrf" > cabal.project.local
echo "with-compiler: ghc-8.10.7" >> cabal.project.local
rm -rf $HOME/git/cardano-cli-9.2.1.0/dist-newstyle/build/x86_64-linux/ghc-8.10.7
cabal update
cabal build cardano-cli
sudo systemctl stop cardano-node
sudo systemctl stop cardano-submit-api
sudo cp $(find $HOME/git/cardano-cli-9.2.1.0/dist-newstyle/build -type f -name "cardano-cli") /usr/local/bin/cardano-cli
sudo cp $(find $HOME/git/cardano-node-9.1.0/dist-newstyle/build -type f -name "cardano-node") /usr/local/bin/cardano-node
sudo cp $(find $HOME/git/cardano-node-9.1.0/dist-newstyle/build -type f -name "cardano-submit-api") /usr/local/bin/cardano-submit-api
cd $HOME/cardano-my-node
rm ${NODE_CONFIG}-conway-genesis.json
wget https://book.play.dev.cardano.org/environments/$NODE_CONFIG/conway-genesis.json
mv conway-genesis.json ${NODE_CONFIG}-conway-genesis.json
jq --arg NODECONFIG "$NODE_CONFIG" '. += {ConwayGenesisFile: "\($NODECONFIG)-conway-genesis.json", ConwayGenesisHash: "9cc5084f02e27210eacba47af0872e3dba8946ad9460b6072d793e1d2f3987ef"}' ${NODE_CONFIG}-config.json > tmp && mv tmp ${NODE_CONFIG}-config.json
jq --arg NODECONFIG "$NODE_CONFIG" '. += {ConwayGenesisFile: "\($NODECONFIG)-conway-genesis.json", ConwayGenesisHash: "0eb6adaec3fcb1fe286c1b4ae0da2a117eafc3add51e17577d36dd39eddfc3db"}' ${NODE_CONFIG}-config.json > tmp && mv tmp ${NODE_CONFIG}-config.json
jq --arg NODECONFIG "$NODE_CONFIG" '. += {ConwayGenesisFile: "\($NODECONFIG)-conway-genesis.json", ConwayGenesisHash: "15a199f895e461ec0ffc6dd4e4028af28a492ab4e806d39cb674c88f7643ef62"}' ${NODE_CONFIG}-config.json > tmp && mv tmp ${NODE_CONFIG}-config.json
sudo systemctl start cardano-node
sudo systemctl start cardano-submit-api