grep -e ‘-m’
Monthly Archives: October 2015
Webmin: Error – Bad Request This web server is running in SSL mode. Try the URL instead.
sed --in-place "s/ssl=1/ssl=0/g" /etc/webmin/miniserv.conf && service webmin restart
docker: systemd[]: Device dev-disk-by\x2duuid-3f58c27b\x2d4393\x2d4c4e\x2daad0\x2d989778508302.device appeared twice with different sysfs paths /sys/devices/virtual/block/loop0 and /sys/devices/virtual/blo
If you are using systemd and have this issue: docker exec -it bash cannot start a shell session
You can try remove docker, reinstall it and remove all images and containers.
Failed to obtain the transaction lock (logged in as: root).
You can try remove this lock: rm -rf /var/lib/rpm/.rpm.lock and reboot system.
docker inside openvz
veid=1000
vzctl create $veid –ostemplate centos-7-x86_64 –diskspace 20G
vzctl set $veid –features bridge:on –save
vzctl set $veid –netif_add eth0 –save
vzctl set $veid –netfilter full –save
vzctl set $veid –devnodes net/tun:rw –save
vzctl mount $veid
echo “JoinControllers=cpu,cpuacct,cpuset freezer,devices” >> /vz/root/$veid/etc/systemd/system.conf
vzctl start $veid
mount -t tmpfs tmpfs /sys/fs/cgroup
mkdir /sys/fs/cgroup/freezer,devices
mount -t cgroup cgroup /sys/fs/cgroup/freezer,devices -o freezer,devices
mkdir /sys/fs/cgroup/cpu,cpuacct,cpuset
mount -t cgroup cgroup /sys/fs/cgroup/cpu,cpuacct,cpuset/ -o cpu,cpuacct,cpuset
Install docker:
yum -y install docker-io
docker -d -s vfs
megacli turn off beep
MegaCli -AdpSetProp AlarmSilence -a0
Zabbix icmp pinger processes more than 75% busy
vi /etc/zabbix/zabbix_server.conf
StartPingers=100
service zabbix_server restart
R=dkim_lookuphost T=dkim_remote_smtp defer (-46) H=hostname [xx.xx.xx.xx]: SMTP error from remote mail server after end of data: 451 Local Error
Exim error: R=dkim_lookuphost T=dkim_remote_smtp defer (-46) H=hostname [xx.xx.xx.xx]: SMTP error from remote mail server after end of data: 451 Local Error or something like this: dkim_lookuphost T=dkim_remote_smtp defer (111): Connection refused
If you are getting this error on cPanel server, you should try disable dkim on your existing users accounts. To do this you can in your WHM panel or using API.
vzctl run on all containers
for i in `cat /proc/vz/veinfo | awk ‘{print $1}’|egrep -v ‘^0$’`; do echo “Container $i”; vzctl exec $i w ; done
grep line too long
grep -r text /some_folder if you are getting this error, fix:
find /some_folder -type f -print0 | xargs -r0 grep text “{}” +
linux add public key to server
If ssh-copy-id hangs, you can use this:
cat ~/.ssh/*.pub | ssh [email protected] '[[ ! -d .ssh ]] && mkdir .ssh && chmod 700 .ssh || cat >> .ssh/authorized_keys && echo "Key copied"
sed comment all lines
# comment
sed -i ‘s/^/#/g’ text_file.txt
#uncomment
sed -i ‘s/^#//g’ text_file.txt
linux check how many reserve memory for kdump
cat /proc/iomem | grep -i crash
grep -i ‘crash\|kdump’ /var/log/{boot,messages,secure}
yum: Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
sed -i "s/mirrorlist=https/mirrorlist=http/" /etc/yum.repos.d/epel.repo
yum [Errno 14] PYCURL ERROR 7 – “couldn’t connect to host” PYCURL ERROR 19 – “Given file does not exist”
Fix:
yum clean all