Drug preguntas

Apache status

Cpanel No Comments »

Apache status

lynx –dump http://localhost/whm-server-status;

lynx –dump http://localhost/whm-server-status > /root/apache_status

APF commands

Linux No Comments »

root@server [~]# apf –help

usage /usr/local/sbin/apf [OPTION]

-s|–start ……………………. load all firewall policies
-r|–restart ………………….. stop (flush) & reload firewall rules
-f|–stop…….. ……………… stop (flush) all firewall rules
-l|–list …………………….. list chain rules
-t|–status …………………… firewall status

-a HOST CMT|–allow HOST COMMENT … add host (IP/FQDN) to allow_hosts.rules and immediately load new rule into firewall

-d HOST CMT|–deny HOST COMMENT …. add host (IP/FQDN) to deny_hosts.rules and
immediately load new rule into firewall

-u|–unban HOST ……………….. remove host from [glob_]deny_hosts.rules
and immediately remove rule from firewall

-o|–ovars ……………………. output all conifguration options

root@server [~]# /usr/local/sbin/apf -u 59.176.108.175
Deleted from firewall: Deny all to/from 59.176.108.175
root@server [~]# /usr/local/sbin/apf -r
root@server [~]# iptables -L -n |grep 59.176.108.175
root@server [~]#

PHP mail

PHP No Comments »

Create a mail.php file using the script below and then call the file using the browser. A mail will be send to serverhelp1_24×7@yahoo.com is the php mail function works fine.

mail (’serverhelp1_24×7@yahoo.com’, ‘test subject’, ‘test mail’);
?>

Starting Mailman on CPanel Servers

Cpanel No Comments »

root@xxx [~]# /usr/local/cpanel/3rdparty/mailman/bin/mailmanctl start
Starting Mailman’s master qrunner.
root@xxx [~]# pgrep mailman
30193
root@xxx[~]# ps auxfw |grep mailman

Make sure that Mailman is enabled in CPanel Tweak Settings Wink.

How to fix this error in Mailing list
—————————————————–
Bug in Mailman version 2.1.9.cp2

We\’re sorry, we hit a bug!
Please inform the webmaster for this site of this problem. Printing of
traceback and other system information has been explicitly inhibited, but the
webmaster can find this information in the Mailman error logs.
============================================================

If you are the server administrator, proceed with the following steps:

1. Go to /usr/local/cpanel/3rdparty/mailman
cd /usr/local/cpanel/3rdparty/mailman

2. ls -al

