-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprovision_root_base_gex44.sh
47 lines (30 loc) · 1.06 KB
/
provision_root_base_gex44.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
#!/bin/sh
set -x
rm /var/lib/apt/lists/*
rm /var/lib/apt/lists/partial/*
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get upgrade -y
DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y
apt-get autoremove -y
apt-get install aptitude -y
timedatectl set-timezone UTC
# See: https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04
sysctl vm.swappiness=10
echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf
sysctl vm.vfs_cache_pressure=50
echo 'vm.vfs_cache_pressure=50' | sudo tee -a /etc/sysctl.conf
# Install common packages
apt-get install nano screen command-not-found psmisc -y
# Remove common packages
apt-get remove vim -y
apt purge snapd -y
apt autoremove -y
rm -rf ~/snap
apt autoclean
# Get rid of any bashrc customizations
/bin/cp /etc/skel/.bashrc ~/
source ~/.bashrc
# Set up some useful things for the root user
curl -sSL https://raw.githubusercontent.com/nbspou/scripts/master/provision_me_base.sh | bash
# Set up GPU stuff
curl -sSL https://raw.githubusercontent.com/nbspou/scripts/master/pv_provision_llama.sh | bash