There exist two good videos on youtube but one is very old and handles problem which do not occur any more. The other misses some things. So i decided to bring a working solution online:
$ sudo apt install git curl build-essential libgconf2-dev
$ curl https://nixos.org/nix/install | sh
$ . $HOME/.nix-profile/etc/profile.d/nix.sh
$ sudo mkdir -p /etc/nix
$ sudo vi /etc/nix/nix.conf
binary-caches = https://cache.nixos.org https://hydra.iohk.io
binary-cache-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
Node Version installation: [https://github.com/creationix/nvm for maybe newer URL]
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
$ nvm install 8.7.0
$ mkdir -p $HOME/Coins/Cardano
$ cd $HOME/Coins/Cardano
$ git clone https://github.com/input-output-hk/cardano-sl.git
$ cd cardano-sl
$ git checkout master
$ nix-build -A connectScripts.mainnetWallet -o connect-to-mainnet
$ ./connect-to-mainnet
This start cardano and connects to mainnet. In parallel we need another terminal:
$ cd $HOME/Coins/Cardano
$ git clone https://github.com/input-output-hk/daedalus.git
$ cd daedalus
$ git checkout master
$ export CARDANO_TLS_PATH=$HOME/Coins/Cardano/daedalus/tls/
$ npm install
$ npm run build
$ npm run start
This starts the wallet and we can sync etc.
To have a good way to start both with one script -> put this in a 'start.sh' script file:
$ vi $HOME/Coins/Cardano/start.sh
#!/bin/bash
export NODE_TLS_REJECT_UNAUTHORIZED=0;
export CARDANO_HOME=$HOME/Coins/Cardano
export CARDANO_TLS_PATH=$CARDANO_HOME/daedalus/tls/
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
cd "$CARDANO_HOME/daedalus"; npm run start & DPID=$!;
sleep 3;
cd "$CARDANO_HOME/cardano-sl"; ./connect-to-mainnet & CPID=$!;
wait $DPID; pkill -P $CPID;
Don't forget to make the script executeable:
$ chmod +x $HOME/Coins/Cardano/start.sh
If you close the Daedalus wallet started from this script, cardano also gets killed automatically!