Reinstall grub after raid crash

Well today a client with hetzner server have a problem. Both hard from raid have failed. One is lost forever and one is with bad. After I have run recover hard for rebuild in raid the server still didn’t boot up. My /dev/sda was faulty and replaced but server was stcuk and didn’t start . I have to rebuild grub , the hetzner wiki have a tutorial but is not exactly . So .. in order to start the server reboot in rescue system. Then my partition table was something like this /dev/md1 ( /boot ) /dev/md3 (/var) and /dev/md4 (/) I run this in this order mount /dev/md4 /mnt mount /dev/md1...
read more

Make apt-get use IPv4 instead of IPv6

I have try today to run some apt-get update and it take some time to figure the ipv6 ip . So I wanted to not use ipv6. The fix is to un comment the line 54 from this file /etc/gai.conf precedence ::ffff:0:0/96 100 after this all run smooth.
read more

Manually unban ip blocked by fail2ban

Well if you have an ip banned then you should deleted as this iptables -L --line-numbers And then run this where chain-name you should replace it with what name you have there for example fail2ban-ssh  iptables -D chain-name 2
read more

How To Restore a cPanel Server from old hard drive

First of all this is a tutorial that you run it on your risk . Any way if you are in this situation a reinstall was done, and you have a snapshot mounted or old hard drive . Also this is in case that you don’t have backup from whm and you can’t import them . We are assuming that your old hard drive is mounted as ‘old-drive’ We sync important configuration from etc . Please after this don’t log out and try to log on your server . Here we re sync also the shadow this mean you will log using old password cd /old-drive/etc/ rsync -avHz user* trueuser* domainips secondarymx...
read more

ERROR: `/var/tmp/geoip/configure’ failed

I am trying to install geoip using pecl install geoip And I get this error “ERROR: `/var/tmp/geoip/configure’ failed” The solution is to install yum install geoip-devel
read more

How to enable Core Dumps in CentOS

To enable core dumps for all daemon, please follow these steps: Edit the /etc/profile. At line 26 of the file, replace this line: ulimit -S -c 0 > /dev/null 2>&1 with this line: ulimit -c unlimited >/dev/null 2>&1 Replace this line (around line 138 ) in /etc/init.d/functions ulimit -S -c 0 >/dev/null 2>&1 with this: ulimit -S -c ${DAEMON_COREFILE_LIMIT:-0} >/dev/null 2>&1 Enable core-dumping globally by editing the /etc/sysconfig/init file and adding the line: DAEMON_COREFILE_LIMIT=’unlimited’ Enable it for specific daemons by adding this line in the...
read more

« Previous Entries