-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUPUNTU20
146 lines (109 loc) · 5.06 KB
/
UPUNTU20
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
#!/bin/bash
sudo adduser $USER www-data
sudo ufw enable
sudo ufw allow ssh
#General
####################################################################################################################
sudo apt-get update
sudo apt-get install -y python3-pip
sudo apt-get install -y fail2ban flameshot xclip git vlc tilda mc p7zip-full unrar-free htop byobu sshfs x2x openssh-server build-essential fish smbclient curl
# PIP and PIP3
sudo update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
sudo snap install spotify chromium-browser drawing
sudo snap install codium sublime-text --classic
read -t 5 -p "Add VPN client? [y/n]" -n 1 -r
echo #new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
sudo apt install network-manager-openvpn-gnome openvpn-systemd-resolved
fi
# DEVELOP
# ----------------------------------------------------------------------------------
# Docker
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo usermod -G docker -a $USER
pip install glances
# Node js
curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash - &&
sudo apt-get update && sudo apt-get install -y nodejs
# Local pip and npm installs
# ----------------------------------------------------------------------------------
npm config set ignore-scripts true
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
# Add user bin to path $HOME/.local/bin
printf '#!/bin/bash\nPATH=$PATH:$HOME/.local/bin:$HOME/.npm-global/bin\n' | sudo tee -a /etc/profile.d/custom.sh > /dev/null
source /etc/profile.d/custom.sh
chmod a+x /etc/profile.d/
npm install -g @angular/cli firebase-tools http-server
# G cloud
# ----------------------------------------------------------------------------------
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
sudo apt-get install apt-transport-https ca-certificates gnupg
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
sudo apt-get update && sudo apt-get install google-cloud-sdk openjdk-11-jdk-headless
# VS codium
# ----------------------------------------------------------------------------------
wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg \
| gpg --dearmor \
| sudo dd of=/usr/share/keyrings/vscodium-archive-keyring.gpg
echo 'deb [ signed-by=/usr/share/keyrings/vscodium-archive-keyring.gpg ] https://download.vscodium.com/debs vscodium main' \
| sudo tee /etc/apt/sources.list.d/vscodium.list
sudo apt update && sudo apt install codium
# FISH
# ----------------------------------------------------------------------------------
sudo chsh -s /usr/bin/fish # Set deffault shell
printf '\nset -gx PATH $PATH $HOME/.local/bin $HOME/.npm-global/bin \nset fish_greeting \nalias -s code=codium' | tee -a ~/.config/fish/config.fish > /dev/null
rm ~/.config/autostart/create-template.desktop # generates empty files
# Hide items
# ----------------------------------------------------------------------------------
echo snap >> ~/.hidden
# CONF FILES
# ----------------------------------------------------------------------------------
wget https://raw.githubusercontent.com/mikk351/devenko/master/keybindings.json -O ~/.config/VSCodium/User/keybindings.json
# OPTIONAL
# ----------------------------------------------------------------------------------
#Install ID card
read -t 5 -p "Install EST ID-card ? [y/n]" -n 1 -r
echo #new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
wget https://installer.id.ee/media/install-scripts/install-open-eid.sh &&
chmod +x install-open-eid.sh &&
./install-open-eid.sh &&
rm install-open-eid.sh
fi
#Google chrome
read -t 5 -p "Install Google chrome? [y/n]" -n 1 -r
echo #new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb &&
sudo dpkg -i --force-depends google-chrome-stable_current_amd64.deb &&
rm google-chrome-stable_current_amd64.deb &&
sudo apt-get -f install
fi
# KEY
# ----------------------------------------------------------------------------------
read -t 5 -p "Generate SSH keys? [y/n]" -n 1 -r
echo #new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
git config --global user.email "[email protected]" &&
git config --global user.name "mikkk" &&
git config --global push.default simple &&
ssh-keygen -t rsa -b 4096 -C "[email protected]" &&
eval "$(ssh-agent -s)" && ssh-add ~/.ssh/id_rsa &&
xclip -sel clip < ~/.ssh/id_rsa.pub
fi