Skip to content

Instantly share code, notes, and snippets.

@ltfschoen
Last active April 18, 2019 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ltfschoen/a81bc8394db1ed64eb314976ed17e37a to your computer and use it in GitHub Desktop.
Save ltfschoen/a81bc8394db1ed64eb314976ed17e37a to your computer and use it in GitHub Desktop.
setup_debian_8
# Copy - CTRL+C
# Paste - CTRL+V
# Copy/Paste Terminal - SHIFT+CTRL+C, SHIFT+CTRL+V
# login to computer
# contact Arnold for copy of password to be sent via Riot
# modify settings
# open Settings > Mouse & Touchpad > Disable Natural Scrolling, Increase Touchpad Speed
# show debian version
lsb_release -a
# switch to root and enter root password
su
# create a user profile for yourself
# https://linuxize.com/post/how-to-create-a-sudo-user-on-debian/
adduser ltfschoen
usermod -aG sudo ltfschoen
su - ltfschoen
sudo whoami
# IMPORTANT NOTE: LOGOUT AND LOGIN AS YOUR NEW USER!!!
# install sudo
su
apt-get install sudo
sudo -i
exit
# install https
sudo apt-get install apt-transport-https
# install google chrome
# https://linuxize.com/post/how-to-install-google-chrome-web-browser-on-debian-9/
#
cd downloads
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install -y ./google-chrome-stable_current_amd64.deb
sudo apt update
sudo apt upgrade -y
google-chrome
# install enpass using: https://www.enpass.io/support/how-to-install-enpass-on-linux/
sudo -i
echo "deb https://apt.enpass.io/ stable main" > \
/etc/apt/sources.list.d/enpass.list
# import key to sign the release:
wget -O - https://apt.enpass.io/keys/enpass-linux.key | apt-key add -
# install
$ apt-get update
$ apt-get install enpass
$ exit
# install enpass firefox extension: https://www.enpass.io/downloads/
# install riot
echo "deb https://riot.im/packages/debian/ stretch main" > \
/etc/apt/sources.list.d/riot.list
cd downloads
wget https://riot.im/packages/keys/riot.asc
sudo apt-key add riot.asc
sudo apt update
sudo apt install -y riot-web
# setup substrate dependencies
sudo apt install -y clang cmake build-essential gcc git libclang-dev libssl-dev pkg-config
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
source ~/.bashrc
command -v nvm
nvm list
nvm install v11.13.0
nvm use v11.13.0
# yarn version manager
curl -fsSL https://raw.githubusercontent.com/tophat/yvm/master/scripts/install.js | node
source ~/.yvm/yvm.sh
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -;
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list;
sudo apt-get update
sudo apt-get install -y yarn
sudo ln -s /usr/bin/yarn /usr/local/bin/yarn;
curl https://sh.rustup.rs -sSf | sh -s -- -y;
source ~/.cargo/env
rustup update
rustup install nightly
rustup default stable
# setup wasm for substrate
rustup target add wasm32-unknown-unknown --toolchain nightly;
cargo install --force --git https://github.com/alexcrichton/wasm-gc;
cargo install --force --git https://github.com/pepyakin/wasm-export-table.git;
# vscode
# Download .deb file
cd /home/parity/Downloads/
sudo apt install code_1.32.3-1552606978_amd64.deb
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install code
# set vscode as default text editor
sudo update-alternatives --set editor /usr/bin/code
# Usage
# command panel - CTRL + SHIFT + P
# setup vscode extensions
code parity.code-workspace
code --install-extension dbaeumer.vscode-eslint
code --install-extension eamodio.gitlens
code --install-extension eg2.tslint
code --install-extension msjsdiag.debugger-for-chrome
code --install-extension robertohuertasm.vscode-icons
code --install-extension infeng.vscode-react-typescript
code --install-extension Orta.vscode-jest
code --install-extension PeterJausovec.vscode-docker
code --install-extension rust-lang.rust
code --list-extensions
# setup GitHub SSH keys
# https://help.github.com/en/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
# https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/
# https://github.com/account/ssh
sudo apt-get install xclip
# generate SSH keys associated with current device
```
ssh-keygen -t rsa -b 4096 -C "Luke Schoen <ltfschoen@gmail.com>"
cat /home/ltfschoen/.ssh/id_rsa.pub
```
# go to GitHub SSH settings: https://github.com/settings/ssh/new
# click "New SSH Key"
# Copy/paste the contents of the id_rsa.pub file
# if you get error `Gtk-WARNING` when running Fether, do this:
https://www.linuxquestions.org/questions/debian-26/gtk-warning-%2A%2A-cannot-open-display-0-0-a-807450/#post4822792
sudo chmod -R 777 /home/ltfschoen/code
# Fether - when running `yarn start` for Fether and encounter error: fix error `libappindicator-WARNING **: Unable to get the session bus: Unknown or unsupported transport 'disabled' for address 'disabled:'`
sudo apt-get install dbus-x11
sudo chmod 777 -R /home/ltfschoen/code/github/paritytech/fether/node_modules/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment