-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathubuntu_install_2.sh
executable file
·85 lines (79 loc) · 3.61 KB
/
ubuntu_install_2.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
# *********************************************
# script for NTB install - Ubuntu 22.04, part 2
# begin : Fri 25 Sep 2020
# copyright : (c) 2022 Václav Dvorský
# email : [email protected]
# $Id: ubuntu_install.sh, v3.26 29/11/2022
# *********************************************
#
# --------------------------------------------------------------------
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public Licence as published by
# the Free Software Foundation; either version 2 of the Licence, or
# (at your option) any later version.
# --------------------------------------------------------------------
#!/bin/bash
if ! [ $(id -u) = 0 ]; then
id -nG
docker run hello-world
docker ps -a
systemctl is-enabled docker
# install Docker Compose v2
# sudo curl -L "https://github.com/docker/compose/releases/download/v2.11.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
# sudo chmod +x /usr/local/bin/docker-compose
# mkdir -p $HOME/.docker/cli-plugins/
# ln -s /usr/local/bin/docker-compose $HOME/.docker/cli-plugins/docker-compose
docker compose version
sudo apt install git
sudo apt install -y openvpn
sudo apt install -y network-manager-openvpn
sudo apt install -y network-manager-openvpn-gnome openvpn-systemd-resolved
sudo apt -f install && sudo apt update && sudo apt upgrade -y && sudo apt dist-upgrade -y && sudo apt autoremove -y
# set up networks
# sudo rsync -a ca.crt client.crt client.key login *.ovpn /etc/openvpn/client
# sudo chmod 400 /etc/openvpn/client/*
# sudo nmcli connection import type openvpn file /etc/openvpn/client/vpn.ovpn
sudo nano /etc/hostname
# other and unimportant things
sudo apt install -y htop
sudo apt install -y screen mc solaar copyq flameshot
sudo apt install -y sysstat
sudo systemctl enable sysstat
sudo sed -i 's/false/true/g' /etc/default/sysstat
sudo apt install -y smartmontools
sudo systemctl enable smartmontools
sudo apt install -y fail2ban
# install VirtualBox
sudo apt install -y virtualbox virtualbox-guest-additions-iso virtualbox-ext-pack
# install Czech fonts
wget https://github.com/hufhend/ubuntu-postinstall/raw/main/fonts.tar.gz
sudo tar xvfz fonts.tar.gz -C /usr/local/share
# # install Firefox
# sudo snap remove firefox
# sudo add-apt-repository ppa:mozillateam/ppa
# echo '
# Package: *
# Pin: release o=LP-PPA-mozillateam
# Pin-Priority: 1001
# ' | sudo tee /etc/apt/preferences.d/mozilla-firefox
# echo 'Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:${distro_codename}";' | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox
# sudo apt install firefox
# install Chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
rm google-chrome-stable_current_amd64.deb
# install OnlyOffice
wget https://download.onlyoffice.com/install/desktop/editors/linux/onlyoffice-desktopeditors_amd64.deb
sudo apt install ./onlyoffice-desktopeditors_amd64.deb
sudo apt --fix-broken install
rm onlyoffice-desktopeditors_amd64.deb
# install Steam
sudo add-apt-repository multiverse
sudo apt install -y steam
# install monitoring service
sudo apt-get install -y prometheus-node-exporter
sudo ufw allow from 192.168.0.0/21 to any port 9100 proto tcp comment 'Open node-exporter port 9100'
exit
fi
#here go superuser commands
echo This script cannot run root