This will guide you through the installation of Ubuntu 20.04 LTS as a Standalone Server.
| Size | Location | Notes |
|---|---|---|
| 4 GB | swap (primary) | should be min sqrt(RAM) and max double RAM |
| 6 GB | / (logical) | current install uses about 2.6 GB |
| 5 GB | /home (logical) | current install uses about 45 MB |
| 1 GB | /boot (logical) | current install uses about 145 MB |
| 19.498 GB | /var (logical) | current install uses about 9.3 GB |
| 4 GB | /tmp (logical) | current install uses about 21 MB |
sudo apt-get update sudo apt-get dist-upgrade
sudo apt-get install openssh-server
sudo mkdir /mnt/storage sudo mkdir /mnt/minecraft sudo mkdir /mnt/plex sudo mkdir /mnt/timemachine
sudo blkid
and
sudo lsblk
to get info for fstab.
sudo vim /etc/fstab
sudo apt-get install exfat-fuse exfat-utils
sudo reboot -h now
mkdir .ssh
ssh-keygen -t rsa
openssl genrsa -aes128 -out id_rsa 2048 openssl rsa -in id_rsa -pubout -out id_rsa.test ssh-keygen -f id_rsa.test -i -mPKCS8
sudo vim /etc/ssh/sshd_config
UsePAM yes PasswordAuthentication no
sudo reboot -h now
sudo apt-get install tomcat9
sudo vim /etc/tomcat9/server.xml
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
URIEncoding="UTF-8"
redirectPort="8443" />
sudo rm -rf /var/lib/tomcat9/webapps/ROOT sudo cp -a /mnt/backup/webpage/webapps/. /var/lib/tomcat9/webapps/ sudo cp -a /mnt/backup/webpage/plex /var/lib/tomcat9/
sudo chown tomcat:tomcat webapps sudo chmod 755 webapps
sudo vim /etc/tomcat9/web.xml
<init-param> <param-name>listings</param-name> <param-value>true</param-value> </init-param>
sudo vim /usr/lib/jvm/java-11-openjdk-amd64/conf/security/java.security
securerandom.source=file:/dev/random
to
securerandom.source=file:dev/urandom
sudo apt-get install mysql-server
sudo mysql -u root -p < dumpfile.sql
sudo mysql -u root -p CREATE USER 'dirk'@'localhost' IDENTIFIED BY 'password'; show databases; GRANT ALL PRIVILEGES ON *.* TO 'dirk'@'localhost'; exit
GRANT FILE ON *.* TO 'dirk'@'localhost'; exit
sudo aa-status
sudo vim /etc/apparmor.d/usr.sbin.mysqld
/var/lib/tomcat9/webapps/ r, /var/lib/tomcat9/webapps/** rwk,
sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf
secure_file_priv=""
wait_timeout = 20
sudo usermod -a -G mysql tomcat
sudo reboot -h now
sudo apt-get install default-jdk
sudo apt-get install libmysql-java
sudo apt install thatdebfile.deb
sudo ln -sf /usr/share/java/mysql-connector-java.8.0.20.jar /usr/share/tomcat9/lib/mysql-connector-java.jar
&serverTimezone=UTC
to the end of the SQL_PARAMS section in all of the config.jsp files. They should be all converted for the next install and no action required. (hopefully)
sudo javac -cp /usr/share/java/servlet-api-3.0.jar:/usr/share/java/jsp-api-2.2.jar util/*.java
sudo reboot -h now
sudo apt-get install samba sudo smbpasswd -a dirk sudo vim /etc/samba/smb.conf
[webapps]
comment = Webpage Files
path = /var/lib/tomcat9/webapps
available = yes
browsable = yes
guest ok = yes
read only = no
writable = yes
admin users = dirk
[storage]
[plex]
LOAD DATA LOCAL INFILE "/home/dirk/2019o.csv" INTO TABLE games COLUMNS TERMINATED BY ',';
sudo visudo -f /etc/sudoers.d/nopass dirk ALL=(ALL:ALL) NOPASSWD:/usr/bin/rsync
crontab -e
0 3 * * * /home/dirk/scripts/backup
sudo dpkg-reconfigure tzdata