This is an old revision of the document!
This will guide you through the installation of Ubuntu 20.04 LTS as an Unraid Virtual Machine.
| 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
backup /mnt/backup 9p trans=virtio,version=9p2000.L,_netdev,rw 0 0
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 rm -rf /var/lib/tomcat9/webapps/ROOT sudo cp -a /mnt/backup/webpage/webapps/. /var/lib/tomcat9/webapps/
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/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
LOAD DATA LOCAL INFILE "/home/dirk/2019o.csv" INTO TABLE games COLUMNS TERMINATED BY ','; UPDATE games SET vscore = NULL where year = 2019; UPDATE games SET hscore = NULL where year = 2019;
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