diff options
| author | Your Name <you@example.com> | 2024-12-21 15:11:19 +0800 |
|---|---|---|
| committer | Your Name <you@example.com> | 2024-12-21 15:11:19 +0800 |
| commit | be3dde6ce14698c5818f21f65037a4beef1199cf (patch) | |
| tree | 79dbd14ec4a07d6b41561931d15a4c03406d5836 /others/vm3/.config | |
| parent | 47303626554d42356dfd1b61ad3f9de97929cc87 (diff) | |
betavm3
Diffstat (limited to 'others/vm3/.config')
| -rwxr-xr-x | others/vm3/.config/init/install_packages.sh | 12 | ||||
| -rwxr-xr-x | others/vm3/.config/init/make_rootkey.sh | 4 |
2 files changed, 16 insertions, 0 deletions
diff --git a/others/vm3/.config/init/install_packages.sh b/others/vm3/.config/init/install_packages.sh new file mode 100755 index 0000000..d5ca81f --- /dev/null +++ b/others/vm3/.config/init/install_packages.sh | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | #install packages | ||
| 4 | packages=("nc" "htop" "wireguard-tools" "bind-utils" "tmux" "net-tools" "curl" "mlocate" "dnsmasq" "qemu-kvm" "libvirt" "libvirt-daemon-kvm" "virt-install" "virt-manager" "genisoimage" "bc") | ||
| 5 | |||
| 6 | for package in "${packages[@]}"; do | ||
| 7 | if ! rpm -q "$package" &> /dev/null; then | ||
| 8 | sudo dnf install -y "$package" | ||
| 9 | fi | ||
| 10 | done | ||
| 11 | |||
| 12 | sudo systemctl enable --now libvirtd | ||
diff --git a/others/vm3/.config/init/make_rootkey.sh b/others/vm3/.config/init/make_rootkey.sh new file mode 100755 index 0000000..5d07472 --- /dev/null +++ b/others/vm3/.config/init/make_rootkey.sh | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | sudo mkdir -p ~/keys | ||
| 4 | ssh-keygen -t ed25519 -f ~/keys/k1 -N "" | ||
