scripts bash <(wget -qO- din235.ru/scripts/time-astra.sh) bash <(wget -qO- din235.ru/scripts/time-centos7.sh) bash <(wget -qO- din235.ru/scripts/zabbix-centos7.sh) bash <(wget -qO- din235.ru/scripts/zabbix-centos6.sh) ---- Zabbix CentOS 7 rpm -Uvh https://repo.zabbix.com/zabbix/6.4/rhel/7/x86_64/zabbix-release-6.4-1.el7.noarch.rpm yum clean all yum update zabbix-agent vim /etc/zabbix/zabbix_agentd.conf systemctl restart zabbix-agent --- Zabbix CentOS 6 service zabbix-agent stop service zabbix-agent start --- Zabbix AltLinux apt-get update apt-get install zabbix-agent vim /etc/zabbix/zabbix_agentd.conf systemctl enable --now zabbix_agentd --- netsh advfirewall firewall add rule name="Open Zabbix agentd port 10050 inbound" dir=in action=allow protocol=TCP localport=10050 netsh advfirewall firewall add rule name="Open Zabbix agentd port 10050 outbound" dir=out action=allow protocol=TCP localport=10050 netsh advfirewall firewall add rule name="Open Zabbix trapper port 10051 inbound" dir=in action=allow protocol=TCP localport=10051 netsh advfirewall firewall add rule name="Open Zabbix trapper port 10051 outbound" dir=out action=allow protocol=TCP localport=10051 --- GPING https://github.com/orf/gping?tab=readme-ov-file // Allow ping netsh advfirewall firewall add rule name="Allow ICMPv4" protocol=icmpv4:8,any dir=in action=allow netsh advfirewall firewall add rule name="Allow ICMPv6" protocol=icmpv6:8,any dir=in action=allow --- firewall-cmd --permanent --zone=public --add-port=10050/tcp firewall-cmd --permanent --zone=public --add-port=10050/udp firewall-cmd --reload iptables -xvn -L --- iptables -t filter -A INPUT -p tcp -s 213.156.129.38 --dport 10050 -j ACCEPT iptables -t filter -A INPUT -p udp -s 213.156.129.38 --dport 10050 -j ACCEPT service iptables save --- uninstall zabbix agent service from Windows: sc delete "Zabbix Agent" --- Linux useradd -G wheel -p password -s /bin/bash name passwd name --- AltLinux Serv Add DISK blkid #show UUID lsblk #show parts vim /etc/fstab #add correct UUID #UUID=JFLEFLEOIMA /mnt/nas ntfs defaults 0 0 vim /etc/zabbix/zabbix_agent.conf systemctl enable --now zabbix_agentd.service apt-get remove anydesk delete all anydesk folders apt-get remove rustdesk delete all rustdesk folders epm play anydesk epm play rustdesk --- Zabbix SW Check AllowKey = System.Run[*] EnableRemoteCommands=1 --- #LDAP passwd read username ldappasswd -x -W -D "cn=Manager,dc=tsi,dc=ru" -S uid=$username,ou=Staff,dc=tsi,dc=ru --- tar -czvf name.tar.gz foldername tar -xvf name.tar.gz --- tar -czvf $(hostname -s).tar.gz /etc/nginx scp :$HOME/ .tar.gz ~/ --- CentOS 7 upd repo EOL sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo --- Clean linux cache: free -h vmstat PageCache (priority): sync; echo 1 > /proc/sys/vm/drop_caches sync; echo 1 | sudo tee /proc/sys/vm/drop_caches inode & dentrie: sync; echo 2 > /proc/sys/vm/drop_caches inode & dentrie & PageCache: sync; echo 3 > /proc/sys/vm/drop_caches --- disk: error: dmesg df -h, du, ncdu sort: du / | sort -nr | cut -f2- | xargs du -hs --- disk grow RHEL echo 1 > /sys/block/sda/device/rescan fdisk /dev/sda Command (m for help): d Partition number (1,2, default 2): 2 Command (m for help): n Select (default p): p Partition number (2-4, default 2): 2 Enter Enter Command (m for help): t Partition number (1-2): 2 Hex code (type L to list all codes): 8e Command (m for help): w partx -u /dev/sda2 pvresize /dev/sda2 lvdisplay #Found root part lvextend -l +100%FREE /dev/XXXXXXX/root xfs_growfs /dev/XXXXXXX/root --- copy file name to name+date cp demo.tar.gz demo-$(date +%y%m%d).tar.gz --- Gold Centos 8 dnf install -y epel-release && dnf install -y ncdu htop iotop vim mc yum-utils telnet net-tools wget tree traceroute bind-utils zip Gold Ubuntu apt install -y ncdu htop iotop vim mc telnet net-tools wget tree traceroute zip --- Curl: curl --resolve example.com:443:127.0.0.1 https://example.com/ --header "Host: diff.example.com"