Month: October 2009

Logrotate domalogs

Adding a logrotate script to clean up apache will normally take care of this problem. The default logrotate script is either /etc/logrotate.d/apache or /etc/logrotate.d/httpd. vim /etc/logrotate.d/httpd or apache insert the code below: /usr/local/apache/logs/*log /usr/local/apache/domlogs/*.com /usr/local/apache/domlogs/*.net /usr/local/apache/domlogs/*.org /usr/local/apache/domlogs/*.edu /usr/local/apache/domlogs/*.it /usr/local/apache/domlogs/*.dk /usr/local/apache/domlogs/*.de /usr/local/apache/domlogs/*.nz /usr/local/apache/domlogs/*.si /usr/local/apache/domlogs/*.in /usr/local/apache/domlogs/*.ie /usr/local/apache/domlogs/*.fr /usr/local/apache/domlogs/*.es /usr/local/apache/domlogs/*.br /usr/local/apache/domlogs/*.ar /usr/local/apache/domlogs/*.jp /usr/local/apache/domlogs/*.uk /usr/local/apache/domlogs/*.ru /usr/local/apache/domlogs/*.at /usr/local/apache/domlogs/*.nl /usr/local/apache/domlogs/*.us /usr/local/apache/domlogs/*.gov…


How to Disable ping

How to Disable ping to server? To disable ping echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all To enable ping echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_all


How to Kill Zombie Process

How to Kill Zombie Process in server?? This command will be useful to kill php zombie process. ps -ef | grep mailnull | grep -v grep | awk ‘{print “kill -9″, $2}’ | sh replace mailnull with particular proces name which has zombie


DDos check

you can modify the command with the most used attacking words like wget, etc find /usr/local/apache/domlogs/ -exec egrep -H ‘(wget|curl|lynx|wget)%20? {} \; tail -100000 /usr/local/apache/logs/access_log | awk ‘{print $1}’ | sort | uniq -c |sort -n netstat -tn 2>/dev/null | grep :80 | awk ‘{print $5}’ | cut -f1 -d: | sort | uniq -c…


How To Enable Root Ubuntu

How To Enable Root (Super) User in Ubuntu If you are new to Ubuntu and have been using other distros like Fedora or openSUSE before, then you may find it frustrating that when you issue the “su” command it will result to authentication failure. By default, access to root account password is disabled in Ubuntu…


SCP

Copy files securely from host to host with SCP SCP is a really handy utility for copying files to or from your machine to another host over SSH. Usage: scp /tmp/myfile user@otherhost:/tmp/ Will send /tmp/myfile over to /tmp/ on otherhost scp user@otherhost:/etc/passwd ~/ Will copy /etc/passwd from otherhost to my home directory (~/) Like everything…


Creating an MD5 on Linux

An MD5 is a type of Hash, also, a Checksum. An MD5 hash is a one way verification sum which can be used to verify a string or contents of a file. Once you have a file and an MD5 checksum, the recipient of the file can also perform an MD5 calculation to ensure that…


cPanel rebuild all DNS zones

From: http://www.adamsinfo.com/page/5/ I recently had my datacenter set up a new cPanel/Fantastico server for our hosting platform. Unfortunately they spelled the site name incorrectly which caused a load of problems. You can change the hostname with relative ease from within the basic setup section, however once the wrong nameservers are specified and domains are generated…


Troubleshoot Linux Kernel Panics

From: rhcelinuxguide.wordpress.com and other sources. Overview: There are two main kinds of kernel panics: 1) Hard Panic (also known as Aieee! ) 2) Soft Panic (also known as Oops ) Most panics are the result of unhandled processor exceptions in kernel code, such as references to invalid memory addresses and can also be caused by…


Disable cpanellogd and cpbackup running at the same time

Cpanellogd (log processing) and cpbackup (Backups) consumes lots of CPU power of server. Hence, it is not advisable to run cpanellogd and cpbackup at the same time on shared server. By default they will run at the same time. However, you can prevent it happening by following below steps: 1. Login to WHM. 2. Click…