Build zcash (ZEC) wallet on Ubuntu

Build everything:

sudo apt-get install build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev unzip git python zlib1g-dev wget bsdmainutils automake
mkdir ~/source
cd ~/source
git clone https://github.com/zcash/zcash.git
cd ~/source/zcash/zcutil
./build.sh
./fetch-params.sh
sudo make install

Run wallet and then stop it:

/usr/local/bin/zcashd -daemon
/usr/local/bin/zcash-cli stop

You will now see a folder ~/.zcash
Create zcash.conf in this folder that looks like this:

rpcuser=YourUserName
rpcpassword=YourPassword
gen=1

Now start the server again:

cd ~/source/zcash/src
./zcashd -daemon

The gen=1 turns on mining automatically.

Use the cli (command line interface) to getinfo:

./zcash-cli getinfo

ZEC update (when you need to upgrade)

cd ~/source/zcash
git pull
cd ~/source/zcash/zcutil
./build.sh
./fetch-params.sh

If you want to use the ZCash latest stable version:
https://github.com/zcash/zcash/releases/

This is currently: v2.0.2

I upgraded to ZCash v2.0.2

cd ~/source
mv zcash zcash_old
git clone https://github.com/zcash/zcash.git --branch v2.0.2
cd ~/source/zcash/zcutil
./build.sh
./fetch-params.sh
cd ~/source/zcash
sudo make install