Инструменты пользователя

Инструменты сайта


os:centos

CentOS

CentOS 7

# Обновление
yum update -y
#Поставить mlocate и mc
yum install mc mlocate -y
# Задать статический IP
nmtui
# Показать IP-адрес:
hostname -I
# Показать информацию о системе
hostnamectl
rpm --query centos-release

Hyper-V Linux Integration Services

curl -O -J https://download.microsoft.com/download/6/8/F/68FE11B8-FAA4-4F8D-8C7D-74DA7F2CFC8C/lis-rpms-4.2.3-4.tar.gz
tar xvzf lis-rpms-4.2.3-4.tar.gz
cd LISISO
./install.sh
reboot
rm lis-rpms-4.2.3-4.tar.gz
rm -rf LISISO

Очистка раздела /boot

# Посмотреть ядра в системе
rpm -q kernel
# Очистить (оставить 2 ядра)
yum install yum-utils
package-cleanup --oldkernels --count=2
# Внести в конфиг, чтобы было одновременно не больше 2 ядер
sed -i '/installonly_limit=/c installonly_limit=2' /etc/yum.conf

https://linuxconfig.org/how-to-remove-old-unused-kernels-on-centos-linux

Установить MATE

Installing MATE on CentOS 7 from the command line

If you want to run MATE on CentOS 7, I'd suggest opting for the «minimal» package option during initial installation (or at least not selecting an alternative desktop environment).

# Install the epel repository:
yum install epel-release
# Install the X Window System:
yum groupinstall "X Window system"
# Install the MATE desktop:
yum groupinstall "MATE Desktop"
# Change systemd default.target to graphical.target:
ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target
# Switch to your new desktop environment:
systemctl isolate graphical.target

dracut warning: You might want to regenerate your initramfs

Предыстория: VM c Битриксом мигрировала с ESXi 5.5 на Hyper-V 2019 c помощью Starwind V2V converter, а потом диск был сконвертирован из .vhd в .vhdx. После запуска система пишет, что
dracut-initqueue Warning: /dev/disk/by-label/bxRoot does not exist и, после попытки продолжить загрузку,
dracut-initqueue Warning: You might want to regenerate your initramfs

Так как в загрузочном меню ядро было 3.10.0-1160.76.1.el7.x86_64, поэтому надо перезагрузить VM, выбрать пункт загрузочного меню со словом rescue, залогиниться под рутом, выполнить команду

dracut -f /boot/initramfs-3.10.0-1160.76.1.el7.x86_64.img 3.10.0-1160.76.1.el7.x86_64

и перезагрузиться. Дальше можно спокойно обновлять систему, чистить /boot от старья и т. д.

How to recover or rebuild initramfs in CentOS 7 Linux
Centos 7 dracut boot recovery

CentOS 6

Veeam Backup & Replication prerequisites

yum update

For proper Linux file system indexing, Veeam Backup & Replication requires several utilities to be installed on the VM: mlocate, gzip, and tar.

yum install mlocate -y

Ссылки

os/centos.txt · Последнее изменение: 29.03.2023 13:34 — viacheslav

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki