virsh autostart srv_name
Domain srv_name marked as autostarted
Warning: the ECDSA host key for ‘xxx.xxx.com’ differs from the key for the IP address 192.168.111.1
Warning: the ECDSA host key for ‘xxx.xxx.com’ differs from the key for the IP address 192.168.111.1
Are you sure you want to continue connecting (yes/no)
ssh-keygen -R 192.168.111.1
masquerade iptables
iptables -t nat -A POSTROUTING -j MASQUERADE
default gateway linux
route add default gw 192.168.1.2 eth0
recover lvm metadata
Make sure you backups and make sure uuid is correct:
ls -l /etc/lvm/archive/
cat less /etc/lvm/archive/vg_test.vg
physical_volumes {
pv0 {
id = “gT7Kw0-bVoF-8reX-QVYs-9bvh-PMdo-bU5Vzo”
pvcreate –uuid “gT7Kw0-bVoF-8reX-QVYs-9bvh-PMdo-bU5Vzo” \
–restorefile /etc/lvm/archive/vg_test.vg
vgcfgrestore -f /etc/lvm/archive/vg_test.vg vg_test
vgchange -ay vg_test
Vim: Warning: Output is not to a terminal
Ctrl-Z
pkill -9 -f vim
find or check lvm metadata
pvck -v -d /dev/sda
Found label on /dev/sda, sector 1, type=LVM2 001
Found text metadata area: offset=4096, size=1044480
centos 7 rc.local not working
chmod +x /etc/rc.d/rc.local
systemctl enable rc-local
systemctl start rc-local or jus try reboot server
linux extract msi file
7z e some_file.msi
mysqlcheck if mysql go away
for i in `mysql -B -e "show databases"`; do mysqlcheck --check --auto-repair "$i" ; done
fedora install unrar
sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install unrar
E297: Write error in swap file vim
Its means you out of disk space, so df -h
Than delete some old logs:
find /var -type f -print0 | xargs -0 du -s | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {}
csf enable port
vi /etc/csf/csf.conf
check TCP_IN and TCP_OUT port list and restart csf -r
csf whitelist ip command line
csf -a IP
csf -a IP/24
directadmin panel force ssl
directadmin ssl_port
ssl_cipher=HIGH:!aNULL:!MD5
ssl_port=XXXX
XXXX your port number