1. Installation
-
Log in as delta on the tbhf-kvm-mrm server.
-
Note: Use --os—variant=debian10 instead of --os-variant=debian11 to prevent
the Unknown OS name 'debian11'. See 'osinfo-query os' for valid values error. -
Enter the following commands at a Command Line.
scp -p delta@tbhf-anc-mrm:/media/Windows/Images/Debian/debian-11.6.0-amd64-DVD-1.iso . sudo cp -a debian-11.6.0-amd64-DVD-1.iso /home/kvm/images sudo virt-install \ --check all=off \ --disk format=qcow2,path=/home/kvm/images/tbhf-doc-mrm.qcow2,size=100 \ --extra-args="console=tty0 console=ttyS0,115200" \ --graphics none \ --location=/home/kvm/images/debian-11.6.0-amd64-DVD-1.iso \ --name=tbhf-doc-mrm \ --network bridge:br0 \ --os-variant=debian10 \ --ram=2048 \ --vcpus=1 -
Step through the installation with the following choices.
-
Language: English
-
Country, territory or area: other
-
Continent or region: Asia
-
Country, territory or area: Thailand
-
Country to base default locale settings on: United States - en_US.UTF-8
-
Keymap to use: American English
-
Hostname: tbhf-doc-mrm
-
Domain name: smru.shoklo-unit.com
-
Root password: level 1 password
-
Re-enter password to verify: level 1 password
-
Full name for the new user: Delta
-
Username for your account: delta
-
Choose a password for the new user: level 2 password
-
Re-enter password to verify: level 2 password
-
Partitioning method: Guided - use entire disk
-
Select disk to partition: Virtual disk 1 (vda) - 107.4 GB Virtio Block Device
-
Partitioning scheme: All files in one partition (recommended for new users)
-
Partition disks: Finish partitioning and write changes to disk
-
Write the changes to disk? Yes
-
Scan extra installation media? No
-
Use a network mirror? No
-
Participate in the package usage survey? No
-
Uncheck Debian desktop environment.
-
Uncheck GNOME.
-
Check SSH server.
Choose software to install: [ ] Debian desktop environment [ ] ... GNOME [ ] ... Xfce [ ] ... GNOME Flashback [ ] ... KDE Plasma [ ] ... Cinnamon [ ] ... MATE [ ] ... LXDE [ ] ... LXQt [ ] web server [*] SSH server [*] standard system utilities -
Choose software to install: Continue
-
Install the GRUB boot loader to your primary drive? Yes
-
Device for boot loader installation: /dev/vda
-
Select Continue to reboot and press Enter.
-
Press Ctrl + ] to quit the KVM guest console.
-
Type
resetand press Enter to reset the terminal.
2. Configuration
-
Log in as delta on the tbhf-kvm-mrm server.
-
Enter the following commands at a Command Line.
# Make vm start on boot. sudo virsh autostart --domain tbhf-doc-mrm sudo virsh list --all --autostart sudo virsh list --all sudo systemctl status libvirtd sudo ls -al /home/kvm/images sudo qemu-img info --force-share /home/kvm/images/tbhf-doc-mrm.qcow2
3. Console
-
Log in as delta on the tbhf-kvm-mrm server.
-
Type
sudo virsh console --domain tbhf-doc-mrmand press Enter. -
Press Enter to log in.
-
Do your thing.
-
Press Ctrl + ] to quit the KVM guest console.
4. VM Configuration
-
Log in as delta on the tbhf-kvm-mrm server.
-
Type
sudo virsh console --domain tbhf-doc-mrmand press Enter. -
Press Enter.
-
Log in as delta on the tbhf-doc-mrm server.
-
Type
ip aand press Enter. -
Note: Temporarily enable DNS and HTTP services for the IP address assigned by the DHCP server on the SMRU-EFW-MRM firewall.
-
Enter the following commands at a Command Line with root privileges.
ip a scp -p delta@10.10.1.2:/media/Windows/Software/_Delta/delta-linux-tools-1.9.1-1-all.deb . dpkg -i delta-linux-tools-1.9.1-1-all.deb delta config apt # Configure apt repositories. delta config bash # Configure bash shell for each user. delta config cron # Configure cron jobs. delta config editor # Set default editor to vim.tiny for each user. delta config kernel net.ifnames=0 # Disable consistent network device names. delta config locale # Configure locale settings. delta setup inventory # Install and configure inventory. delta setup openssh # Install and configure openssh server. delta setup sudo # Install and configure sudo for each user. delta setup timezone # Install and configure time zone. delta setup systemd-ethernet 10.10.1.4 10.10.1.170 10.10.1.1 smru.shoklo-unit.com -
Restart the virtual machine.
-
Press Ctrl + ] to quit the KVM guest console.
-
Log in as delta on the tbhf-doc-mrm server using PuTTY.
-
Note: Disable DNS and HTTP services for the IP address assigned by the DHCP server on the SMRU-EFW-MRM firewall.
-
Enter the following commands at a Command Line.
ip a ip link list sudo systemctl --type service ls -al /etc/resolv.conf cat /etc/resolv.confsudo apt-get update sudo apt-get upgrade sudo apt-get dist-upgrade sudo apt-get autoremove sudo apt-get autoclean cat /etc/debian_version df sudo apt-get --yes install net-tools # Contains ifconfig command. sudo delta setup snmp-server 10.10.1.12 # Install and configure snmp server. sudo delta setup vim # Install and configure vim editor for each user. sudo grep -Ei --color=always "bad |brok|cann|crit|deni|err:|erro|fail|igno|insu|leak|lost|miss|not |such|unab|warn" /var/log/syslog sudo zgrep -i 'systemd-networkd-wait-online' /var/log/syslog* sudo zgrep -i 'lost carrier' /var/log/syslog*
5. Documentation
-
Enter the following commands at a Command Line.
sudo apt-get --yes install devscripts # Needed for checkbashisms. sudo apt-get --yes install gawk # Needed for ansi2html. sudo apt-get --yes install make sudo apt-get --yes install python3 sudo apt-get --yes install shellcheck # Needed for shellcheck. sudo apt-get --yes install colorized-logs # Needed for ansi2html, used by search. sudo delta setup apache # Install and configure apache http server. sudo delta setup fonts sudo delta setup jre-headless # Needed for diagrams support. sudo delta setup php # Needed for search. sudo delta setup ruby # Needed for asciidoctor. sudo delta setup share SMRU-SRV Teams$ # Add Teams$ (itadmin) share to /etc/fstab. sudo delta setup vim # Install and configure vim editor for each user. sudo delta config vim powershell # Add powershell syntax highlighting. sudo delta setup asciidoctor sudo delta update asciidoctor which asciidoctor asciidoctor-pdf asciidoctor --version asciidoctor-pdf --version sudo delta setup git mkdir -p ~delta/github/git/delta-software-labs cd ~delta/github/git/delta-software-labs git clone https://delta-software-labs@github.com/delta-software-labs/Documentation.git cd ~delta/github/git/delta-software-labs/Documentation make clean; make make check
6. GitHub Repositories
-
Enter the following commands at a Command Line.
sudo delta setup git mkdir -p ~delta/github/git/delta-software-labs cd ~delta/github/git/delta-software-labs git clone https://delta-software-labs@github.com/delta-software-labs/ANC-Application.git git clone https://delta-software-labs@github.com/delta-software-labs/Documentation.git git clone https://delta-software-labs@github.com/delta-software-labs/Linux-Tools.git git clone https://delta-software-labs@github.com/delta-software-labs/Windows-Tools.git
7. Network Monitoring
-
Log in as delta on the tbhf-doc-mrm server using PuTTY.
-
Enter the following commands at a Command Line.
# Install required packages. sudo apt-get --yes install parallel # Contains parallel command used by scan-servers script. sudo delta setup apache # Install and configure apache http server. sudo crontab -e -
Add the following lines to the crontab file.
# Every minute: Monitor servers. */1 * * * * /usr/local/bin/scan-servers
8. SMRU Repository
-
Enter the following commands at a Command Line.
sudo delta setup apache # Install and configure apache http server. sudo delta setup gnupg /root/.gnupg/delta.key sudo delta setup repository cd /var/www/html/debian sudo reprepro export # Use level 2 password. packages=$(ls /home/kvm/delta-*.deb) for package in "$packages"; do sudo reprepro includedeb delta $package; done # Use level 2 password. cd -sudo delta config apt tbhf-doc-mrm sudo dpkg --purge delta-linux-tools sudo apt-get --yes install delta-linux-tools