Thursday, October 1, 2009
Switch mail server from Postfix to qmail in Plesk
Execute the following:
#/usr/local/psa/admin/sbin/autoinstaller --select-release-current --install-component qmail
Then check "Plesk > home > Services management".
#/usr/local/psa/admin/sbin/autoinstaller --select-release-current --install-component qmail
Then check "Plesk > home > Services management".
Thursday, September 10, 2009
Install subversion in RHEL 4
#up2date -l subversion
#up2date -i subversion
Thats it ;)
# svnversion --version
#up2date -i subversion
Thats it ;)
# svnversion --version
Sunday, August 23, 2009
Script to install mod_evasive in a Linux server (cPanel/Plesk )
#Script to install mod_evasive
#!/bin/bash
#Apache version
HTTPD=`ps aux|grep http|grep bin|head -1|awk '{ print $11}'`
VERSION=`$HTTPD -V|grep version|awk '{print $3}'|cut -d"/" -f2|cut -d"." -f1`
echo -e "\e[0;31m Apache $VERSION \e[0m is running in the server"
APACHE_CONF=`$HTTPD -V|grep HTTPD_ROOT|cut -d"=" -f2|sed s/\"//gi`\/`httpd -V|grep SERVER_CONFIG_FILE|cut -d"=" -f2|sed s/\"//g`
if [ "`grep mod_evasive $APACHE_CONF`" ]
then
echo "mod_evasive is already installed in the server"
exit
else "Starting installation of mod_evasive"
fi
echo "Downloading source..."
cd /usr/src
wget http://www.zdziarski.com/projects/mod_evasive/mod_evasive_1.10.1.tar.gz
if [ -f /usr/src/mod_evasive_1.10.1.tar.gz ]
then
tar xfz mod_evasive_1.10.1.tar.gz
cd mod_evasive
else
echo -e "\e[0;31m ERROR: Could not download source \e[0m"
fi
# Need to install httpd-devel in Plesk server
if [ -d /usr/local/psa ]
then
yum install httpd-devel*
fi
APXS=`ps aux|grep http|grep bin|head -1|awk '{ print $11}'|sed s/httpd/apxs/g`
#Add the directives in apache conf
case $VERSION
in
1) $APXS -cia mod_evasive.c ;
echo \ >> $APACHE_CONF ;
echo DOSHashTableSize 3097 >>$APACHE_CONF;
echo DOSPageCount 6 >>$APACHE_CONF;
echo DOSSiteCount 100 >>$APACHE_CONF;
echo DOSPageInterval 2 >>$APACHE_CONF;
echo DOSSiteInterval 2 >>$APACHE_CONF;
echo DOSBlockingPeriod 600 >>$APACHE_CONF;
echo \ >>$APACHE_CONF;;
2) $APXS -cia mod_evasive20.c ;
echo \ >> $APACHE_CONF ;
echo DOSHashTableSize 3097 >>$APACHE_CONF;
echo DOSPageCount 6 >>$APACHE_CONF;
echo DOSSiteCount 100 >>$APACHE_CONF;
echo DOSPageInterval 2 >>$APACHE_CONF;
echo DOSSiteInterval 2 >>$APACHE_CONF;
echo DOSBlockingPeriod 600 >>$APACHE_CONF;
echo \ >>$APACHE_CONF;;
*) echo -e "\e[0;31mERROR: Apache version is not compatible\e[0m"
esac
#Restart Apache
service httpd restart
echo -e "\e[0;31m Mod_evasive is installed successfully..\e[0m"
#!/bin/bash
#Apache version
HTTPD=`ps aux|grep http|grep bin|head -1|awk '{ print $11}'`
VERSION=`$HTTPD -V|grep version|awk '{print $3}'|cut -d"/" -f2|cut -d"." -f1`
echo -e "\e[0;31m Apache $VERSION \e[0m is running in the server"
APACHE_CONF=`$HTTPD -V|grep HTTPD_ROOT|cut -d"=" -f2|sed s/\"//gi`\/`httpd -V|grep SERVER_CONFIG_FILE|cut -d"=" -f2|sed s/\"//g`
if [ "`grep mod_evasive $APACHE_CONF`" ]
then
echo "mod_evasive is already installed in the server"
exit
else "Starting installation of mod_evasive"
fi
echo "Downloading source..."
cd /usr/src
wget http://www.zdziarski.com/projects/mod_evasive/mod_evasive_1.10.1.tar.gz
if [ -f /usr/src/mod_evasive_1.10.1.tar.gz ]
then
tar xfz mod_evasive_1.10.1.tar.gz
cd mod_evasive
else
echo -e "\e[0;31m ERROR: Could not download source \e[0m"
fi
# Need to install httpd-devel in Plesk server
if [ -d /usr/local/psa ]
then
yum install httpd-devel*
fi
APXS=`ps aux|grep http|grep bin|head -1|awk '{ print $11}'|sed s/httpd/apxs/g`
#Add the directives in apache conf
case $VERSION
in
1) $APXS -cia mod_evasive.c ;
echo \
echo DOSHashTableSize 3097 >>$APACHE_CONF;
echo DOSPageCount 6 >>$APACHE_CONF;
echo DOSSiteCount 100 >>$APACHE_CONF;
echo DOSPageInterval 2 >>$APACHE_CONF;
echo DOSSiteInterval 2 >>$APACHE_CONF;
echo DOSBlockingPeriod 600 >>$APACHE_CONF;
echo \
2) $APXS -cia mod_evasive20.c ;
echo \
echo DOSHashTableSize 3097 >>$APACHE_CONF;
echo DOSPageCount 6 >>$APACHE_CONF;
echo DOSSiteCount 100 >>$APACHE_CONF;
echo DOSPageInterval 2 >>$APACHE_CONF;
echo DOSSiteInterval 2 >>$APACHE_CONF;
echo DOSBlockingPeriod 600 >>$APACHE_CONF;
echo \
*) echo -e "\e[0;31mERROR: Apache version is not compatible\e[0m"
esac
#Restart Apache
service httpd restart
echo -e "\e[0;31m Mod_evasive is installed successfully..\e[0m"
Tuesday, June 30, 2009
How to know the version of Debian installation.
----------------
1) #cat /etc/issue
2) #cat /etc/debian_version
----------------
1) #cat /etc/issue
2) #cat /etc/debian_version
----------------
Tuesday, June 16, 2009
install postfix with postgresql support in centos 5
Download the RPM from the following link -
#wget http://mirror.centos.org/centos/5/centosplus/i386/RPMS/postfix-2.3.3-2.1.centos.mysql_pgsql.i386.rpm
#rpm -ivh postfix-2.3.3-2.1.centos.mysql_pgsql.i386.rpm
done :)
check for postgresql support -
#postconf -m|grep pgsql
pgsql
cPanel: /scripts/easyapache error
If you are getting yum error while running easyapache, try the following.
---------------------
First take a backup of /var/lib/rpm.
Then do:
rm /var/lib/rpm/__db*
rpm --rebuilddb
---------------------
Linux-Plesk 9 in RHEL 4 : Webmail shows default page.
Try this:
Download and install the following RPM
http://autoinstall.plesk.com/PSA9/dist-rpm-RedHat-el4-i386/9.0.1/opt/horde/
Then execute -
/usr/local/psa/admin/bin/webmailmng --install --name=horde
/usr/local/psa/admin/sbin/websrvmng -a -v
Hope it fixes the issue..
Subscribe to:
Posts (Atom)