Created
October 28, 2016 06:29
-
-
Save dukejones/2e4110facd24724fdca788ec3d0ae0d8 to your computer and use it in GitHub Desktop.
user data for installing original zcash client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
apt-get update | |
apt-get upgrade -y | |
# SSH Key Auth | |
USERNAME=dorje | |
SSHKEY="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDHcfdQt2xu0iaa4/rzmyBsCiYqo/T2MHMBp5eJLJrrlwqSz/PqfxsxwRxYKn/wq21waaki7PRUgvxUFiphgo1rRUCNCDl4/X9VgMJeyrGwReqJXYexY7KERLaBhjCPnKwO3278cGibwyNmI7+sUN5fuiiesOrVijqIqarPEY5K3JOs7bcJ1ljRbk7rJ6uCF8GxpEcga/lM5Gb3x6HhvwlWK9/vY83EvFS2/ce1fzE6Noo35vSWj8PCw9Ihg8B/dGN3eTBeP3plpxMFokxVKJMdXw3yS7bsQlTmaPgF1KR43FeqXVbFNoeX/gYFaFqzfQUn6EThC4Cm0EQjtxEebJu5 dorje@Dukes-MBP" | |
useradd -m -s /bin/bash $USERNAME | |
mkdir /home/$USERNAME/.ssh | |
echo $SSHKEY > /home/$USERNAME/.ssh/authorized_keys | |
chown -R $USERNAME:$USERNAME /home/$USERNAME/.ssh | |
chmod 600 /home/$USERNAME/.ssh/authorized_keys | |
# Passwordless Sudo | |
echo "%sudo ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/91-nopasswd | |
usermod -a -G sudo $USERNAME | |
# ZCash | |
apt-get install -y \ | |
build-essential pkg-config libc6-dev m4 g++-multilib \ | |
autoconf libtool ncurses-dev unzip git python \ | |
zlib1g-dev wget bsdmainutils automake | |
git clone https://github.com/zcash/zcash.git /srv/zcash | |
chown -R $USERNAME:$USERNAME /srv/zcash | |
cd /srv/zcash/ | |
git checkout v1.0.0-beta2 | |
sudo -u $USERNAME ./zcutil/fetch-params.sh | |
sudo -u $USERNAME ./zcutil/build.sh -j$(nproc) | |
sudo -u $USERNAME mkdir ~/.zcash | |
sudo -u $USERNAME touch ~/.zcash/zcash.conf | |
cat << EOF > /home/$USERNAME/.zcash/zcash.conf | |
testnet=1 | |
addnode=betatestnet.z.cash | |
rpcuser=username | |
rpcpassword=password | |
gen=1 | |
EOF | |
sudo -u $USERNAME ./src/zcashd -daemon |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment