-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·61 lines (56 loc) · 1.9 KB
/
setup.sh
File metadata and controls
executable file
·61 lines (56 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env bash
sudo apt-get update
sudo apt-get upgrade
read -p "Install vim, htop, ssh, 7z, tmux, and git? [Y/n] " -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get install vim htop openssh-server git tmux p7zip-full
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
fi
read -p "Install pyenv? [Y/n] " -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
source ~/.bashrc
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev
source ~/.bashrc
fi
read -p "Generate ssh key? [Y/n] " -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
ssh-keygen -t ed25519
fi
read -p "Configure iptables? [Y/n] " -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
sudo iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 443 -j ACCEPT
sudo iptables -I INPUT 1 -p udp --dport 60000:61000 -j ACCEPT
sudo iptables -I INPUT 1 -i lo -j ACCEPT
sudo iptables -P INPUT DROP
sudo apt-get install iptables-persistent
fi
read -p "Install UI? [Y/n] " -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
sudo add-apt-repository ppa:klaus-vormweg/awesome
sudo apt-get update
sudo apt-get install lightdm awesome rxvt-unicode-256color pcmanfm
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
sudo apt-get update
sudo apt-get install google-chrome-stable
fi