Proxmox setup

This commit is contained in:
Sergey Mazein
2025-06-19 10:41:49 +03:00
parent a178c4fe87
commit 51136e804c
3 changed files with 254 additions and 0 deletions
+23
View File
@@ -28,6 +28,26 @@ sudo systemctl enable zabbix-agent
sudo /etc/init.d/zabbix-agent status
#zabbix_agentd -V
echo -e "${C_LGn}Autoupdate IPTable rules ...${RES}"
tee /etc/systemd/system/iptables-restore-custom.service > /dev/null << EOF
[Unit]
Description=Restore iptables rules after Proxmox Firewall
After=pve-firewall.service
Wants=network-online.target
ConditionPathExists=/etc/iptables/rules.v4
[Service]
Type=oneshot
ExecStart=/bin/sh -c '/sbin/iptables-restore < /etc/iptables/rules.v4'
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
EOF
systemctl enable --now iptables-restore-custom.service
echo -e "${C_LGn}Installing Node Exporter ...${RES}"
cd $HOME && \
wget https://github.com/prometheus/node_exporter/releases/download/v1.8.2/node_exporter-1.8.2.linux-amd64.tar.gz && \
@@ -79,6 +99,9 @@ chmod 755 /usr/local/bin/renew-pve-certs.sh
mkdir /var/lib/vz/extDB && chmod -R 777 /var/lib/vz/extDB
mkdir /var/lib/vz/temp
echo "tmpdir: /var/lib/vz/temp" >> /etc/vzdump.conf
echo "Меняем часовой пояс на Europe/Moscow"
sudo timedatectl set-timezone Europe/Moscow
date