Перейти до основного вмісту

Публікації

Показано дописи з листопад, 2022

Налаштування apcupsd для зупинення VM в EXSi (версія 2)

Це оновлення версія попередньої публікації https://onchigor.blogspot.com/2016/07/apcupsd-vm-exsi.html Але цього разу використав досвід з https://gist.github.com/gschora/a10f0692e6e691aa1af8 https://habr.com/ru/sandbox/101324/ Послідовність викладена так ################################################################# # these are instructions for automating the suspend and shutdown of esxi vm's # and host in case of a power failure. ################################################################## 0# make a new VM and install Ubuntu-Server on it 1# install apcupsd apt-get install apcupsd 2# configure /etc/apcupsd/apcupsd.conf 3# enable apcupsd vim /etc/default/apcupsd ISCONFIGURED=yes 4# restart apcupsd sudo service apcupsd restart ------------------------------------------------- 5# enable ssh on esxi configuration-tab - security profile - properties (right upper corner) 6# copy shutdown_esxi.sh on esxi into datastore e.g. "/vmfs/volumes/MyDataStore/scripts 7# make the

Налаштування сервера Ubuntu 22.04 тільки для відправки пошти

Потрібно встновити postfix sudo apt update sudo apt install mailutils Потім має запуститсь утиліта для мінімального налаштування postfix. Якщо вона не стартує, то її можна запустити вручну sudo dpkg-reconfigure postfix Напершому ж екрані потрібно вибрати один режим роботи 1. No configuration: Should be chosen to leave the current configuration unchanged. 2. Internet site: Mail is sent and received directly using SMTP. 3. Internet with smarthost: Mail is received directly using SMTP or by running a utility such as fetchmail. Outgoing mail is sent using a smarthost. 4. Satellite system: All mail is sent to another machine, called a 'smarthost', for delivery. 5. Local only: The only delivered mail is the mail for local users. There is no network. Для потреб, що сервер тільки надсилав поштові повідомлення локально, то треба вибрати "Internet site". Але якщо потрібно, щоб сервер додатково надсилав поштові повідомлення на зовнішній поштовий сервер, то режим "Internet w

Перевірка сервісу SMB у Nagios XI

Для перевірки використав плагін check_smb3 https://exchange.nagios.org/directory/Plugins/System-Metrics/File-System/SMB/check_smb3/details Завантажив код плагіна, потім додав його до плагінів у Nagios XI, потім додав у команди. Потім налаштував перевірку сервіса. На Ubuntu Server 22 треба було ще встановити smbclient, і виправити трохи код. Бо команда "if [[ ]] then" чомусь не сприймається, тому зробив три "if [ ] then".

Виправлення в CentOS 8 помилки "Entering emergency mode. Exit the shell to continue."

Після некоретного вимикання живлення, CentOS не завантажується і отримаємо помилку "Entering emergency mode. Exit the shell to continue." Type "journalctl" to view system logs. You might want to save "/run/initramfs/rdsosreport.txt" to a usb stick or /boot after mounting them and attach it to a bug report. Для виправлення використав команду xfs_repair -v -L /dev/dm-0 Потім перезавантажив через reboot і CentOS 8 завантижилось без помилок. Пораду знайшов тут https://forums.centos.org/viewtopic.php?t=73689