This post describes about how to install CSF on your server using simple shell script.
CSF Installation shell script.
###CSF (ConfigServer Firewall) Installation on Linux ####
#!/bin/sh
# Install necesarry package.
yum -y install perl-libwww-perl
#Download the package and Extract
cd /tmp
wget http://configserver.com/free/csf.tgz
tar zxvf csf.tgz
cd csf
#CSF Provide two different package, 1. cPanel and without cPanel
echo "Now PRESS 1 for cPanel OR PRESS 2 for no-cPanel"
read csf
# If you want to install for cpanel
if [ " 1 " = " $csf " ]
then
echo "Installing csf "
./install.cpanel.sh
elif [ " 2 " = " $csf " ]
then
echo "installing csf without cPanel"
./install.sh
else
echo "Enter valid number or execute again"
fi
#Configure
#Default Testing status is '1', update to '0'
cd /etc/csf
sed -i.backup 's/TESTING = "1"/TESTING = "0"/g' /etc/csf/csf.conf
#Testing script
perl /etc/csf/csftest.pl
#To start your CSF and LFD service.
csf -e
/etc/init.d/lfd start
# csf -r [Restart]
# csf -x [ Stop ]
You can easily manage your CSF server.
Comments (0)