53 lines
1.3 KiB
Markdown
53 lines
1.3 KiB
Markdown
# Server Ubuntu
|
|
|
|

|
|
|
|
## Instalace
|
|
|
|
1. [Iso image](https://ubuntu.com/download/server)
|
|
|
|
1. Vytvořit VM -> nainstalovat
|
|
|
|
1. Po instalaci doplnit `.bashrc`
|
|
```shell
|
|
PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n$ '
|
|
alias lo='exit'
|
|
```
|
|
|
|
1. sudo bey hesla `sudo visudo`
|
|
``` shell
|
|
# Allow user maska to execute sudo without password
|
|
maska ALL=(ALL) NOPASSWD:ALL
|
|
```
|
|
|
|
## [Qemu-guest-agent](https://pve.proxmox.com/wiki/Qemu-guest-agent)
|
|
1. Povolit pro VM agenta v GUI `VM / Options / GEMU Guest Agent`
|
|
nebo pomocí CLI `qm set VMID --agent 1`
|
|
|
|
1. Nainstalovat agenta do VM
|
|
```shell
|
|
sudo apt-get install qemu-guest-agent
|
|
```
|
|
|
|
1. Spustit agenta
|
|
```shell
|
|
sudo systemctl start qemu-guest-agent
|
|
```
|
|
|
|
1. Nastavit autostart (pokud není)
|
|
```shell
|
|
sudo systemctl enable qemu-guest-agent
|
|
```
|
|
## DNS
|
|
Zatím nevím, proč nefunguje korektně. Nastavím `/etc/resolv.conf` ručně.
|
|
původně byl symlink: `/etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf`
|
|
|
|
```shell
|
|
sudo rm -f /etc/resolv.conf
|
|
sudo cat > /etc/resolv.conf << EOF
|
|
nameserver 192.168.88.101
|
|
nameserver 192.168.88.1
|
|
domain habad.eu
|
|
search habad.eu
|
|
EOF
|
|
``` |