-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
80 lines (56 loc) · 2.13 KB
/
setup.sh
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
#!/bin/bash
# This script is used to setup a new ubuntu machine.
# update system
sudo apt update
sudo apt install -y software-properties-common
# upgrade system
sudo apt upgrade -y && sudo apt dist-upgrade -y
# install programs/tools - common
sudo apt install git wget gimp gparted maven gnome-tweaks gnome-shell-extensions neofetch nettools default-jre vlc pgadmin4 stripe -y
# install docker - steps
sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release -y
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) 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-compose-plugin -y
sudo groupadd docker
sudo usermod -aG docker $USER
# LAMP stack steps
sudo apt install apache2 -y
sudo ufw allow in "Apache"
sudo apt install mysql-server -y
sudo apt install php libapache2-mod-php php-mysql -y
# install snaps
sudo snap install slack --classic
sudo snap install mysql-workbench-community
sudo snap install heroku --classic
# allow workbench to access password service
sudo snap connect mysql-workbench-community:password-manager-service :password-manager-service
# install nodejs - 20 LTS
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
# create git config
git config --global user.name $1
git config --global user.email $2
# install google chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb -y
# install vscode
wget -O vscode.deb 'https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64'
sudo apt install ./vscode.deb -y
# node packages - global
sudo npm i -g npm-check-updates
sudo npm install -g pnpm
# clean up
sudo apt autoremove -y
# reboot system in 5 seconds - countdown
echo "Rebooting in 5 seconds..."
sleep 5
sudo reboot