Sebelum masuk ke tutorial, berikut cara mount image librenms berbentuk ova yang akan di add disk ke vm proxmox.
pertama-tama, download di proxmox, path bebas
axel https://github.com/librenms/packer-builds/releases/download/21.2.0/librenms-ubuntu-20.04-amd64.ova
kemudian estrak isinya
tar -xvf librenms-ubuntu-20.04-amd64.ovakemudian convert menjadi qcow2
qemu-img convert -f vmdk librenms-ubuntu-20.04-amd64-disk001.vmdk -O qcow2 disk-librenms.qcow2
setelah itu silahkan bikin VM seperti biasa, disk bebas, kecil aja toh nanti juga didelete. Setelah itu silahkan di delete disk nya. kemudian lakukan add-disk dari file disk-librenms.qcow2 yang abis diconvert tadi
qm importdisk 104 disk-librenms.qcow2 TAMMUZsebagai catatan, di sini saya bikin VM dengan ID 104 dan dengan nama LVM TAMMUZ
setelah itu, sesuai arahan dari situs ini : https://docs.librenms.org/Installation/Images/
ganti passwordnya, config netplan sbb :
network:
version: 2
ethernets:
ens18:
addresses:
- 103.146.xxx.xxx/29
gateway4: 103.146.xxx.xxx
nameservers:
addresses: [ 103.146.xxx.xxx ]
netplan apply
pointing IN A biar lebih mudah diakses lewat domain anda.
sekarang langkah membuat certbot
pertama tama install snapd
apt install snapd -y
root@librenms:~# snap install corecore 16-2.51.1 from Canonical✓ installed
trus buat mastiini ada update ngga, caranya snap refresh core abis itu, install certbot caranya :
root@librenms:~# snap install --classic certbot
snap "certbot" is already installed, see 'snap help refresh'
ln -s /snap/bin/certbot /usr/bin/certbot
kemudian buat virtualhost, edit file /etc/nginx/sites-available/default
Tambahkan isinya di paling bawah sbb :
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name nms1.ispanda.net.id;
# access_log /opt/librenms/logs/access_log;
# error_log /opt/librenms/logs/error_log;
root /opt/librenms/html;
index index.php;
charset utf-8;
gzip on;
gzip_types text/css application/javascript text/javascript application/x-javascript image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ [^/]\.php(/|$) {
fastcgi_pass unix:/run/php-fpm-librenms.sock;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi.conf;
}
location ~ /\.(?!well-known).* {
deny all;
}
ssl_certificate /etc/letsencrypt/live/nms1.ispanda.net.id/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/nms1.ispanda.net.id/privkey.pem; # managed by Certbot
}
root@librenms:~# /etc/init.d/nginx restartRestarting nginx (via systemctl): nginx.service.
certbot --nginx
ikuti petunjuknya hingga selesai.
root@librenms:~# /etc/init.d/nginx restartRestarting nginx (via systemctl): nginx.service.
kemudian akses https://nms.domainanda.com
0 comments:
Post a Comment