└── README.md /README.md: -------------------------------------------------------------------------------- 1 | # linux bootstrap 2 | 3 | This probably isn't useful to anyone, and I'm not really maintaining it as an 4 | open-source project. But I thought I'd keep it public in case anyone wants to 5 | see... 6 | 7 | Tested on Debian Buster 8 | 9 | ## install and configure sudo 10 | 11 | ``` 12 | su 13 | apt install sudo 14 | usermod -aG sudo anish 15 | ``` 16 | 17 | ## enable non-free components 18 | 19 | Edit `/etc/apt/sources.list` and add `contrib` and `non-free` to the end of all the lines. 20 | 21 | ## machine-specific 22 | 23 | ### gondor 24 | 25 | ``` 26 | sudo apt install intel-microcode 27 | ``` 28 | 29 | ### bongo (AMD A8-3850) 30 | 31 | ``` 32 | sudo apt install firmware-realtek 33 | ``` 34 | 35 | ### mordor (r710) 36 | 37 | ``` 38 | sudo apt install firmware-bnx2 firmware-qlogic 39 | ``` 40 | 41 | **This firmware (bnx2) is required to use the NICs at all, so it's needed 42 | during install to configure the network. Using the Debian distribution that 43 | includes non-free firmware solves this problem (because it includes bnx2).** 44 | 45 | ## set up dynamic dns 46 | 47 | Look at "quick cron example". 48 | 49 | ## ssh server 50 | 51 | Add ssh key to `~/.ssh/authorized_keys`. 52 | 53 | Disable SSH password login in `/etc/ssh/sshd_config` by setting 54 | `PasswordAuthentication no`. 55 | 56 | ## install programs 57 | 58 | ``` 59 | sudo apt update 60 | sudo apt install \ 61 | curl git mercurial vim htop iotop axel aria2 silversearcher-ag \ 62 | build-essential pkg-config \ 63 | autojump python3-pip python3-venv python3-dev \ 64 | vnstat lm-sensors rsync zsh tmux 65 | ``` 66 | 67 | ### scientific computing 68 | 69 | ``` 70 | sudo apt install python-numpy python-scipy \ 71 | gfortran libblas-dev liblapack-dev \ 72 | libjpeg-dev zlib1g-dev python-opencv 73 | ``` 74 | 75 | ## set default shell 76 | 77 | ``` 78 | chsh -s /usr/bin/zsh 79 | ``` 80 | 81 | ## set up a ssh key 82 | 83 | ``` 84 | ssh-keygen -t ed25519 -a 100 85 | ``` 86 | 87 | Note that the `-a 100` is the number of rounds of the KDF to use, so it doesn't 88 | matter for an unencrypted key. 89 | 90 | Add `~/.ssh/id_ed25519.pub` to GitHub account. 91 | 92 | ## install dotfiles 93 | 94 | ``` 95 | mkdir -p ~/src 96 | cd ~/src 97 | git clone git@github.com:anishathalye/dotfiles 98 | cd dotfiles 99 | ./install 100 | cd ~/src 101 | git clone git@github.com:anishathalye/dotfiles-local 102 | cd dotfiles-local 103 | git checkout linux-server 104 | ./install 105 | ``` 106 | 107 | ## gpu setup 108 | 109 | ``` 110 | cd ~/src/dotfiles-local 111 | git checkout gpu 112 | ./install 113 | ``` 114 | 115 | * [NVIDIA drivers](http://www.nvidia.com/object/unix.html) 116 | * [CUDA toolkit](https://developer.nvidia.com/cuda-downloads) 117 | * Get kernel headers first: `sudo apt install linux-headers-$(uname -r)` 118 | * Using the Ubuntu `.run` file should work 119 | * Reboot afterwards 120 | * [cuDNN](https://developer.nvidia.com/rdp/cudnn-download) 121 | * Accelerated Computing Developer Program membership required 122 | * Copy files to `/usr/local/cuda` 123 | --------------------------------------------------------------------------------