Feeds:
Posts
Comments

Archive for the ‘SCRIPT’ Category

You can use the below scripts as cron job to restart the service if it was down. #!/bin/bash # RHEL / CentOS / Fedora Linux restart command RESTART=”/etc/rc.d/init.d/httpd restart” #path to pgrep command PGREP=”/usr/bin/pgrep” # Httpd daemon name, # Under RHEL/CentOS/Fedora it is httpd # Under Debian 4.x it is apache2 HTTPD=”httpd” # find httpd [...]

Read Full Post »

“mysqlreport makes a friendly report of important MySQL status values. mysqlreport transforms the values from SHOW STATUS into an easy-to-read report that provides an in-depth understanding of how well MySQL is running. mysqlreport is a better alternative (and practically the only alternative) to manually interpreting SHOW STATUS.” Installation: root@server [~downloads]# wget hackmysql.com/scripts/mysqlreport root@server [~downloads]#chmod 755 [...]

Read Full Post »

I was reading through my post on how to virus scan ftp uploads, and I realized, I never mentioned how to setup ClamAV, the antivirus software. So, here we go:1. Log into you WHM control panel as root 2. Go to Cpanel >> Manage Plugins 3. Click on clamavconnector to install and then click Save [...]

Read Full Post »

http://download1.swsoft.com/Plesk/Plesk8.6/Doc/en-US/plesk-8.6-unix-administrators-guide/index.htm?fileName=52756.htm

Read Full Post »

Installing ffmpegh: cd /root wget http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.e l5.rf.i386.rpm rpm -vi rpmforge-release-0.3.6-1.el5.rf.i386.rpm rm -f /root/rpmforge-release-0.3.6-1.el5.rf.i386.rpm yum -y install ffmpeg ffmpeg-devel mplayer mencoder flvtool2 libogg libvorbis lame yum clean all Installing ffmpeg-php wget http://internap.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.3.t bz2 tar jxf ffmpeg-php-0.5.3.tbz2 cd ffmpeg-php-0.5.3 /usr/local/bin/phpize ./configure make make install echo “extension=ffmpeg.so” >> /usr/local/lib/php.ini cd /root rm -rf ffmpeg-php-0.5.3 ffmpeg-php-0.5.3.tbz2 service httpd restart [...]

Read Full Post »

Dos attack…

A simple bash script to block IP address using iptables and send you the details about the IPs to your mail-id. #!/bin/bash ARG_VAL=`hostname`; netstat -apn | grep TIME_WAIT |awk ‘{print $5}’|awk -F\: ‘{print $1}’ | sort | grep -v 127.0.0.1 | grep -v 0.0.0.0 | awk ‘{ if ($1 > 7) print $1}’> s.txt; for [...]

Read Full Post »

It controls number of connections to the server from single ip, and blocks ip address if there are more connections. #!/usr/bin/perl #################### # blocks ip if there are > $allowed connections ################### # delay betwens checks (in sec) $delay = 60; # number of allowed connections from single ip $allowed = 150; open(STDERR, “>load.log”); print [...]

Read Full Post »

A script to find the domains having more than 100MB log file size. ================================================ This is a very easy way to find out the domains which are having big file size and split it as per the need. Here, the script can be used to list the domains having more than 100MB log file. #!/bin/bash [...]

Read Full Post »

Installing asp in linux server: =================================== Installing ASP in Linux server(cPanel) is a very easy task. Just follow the below steps: ===================== wget http://layer1.cpanel.net/apache-asp.sea sh apache-asp.sea rm apache-asp.sea vi /usr/local/apache/conf/httpd.conf Add the following lines to the file: ========================= SetHandler perl-script PerlModule Apache::ASP PerlHandler Apache::ASP PerlSetVar Global . PerlSetVar StateDir /tmp/asp Hold down CTRL and press [...]

Read Full Post »

The above script can let you to scan the server in enough level. ====================================== w top -c ps aux cd /proc for i in `seq 1 33000`; do test -f $i/cmdline &&(cat $i/cmdline; echo $i); done df -h du -sch /var/spool/mqueue/ du -sch /var/spool/exim/input grep attackalert /var/log/messages iptables -I INPUT -p tcp -s -j DROP [...]

Read Full Post »

Older Posts »

Follow

Get every new post delivered to your Inbox.