-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstartup.sh
141 lines (101 loc) · 4.22 KB
/
startup.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
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
#!/bin/sh
# This scrip installs:
# - latest ubuntu updates
# - wget
# - Python3
# - Chrome remote Desktop
# - GUI for Ubuntu (Xfce)
# - Google Chrome
# - Firefox
# - Google Cloud SDK
# - aws cli
# - Visual Studio Code
# - npm
# - NodeJS
# - yarn
# - Flutter
# - jq
# Get the latest package list
sudo apt update
# Do the updates
sudo apt-get update
# install wget
sudo apt install -y software-properties-common apt-transport-https wget
# Install Python for Ubuntu
sudo apt install -y python3-pip
## Also install following packages for python development
sudo apt install python3-dev default-libmysqlclient-dev build-essential pkg-config
# Download the Debian Linux Chrome Remote Desktop installation package:
wget https://dl.google.com/linux/direct/chrome-remote-desktop_current_amd64.deb
# Install the package and its dependencies:
sudo dpkg --install chrome-remote-desktop_current_amd64.deb
sudo apt install -y --fix-broken
# Cleanup remove the unnecessary file after the installation is done:
rm chrome-remote-desktop_current_amd64.deb
# install xcfe
sudo DEBIAN_FRONTEND=noninteractive \
apt install -y xfce4 xfce4-goodies desktop-base
# Configure Chrome Remote Desktop to use Xfce by default:
sudo bash -c 'echo "exec /etc/X11/Xsession /usr/bin/xfce4-session" > /etc/chrome-remote-desktop-session'
# Xfce's default screen locker is Light Locker, which doesn't work with Chrome Remote Desktop.
# install XScreenSaver as an alternative:
sudo apt install -y xscreensaver
# Install Firefox browser
sudo apt -y install firefox
# Install Chrome browser
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg --install google-chrome-stable_current_amd64.deb
sudo apt install -y --fix-broken
# Cleanup remove the unnecessary file after the installation is done:
rm google-chrome-stable_current_amd64.deb
# Disable the display manager service:
# There is no display connected to the VM --> the display manager service won't start.
sudo systemctl disable lightdm.service
# Install the Google Cloud SDK
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 -y google-cloud-sdk
# END Install the Google Cloud SDK
# Install AWS CLI
# This is needed to interact with AWS resources
# Download the installation file
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
# Unzip the installer
unzip awscliv2.zip
# Run the install program
sudo ./aws/install
# Cleanup: remove the zip file for the aws installer
rm awscliv2.zip
# END Install AWS CLI
# Install Visual Studio Code
sudo snap install --classic code
# Install Node 20.
# [See the official Node documentation](https://github.com/nodesource/distributions#ubuntu-versions).
## Download and import the Nodesource GPG key
sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
## Create deb repository on the machine
NODE_MAJOR=20
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
## Run Update and Install
sudo apt-get update
sudo apt-get install nodejs -y
# END Install Node 20
# Get the lateste version of npm
sudo npm install --global npm@latest
# Get the latest version of yarn
sudo npm install --global yarn
# Install nvm v 0.39.1 to manage node versions
sudo wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
## Make sure nvm can be used (similar to restart the terminal)
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# Install Flutter
sudo snap install flutter --classic
# Install jq
sudo snap install jq