3. chmod -R 2775 ./*

Check if this has fixed the issue.
If not run the fixmailman script.

4. /scripts/fixmailman

How to Enable “Update Now” Button in Cpanel Awstats

Cpanel No Comments »

How to Enable “Update Now” Button in Cpanel Awstats

Tired of bugging your host to update Cpanel awstats? You can generate stats, update it by your own by clicking the ‘update now’ link at the top of the main page in the awstats. You can place this “update now” by yourself .
Find out how to change the configuration file for Awstats to re-enable the ‘update now’ button.

Follow these steps:
1. login into cPanel
1a. Open File Manager
2. navigate to /home/username/tmp/awstats/
3. edit the .conf file (e.g. awstats.yourdomain.com.conf)
4. look for this line: AllowToUpdateStatsFromBrowser, set the value to 1 (AllowToUpdateStatsFromBrowser=1)
5. Save the .conf file. When you refresh your statistics page. you will get ‘update now’ link at the top of the page.

This applies for any subdomain as well

How to access awstats from Outside Cpanel

Cpanel No Comments »

How to access Awstats From Outside the control panel

Accessing Awstats from outside the control panel is easy.
Step 1.
Download awstats from http://awstats.sourceforge.net
Step 2.
Uncompress awstats-5.6.tgz
Step 3.
Copy the contents of the uncompressed cgi-bin folder from your hard drive to the user cgi-bin directory (this includes awstats.pl, awstats.model.conf, and the lang, lib and plugins sub-directories).
Step 4.
If necessary (should not be needed with most setups), edit the first (top-most) line of awstats.pl file that is
#!/usr/bin/perl
to reflect the path were your Perl interpreter is installed. Default value works for most of Unix OS, but it also might be #!/usr/local/bin/perl
Step 5.
Move AWStats icon sub-directories and its content into a directory readable by your web server, for example /home/users/public_html/icons
Step 6.
Copy awstats.model.conf file into a new file named awstats.myvirtualhostname.conf. This new file must be stored in /home/user/public_html/cgi-bin.
Step 7.
Edit this new config file with your own setup :
- Change LogFile value with full path of your web server log file (The path is: LogFile=”/usr/local/apache/domlogs/domain.com”).
- Check if LogFormat has the value “1″ (it means “NCSA apache combined/ELF/XLF log format”).
- Change DirIcons parameter to reflect relative path of icon directory. (DirIcons=”/icons”)
- Edit SiteDomain parameter with the main domain name or the intranet web server name used to reach the web site to analyze (Example: www.mydomain.com).
IMPORTANT!
- Change DirData to use the same Statics file than Cpanel Awstats and do not loose any entry.
(DirData=”/home/user/tmp/awstats/”)
Step 8.
Access AwStats by the URL:
www.domain.com/cgi-bin/awstats.pl?config=domain.com
That’s all!!!
The AwStats will refresh the Statics every 24 Hours.

Domain is not listing in whm ” list accounts”

Cpanel No Comments »

Please make sure that the domain entry in the following files.

/etc/userdomains

(domain name and username should be present in this file)

/etc/localdomains

/etc/trueuserdomains

Cpanel Hardening

Cpanel No Comments »

You should configure the following in your WHM (CPanel):

Main >> Server Configuration >> Tweak Settings

[x] Prevent the user ‘nobody’ from sending out mail to remote addresses (php and cgi scripts generally run as nobody if you are not using phpsuexec and suexec respectively.)

[x] Track the origin of messages sent though the mail server by adding the X-Source headers (exim 4.34+ required)

Main >> Security >> Fix Insecure Permissions (Scripts)

Main >> Security >> Tweak Security

“Compilers are disabled for unpriviledge users”

Main >> Service Configuration >> Enable/Disable SuExec

suexec Status “enabled”

Main >> Account Functions >> Disable or Enable Demo Mode

Select from “Users” the “demo” account and click “Modify” then click “Disable” if it exists :)

Setup FFMPEG server

FFMPEG Streamin Server No Comments »

To setup a streaming server first you need ffmpeg installed in the server . Not only that you need associated software’s installed to and you need to custom compile to make the server a complete streaming server . you need ffpeg-php also .
ffmpeg-php is a PHP extension that adds functions for accessing and retrieving information from movies and audio files. ffmpeg-php provides access to the many audio and video formats supported by ffmpeg.
First we can try the easy way . using yum . You can download the repository of rpmforge from http://dag.wieers.com/rpm/ . then
yum install ffmpeg
This will install ffmpeg . But for a complete streaming setup it is always better to compile and install fmpeg with all the necessary modules to give support for most of the extensions .

Login to your server as root, then:
cd /usr/src && mkdir install && cd install
Download faad2 and faac
from http://faac.sourceforge.net/oldsite/download.php get Faad2 and faac (new versions)

wget http://prdownloads.sourceforge.net/faac/faad2-2.0.tar.gz?download
wget http://prdownloads.sourceforge.net/faac/faac-1.24.tar.gz?download

Verify that you have these components are installed
rpm -qa automake
rpm -qa autoconf
rpm -qa libtool
rpm -qa m4
rpm -qa gcc-c++

If any are missing than simply yum install (packagename), if you dont have a package
manager than get one, it will save you alot of time
and headaches.

Installing Faac
tar -zxvf faac-1.24.tar.gz && cd faac
sh bootstrap
./configure
make
make install
cd ..

Installing Faad2
tar -zxvf faad2-2.0.tar.gz
cd faad2 && less README.linux
There is 2 bugs with this package, so need to manually edit these files
nano Makefile.am
Edit the file to look like this
SUBDIRS = libfaad common frontend plugins
EXTRA_DIST = faad2.spec

cd common/mp4ff && nano mp4ffint.h
Comment out this line
//void mp4ff_track_add(mp4ff_t *f);

Save file and cd ../..
autoreconf -vif
./configure
make
make install
Then
# cd /usr/local/src

Download the sources to your server:
# wget http://www3.mplayerhq.hu/MPlayer/releases/codecs/essential-20061022.tar.bz2
# wget http://rubyforge.org/frs/download.php/9225/flvtool2_1.0.5_rc6.tgz
# wget http://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz
# wget http://superb-west.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.0.tbz2
# wget http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
# wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz
Extract all sources:
# tar -xzf flvtool2_1.0.5_rc6.tgz
# tar -xzf lame-3.97.tar.gz
# tar -xzf libogg-1.1.3.tar.gz
# tar -xzf libvorbis-1.1.2.tar.gz
# tar -xjf essential-20061022.tar.bz2
# tar -xjf ffmpeg-php-0.5.0.tbz2
Create new directory:
# mkdir /usr/local/lib/codecs/
We need to install SVN and Ruby On Rails:
# up2date -i subversion
# up2date -i ruby
# svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
# svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
# cd /usr/local/src/mplayer
# svn update
Copy Codecs for MPlayer:
# mv /usr/local/src/essential-20061022/* /usr/local/lib/codecs/
# chmod -R 755 /usr/local/lib/codecs/
Secure folder TMP:
# mkdir /usr/local/src/tmp
# chmod 777 /usr/local/src/tmp
# export TMPDIR=/usr/local/src/tmp
Lame:
# cd /usr/local/src/lame-3.97
# ./configure
# make && make install

LibOgg:
# cd /usr/local/src/libogg-1.1.3
# ./configure && make && make install
LibVorbis:
# cd /usr/local/src/libvorbis-1.1.2
# ./configure && make && make install
FlvTool2:
# cd /usr/local/src/flvtool2_1.0.5_rc6/
# ruby setup.rb config
# ruby setup.rb setup
# ruby setup.rb install
MPlayer:
# cd /usr/local/src/mplayer
# ./configure && make && make install
FFMpeg:
# cd /usr/local/src/ffmpeg/
# ./configure –enable-libmp3lame –enable-libogg –enable-libvorbis –disable-mmx –enable-shared –enable-faad –enable-faac –enable-a52
# echo ‘#define HAVE_LRINTF 1 ‘>>config.h
# make
# make install
# ln -s /usr/local/lib/libavformat.so.50 /usr/lib/libavformat.so.50
# ln -s /usr/local/lib/libavcodec.so.51 /usr/lib/libavcodec.so.51
# ln -s /usr/local/lib/libavutil.so.49 /usr/lib/libavutil.so.49
# ln -s /usr/local/lib/libmp3lame.so.0 /usr/lib/libmp3lame.so.0
# ln -s /usr/local/lib/libavformat.so.51 /usr/lib/libavformat.so.51
# cd /usr/local/src/
FFMpeg-PHP:
# cd /usr/local/src/ffmpeg-php-0.5.0/
# phpize
# ./configures
# make
# make install
Now the check the php version . I will give sample here.

# echo ‘extension=/usr/local/lib/php/extensions/no-debug-non-zts-20020429/ffmpeg.so’ >> /usr/local/Zend/etc/php.ini
# service httpd restart
This will most probably setup us a streaming server. You will get lots off errors if everything doesn’t go correctly. Then we should troubleshoot till everything goes right . Based on the server we may need to enable and disable shared for it to work. Sometimes if you get vhook error you can try disabling that and try again and so on.

There is a script for installing ffmpeg in the server . Please check this link http://www.cihilt.com/ffmpeg_installation_in_5min

Howto Upgrade Perl on cPanel

Cpanel No Comments »
Howto Upgrade Perl on cPanel
============================

Automatic cPanel updates does not update Perl, instead you have to download them from http://layer1.cpanel.net
Login to your server as root and run the install such as:

# wget http://layer1.cpanel.net/perl587installer.tar.gz
# tar -xzf perl587installer.tar.gz
# cd perl587installer
# ./install

How to test to see if you need to upgrade or not:

# perl -V

Update trueuserdomain and userdomains in cpanel

Cpanel No Comments »
Hi All,

Script to create userdomains and trueuserdomains in a cpanel server from /var/cpanel/users.

Put the following code in the vi /root/domains.sh
change the permission to execute the script. chmod 700 /root/domains.sh

#!/bin/sh
if [ -d /root/supportpro/ ]; then
 cd /root/supportpro/
else
 mkdir /root/supportpro/
 cd /root/supportpro/
fi
echo > /root/supportpro/alldomainlist
echo > /root/supportpro/domainlist
echo > /root/supportpro/trueuserdomains
echo > /root/supportpro/userdomains
grep DNS /var/cpanel/users/* > /root/supportpro/alldomainlist
cat /root/supportpro/alldomainlist|\
while read line
do
echo `echo $line | awk -F = {'print $2'}`: `echo $line | awk -F : {'print $1'} | awk -F / {'print $5'}` >> /root/supportpro/userdomains
done
grep DNS= /var/cpanel/users/* > /root/supportpro/domainlist
cat /root/supportpro/domainlist|\
while read line
do
echo `echo $line | awk -F = {'print $2'}`: `echo $line | awk -F : {'print $1'} | awk -F / {'print $5'}` >> /root/supportpro/trueuserdomains
done

Exim Commands

Exim No Comments »

To print a count of the messages in the queue
root@localhost# exim -bpc

Print a listing of the messages in the queue (time queued, size, message-id, sender, recipient)
root@localhost# exim -bp

Print a summary of messages in the queue (count, volume, oldest, newest, domain, and totals):
root@localhost# exim -bp | exiqsumm

Generate and display Exim stats from a logfile:
root@localhost# eximstats /var/log/exim_mainlog

Same as above, with less verbose output:
root@localhost# eximstats -ne -nr -nt /var/log/exim_mainlog

Same as above, for one particular day:
root@localhost# fgrep YYYY-MM-DD /var/log/exim_mainlog | eximstats

Print what Exim is doing right now:
root@localhost# exiwhat

Searching the queue

Search the queue for messages from a specific sender:
root@localhost# exiqgrep -f [luser]@domain

Search the queue for messages for a specific recipient/domain:
root@localhost# exiqgrep -r [luser]@domain

To Print just the message-id of the entire queue:
root@localhost# exiqgrep -i

Managing the queue

Start a queue run:
root@localhost# exim -q -v

Start a queue run for just local deliveries:
root@localhost# exim -ql -v

Remove a message from the queue:
root@localhost# exim -Mrm

Freeze a message:
root@localhost# exim -Mf

Deliver a specific message:
root@localhost# exim -M

Force a message to fail and bounce:
root@localhost# exim -Mg

Remove all frozen messages:
root@localhost# exiqgrep -z -i | xargs exim -Mrm

Freeze all queued mail from a given sender:
root@localhost# exiqgrep -i -f luser@example.tld | xargs exim -Mf

View a message’s headers:
root@localhost# exim -Mvh

View a message’s body:
root@localhost# exim -Mvb

View a message’s logs:
root@localhost# exim -Mvl

Fantastico Installation

Cpanel No Comments »
Fantastico

SSH to your server(s) and enter following commands:
cd /usr/local/cpanel/whostmgr/docroot/cgi
wget -N http://files.betaservant.com/files/free/fantastico_whm_admin.tgz
tar -xzpf fantastico_whm_admin.tgz
rm -rf fantastico_whm_admin.tgz

Now go to WHM, login as root and follow the link WHM -> Add-Ons -> Fantastico De Luxe WHM Admin.
Upon loading, Fantastico De Luxe WHM Admin will auto-update your existing installation.
All admin files (masterfiles, tarballs, settings etc) will be moved to /var/netenberg. Also your
IP need to be licensed.

Fantastico Upgrading is same as the fresh installation as I described above.

Cpanel Installation

Cpanel No Comments »
Cpanel Installation

cPanel Installation Instructions:
cPanel now uses a universal install script which can be found at
http://layer1.cpanel.net/. You can use the following commands in the root
shell to download and start the installation script:
mkdir /home/cpins
cd /home/cpins
wget http://layer1.cpanel.net/latest
sh latest

Horde Error

Cpanel No Comments »

?When I try to delete a message from webmail it fails with: ‘There was an error deleting messages from the folder “Inbox”. This is what the server said: [TRYCREATE] Mailbox does not exist.’

RESOLUTION

The most probalby you have switched to “When deleting messages, move them to your Trash folder instead of marking them as deleted?” in Horde IMP preferences under “Options” -> “Deleting and Moving Messages”.

Please make sure that trash folder was created and selected under “Trash folder:” option.

Steps

*Login to Horde
*Click on Options
*Deleting and Moving Messages
*Select “
*Then specify the folder Trash or some one you want to.

?HORDE ERROR IN CPANEL

Reset Horde is a solution

/scripts/resethorde
Or
/scripts/fullhordereset ———-Don’t do it until you find another solution. :)

?HORDE LOGIN PROBLEM

Hope you would have got this issue often. The client cannot able to login to his Horde account to check his mail. He would have reached till the login screen and if he click “Login” it will stay back in the same screen instead of going to his inbox. Here is the fix for it,

Check the following first,

1. goto ” cd var/lib/mysql/horde ” and check if there is a file named ” horde_sessionhandler.frm ”

2. move all the file named “horde_sessionhandler” with other name

3. Or you can goto mysql and can drop the table “horde_sessionhandler”. It will show error message some times. If so use the step 2, so that the table gets moved automatically.(Remember that if you are using step2 skip the step 3)

4. Now type in shell “mysql”

5. It will take to mysql prompt . type “use horde”;

6. copy this command and paste there :

CREATE TABLE horde_sessionhandler (session_id VARCHAR(32) NOT NULL, session_lastmodified INT NOT NULL, session_data LONGBLOB, PRIMARY KEY (session_id)) ENGINE = InnoDB;

7. quit from mysql and restart mysql.

8. Try now… Your issue is fixed!!!!! Cheesy Grin

Installing RPMFORGE

Linux No Comments »

Installing RPMForge

rpmforge for centos4.4

http://wiki.centos.org/Repositories/RPMForge

RPMForge is a collaboration of Dag, Dries, and other packagers. They provide over 2600 packages for CentOS, including mplayer, xmms-mp3, and other popular media tools. It is not part of RedHat or CentOS but is designed to work with these major distributions.

Packages are supplied in RPM format and in most cases are ready to use. Beware that some packages are newer than the official CentOS version and you should not blindly install those packages. Before you replace a CentOS package you should make sure that will not break anything important. In most cases you can revert any mistakes but it is best to avoid the mess.
CentOS 4

You should make sure that you have ProtectBase installed.
Protectbase

Assuming you have centos extras enabled in your current yum configuration

yum install yum-plugin-protectbase

Edit the file /etc/yum.conf and add the following line to the [main] section:

plugins=1

Edit the file /etc/yum.repos.d/CentOS-Base.repo and add the following line to the [base] and [update] section:

protect=1

Edit /etc/yum.repos.d/CentOS-Base.repo and add the following line to the other sections

protect=0

rpmforge

Download the rpmforge-release package. Choose one of the two links below, depending on your architecture. If you are unsure of which one to use you can check your architecture with the command uname -i

*

i386 http://dag.wieers.com/packages/rpmforge-release/rpmforge-release-0.3.6-1.el4.rf.i386.rpm
*

x86_64 http://dag.wieers.com/packages/rpmforge-release/rpmforge-release-0.3.6-1.el4.rf.x86_64.rpm

(You can find a complete list of rpmforge-release package packages at http://dag.wieers.com/packages/rpmforge-release/ but it is recommended that you use one of the two listed above).

Install DAG’s GPG key

rpm –import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt

Verify the package you have downloaded

rpm -K rpmforge-release-0.3.6-1.el4.rf.*.rpm

Security warning: The rpmforge-release package imports GPG keys into your RPM database. As long as you have verified the package and trust Dag then it should be safe.

Install the package

rpm -i rpmforge-release-0.3.6-1.el4.rf.*.rpm

This will add a yum repository config file and import the appropriate GPG keys.

Test with this command:

yum check-update

It should output these two lines:

Loading “protectbase” plugin

76 packages excluded due to repository protections

If so then it looks like things are working so try installing something like this

yum install mplayer

Hope that it works :-)
CentOS 3

Does not have protectbase.

Does have a rpmforge-release package but you don’t want it enabled

Cron Entry

Linux No Comments »
Setting up cronjobs in Unix and Solaris

cron is a unix, solaris utility that allows tasks to be automatically run in the background at regular intervals by the cron daemon. These tasks are often termed as cron jobs in unix , solaris.
Crontab (CRON TABle) is a file which contains the schedule of cron entries to be run and at specified times.

1. Crontab Restrictions
____________
You can execute crontab if your name appears in the file /usr/lib/cron/cron.allow. If that file does not exist, you can use
crontab if your name does not appear in the file /usr/lib/cron/cron.deny.
If only cron.deny exists and is empty, all users can use crontab. If neither file exists, only the root user can use crontab. The allow/deny files consist of one user name per line.

2. Crontab Commands
__________
export EDITOR=vi ;to specify a editor to open crontab file.

crontab -e     Edit your crontab file, or create one if it doesn't already exist.
crontab -l      Display your crontab file.
crontab -r      Remove your crontab file.
crontab -v      Display the last time you edited your crontab file. (This option is only available on a few systems.)

3)3. Crontab file
___________
Crontab syntax :-
A crontab file has five fields for specifying day , date and time  followed by the command to be run at that interval.
*     *   *   *    *  command to be executed
-     -    -    -    -
|     |     |     |     |
|     |     |     |     +----- day of week (0 - 6) (Sunday=0)
|     |     |     +------- month (1 - 12)
|     |     +--------- day of month (1 - 31)
|     +----------- hour (0 - 23)
+------------- min (0 - 59)

* in the value field above means all legal values as in braces for that column.
The value column can have a * or a list of elements separated by commas. An element is either a number in the ranges shown above or two numbers in the range separated by a hyphen (meaning an inclusive range).

Note: The specification of days can be made in two fields: month day and weekday. If both are specified in an entry, they are cumulative meaning both of the entries will get executed .

4. Crontab Example
_______

A line in crontab file like below  removes the tmp files from /home/someuser/tmp each day at 6:30 PM.

30     18     *     *     *         rm /home/someuser/tmp/*

5. Crontab Environment
___________
cron invokes the command from the user's HOME directory with the shell, (/usr/bin/sh).
cron supplies a default environment for every shell, defining:
HOME=user's-home-directory
LOGNAME=user's-login-id
PATH=/usr/bin:/usr/sbin:.
SHELL=/usr/bin/sh

Users who desire to have their .profile executed must explicitly do so in the crontab entry or in a script called by the entry.

6. Disable Email
____________

By default cron jobs sends a email to the user account executing the cronjob. If this is not needed put the following command At the end of the cron job line .

>/dev/null 2>&1

7. Generate log file
________________

To collect the cron execution execution log in a file :

30 18  *    *   *    rm /home/someuser/tmp/* > /home/someuser/cronlogs/clean_tmp_dir.log

User Cron
---------

1)/var/spool/cron

2)tail -f /var/log/cron

eg:

with this command
30 18 * * * rm /home/user/public_html/tmp/*
we can delete all files in tmp folder at 18.30 daily

Removal of insecure packages and unnecessary software from server.

Linux No Comments »

Please check to see the packages that are not needed on a web server. You can use the command rpm -qa to list all the installed rpm packages on the server. From the list remove packages choose the packages that are not required.
Some common examples of unnecessary packages are given below.

mtools
yp-tools
redhat-config-nfs
redhat-config-samba
tftp-server
ypserv
redhat-config-printer-gui
samba
samba-swat
cups
gmp-devel
ElectricFence
doxygen
Xfree86-xfs
redhat-config-printer
cups-libs
samba-common
samba-client

These packages are specific to RHEL 3. It varies in different distributions.

Disabling of unused and insecure services

Linux No Comments »

The command chkconfig –list will display the list of services on all runlevels. You can turn off the specific services by chkconfig off .

Eg:
chkconfig nfs off
chkconfig nfslock off
chkconfig cups off
chkconfig atd off
chkconfig autofs off
chkconfig xfs stop

Above are some examples of unwanted services commonly running in a server. You can stop these services immediately by using service command.

service nfs stop
service nfslock stop
service cups stop
service atd stop
service autofs stop
service xfs stop

CSF Installation

Linux No Comments »
Installation

Installation is quite straightforward:

rm -fv csf.tgz
wget http://www.configserver.com/free/csf.tgz
tar -xzf csf.tgz
cd csf
sh install.sh

If you would like to disable APF+BFD (which you will need to do if you have
them installed otherwise they will conflict horribly):

sh disable_apf_bfd.sh

That’s it. You can then configure csf and lfd in WHM, or edit the files
directly in /etc/csf/*

CSF is pre configured to work on a cPanel server with all the standard cPanel
ports open. It also auto-configures your SSH port if it’s non-standard on
installation.

You should ensure that kernel logging daemon (klogd) is enabled. Typically, VPS
servers have this disabled and you should check /etc/init.d/syslog and make
sure that any klogd lines are not commented out. If you change the file,
remember to restart syslog.


Uninstallation

Removing csf and lfd is even more simple:

cd /etc/csf
sh uninstall.sh

Wordpress Themes by Natty WP. Web Hosting
Images by our golf tips desEXign.