This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| unraid:virtual:ubuntu20.04 [2020/11/21 19:21] – dirk | unraid:virtual:ubuntu20.04 [2021/03/10 21:10] (current) – removed dirk | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Install Ubuntu 20.04 LTS as Unraid Virtual Machine ====== | ||
| - | This will guide you through the installation of [[Ubuntu 20.04 LTS]] as an Unraid Virtual Machine. | ||
| - | ===== VM Settings ===== | ||
| - | * Autostart: Yes | ||
| - | * Name: brimble.com.20.04vX | ||
| - | * Description: | ||
| - | * CPU Mode: Host Passthrough | ||
| - | * Logical CPUs: 6/7 | ||
| - | * Internal Memory: 4096 | ||
| - | * Max Memory: 4096 | ||
| - | * Machine: Q35-4.1 | ||
| - | * BIOS: OVMF | ||
| - | * USB Controller: 2.0 (EHCI) (I don't have USB 3.0 on current hardware) | ||
| - | * OS Install ISO: select the ubuntu - 20.04 iso | ||
| - | * OS Install CDRom Bus: SATA | ||
| - | * Primary vDisk Location: Auto if on the array, below options for ssd | ||
| - | */ | ||
| - | */ | ||
| - | * Primary vDisk Size: 40G | ||
| - | * Primary vDisk Type: raw | ||
| - | * Primary vDisk Bus: VirtIO if on the array, below options for ssd | ||
| - | * VirtIO | ||
| - | * SATA | ||
| - | * Unraid Share: / | ||
| - | * Unraid Mount tag: backup | ||
| - | * Hit plus sign to add more shares (If after creation use XML mode (duplicate and increment function to 0x1)) | ||
| - | * Graphics Card: VNC | ||
| - | * VNC Video Driver: QXL (best) | ||
| - | * VNC Password: leave this blank (or set password if concerned folks will get access to unraid!) | ||
| - | * VNC Keyboard: English-United States | ||
| - | * Sound Card: none | ||
| - | * Network MAC: whatever it is | ||
| - | * Network Bridge: br0 | ||
| - | * USB Devices: none | ||
| - | * Other PCI Devices: none | ||
| - | |||
| - | ===== Install to Virtual Machine ===== | ||
| - | |||
| - | * Custom storage layout | ||
| - | * Partitions: (ext4) | ||
| - | |||
| - | ^ Size ^ Location | ||
| - | | 4 GB | swap (primary) | ||
| - | | 6 GB | / (logical) | ||
| - | | 5 GB | /home (logical) | ||
| - | | 1 GB | /boot (logical) | ||
| - | | 19.498 GB | /var (logical) | ||
| - | | 4 GB | /tmp (logical) | ||
| - | |||
| - | * Full Name: Dirk Rockface | ||
| - | * Server: brimble | ||
| - | * User Name: dirk | ||
| - | * Finish installing. I didn't install any " | ||
| - | |||
| - | ===== Setup ===== | ||
| - | ==== Update Packages ==== | ||
| - | < | ||
| - | sudo apt-get dist-upgrade</ | ||
| - | |||
| - | ==== Install SSH Server ==== | ||
| - | < | ||
| - | ==== Mount Unraid Shares ==== | ||
| - | * add the following to /etc/fstab where backup is whatever you called the Unraid Mount tag and /mnt/backup is whatever folder you made in ubuntu to mount to. < | ||
| - | * Note: if you've already created the VM and THEN added the unraid tag, your NIC name was changed (probably from enp1s0 to enp3s0) run ifconfig -a to see new name then modify / | ||
| - | * Note: also, to add more shares after initial creation, use XML mode, duplicate the section, and increment the function to 0x1 | ||
| - | |||
| - | ==== Install ex-fat (for USB drives or FAT formats) ==== | ||
| - | < | ||
| - | ==== Reboot ==== | ||
| - | < | ||
| - | ==== Create ssh-rsa key auth ==== | ||
| - | * In home directory < | ||
| - | * authorized_keys file needs to have keys in them. Copy over from harddrive, external drive, or create them. | ||
| - | * When making keys on clients < | ||
| - | * New things for keys: | ||
| - | * So, ssh-keygen no longer creates the keys with the headers on them. Seems to be no big deal for ssh but Cyberduck borked. | ||
| - | * To make private keys with headers for Cyberduck:< | ||
| - | openssl rsa -in id_rsa -pubout -out id_rsa.test | ||
| - | ssh-keygen -f id_rsa.test -i -mPKCS8</ | ||
| - | * Links: | ||
| - | * https:// | ||
| - | * https:// | ||
| - | |||
| - | * Turn off Password Auth< | ||
| - | PasswordAuthentication no</ | ||
| - | ==== Reboot ==== | ||
| - | < | ||
| - | ==== Install Tomcat ==== | ||
| - | < | ||
| - | |||
| - | === Copy webpage files === | ||
| - | < | ||
| - | sudo cp -a / | ||
| - | * Note: You might have to set ownership and permissions back to normal for those folders< | ||
| - | sudo chmod 755 webapps</ | ||
| - | === Allow Directory Browsing === | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | </ | ||
| - | ==== Install MySql (if not using a docker)==== | ||
| - | < | ||
| - | === Import database dump === | ||
| - | < | ||
| - | === Create mysql user === | ||
| - | < | ||
| - | CREATE USER ' | ||
| - | show databases; | ||
| - | GRANT ALL PRIVILEGES ON *.* TO ' | ||
| - | exit</ | ||
| - | === Allow write access for user === | ||
| - | < | ||
| - | exit</ | ||
| - | === Allow mysql to write to files === | ||
| - | < | ||
| - | * This should show mysqld in enforce mode | ||
| - | < | ||
| - | * add folders near the bottom like this:< | ||
| - | / | ||
| - | < | ||
| - | * add at bottom:< | ||
| - | * while in this file, decrease sleep time to avoid max connections (default is 8 hrs)< | ||
| - | * Note: In order to get sql to write, I had to make everything in the webapps folder root:dirk (which it probably was) and the export folder 777. Not sure which of those did the trick (or both) | ||
| - | * Note: New in mysqlserver v8: files writen from mysql are only readable by root and the mysql group so you have to add the use tomcat (the one reading the files in the march madness bracket) to the mysql group (the one creating the files)< | ||
| - | * Changes will take effect after restart< | ||
| - | ==== Tomcat - Mysql linking / JDK / JAVA cleanup ==== | ||
| - | * Install Java Development Kit< | ||
| - | * Install Java / Mysql connector< | ||
| - | * Note: This was not supported in 20.04 at the time and must be installed manually. | ||
| - | * Download JDBC Driver for Mysql (Connector/ | ||
| - | * Install the debfile:< | ||
| - | * Create symlink for connector< | ||
| - | * Faster tomcat startup | ||
| - | * Note: This is due to using random vs urandom | ||
| - | * edit java.security | ||
| - | * at last check, this was located here: < | ||
| - | * change< | ||
| - | * Link: https:// | ||
| - | * New change for 20.04: had to add < | ||
| - | * If webinf files need to be compiled:< | ||
| - | * reboot< | ||
| - | ==== Install Samba ==== | ||
| - | < | ||
| - | sudo smbpasswd -a dirk | ||
| - | sudo vim / | ||
| - | < | ||
| - | comment = Webpage Files | ||
| - | path = / | ||
| - | available = yes | ||
| - | browsable = yes | ||
| - | guest ok = yes | ||
| - | read only = no | ||
| - | writable = yes | ||
| - | admin users = dirk</ | ||
| - | * you may have to chmod correct permissions for webapps folder (775) | ||
| - | |||
| - | ==== Add football season ==== | ||
| - | < | ||
| - | UPDATE games SET vscore = NULL where year = 2019; | ||
| - | UPDATE games SET hscore = NULL where year = 2019;</ | ||
| - | |||
| - | ==== Allow rsync to run on own ==== | ||
| - | < | ||
| - | dirk ALL=(ALL: | ||
| - | |||
| - | ==== Add cron job for backup ==== | ||
| - | < | ||
| - | < | ||
| - | |||
| - | ==== Change timezone ==== | ||
| - | < | ||
| - | |||