Saturday 30 April 2011

Steps to install DOS Deflate

//**Just follow given instruction below**//:--


-Installing DOS-Deflate is so simple.

Informations is as follows :-

When you run this Perl script it will then run an netstat command check how many times each IP is connected & if there are more then the number of connections you specified then it will automatically run a command in APF for the IP to be banned,

**************----------****************

-Login to your server as root :-

Download the install script.

wget http://www.inetbase.com/scripts/ddos/install.sh

**************----------****************

-Run the installer :-

sh install.sh

**************----------****************

-DOS-Deflate should now be installed

**************----------****************

-Please note that DOS-Deflate uses APF to ban IPs so you must have it installed for DOS-Deflate to work properly,

**************----------****************

-Customizing DOS-Deflate is very easy.You have to edit /usr/local/ddos/ddos.conf with your favorite editor for example :-


vi /usr/local/ddos/ddos.conf

Every setting is explained in the configuration file so I will not go over them as the explanations are quite easy to follow up:

Read also "How To Install Apf <advanced Policy Firewall>" if you haven't set up apf firewall in your box.

This way we can protecting ourself from ddos attack, Such attacks are so common nowadays, all website owners should look into protecting their sites from such attacks

Thursday 28 April 2011

HOW TO COPY WEBSITE

------------

HOW TO COPY WEBSITE FROM:- http://abc.com/ to abc1.com with database

------------

**Steps are as follows :--

. Open two shells ( one with abc.com and other abc1.com )

. then copy public_html of abc.com to abc1.com

. go to public_html folder of abc.com and hit the command

. [root@server public_html of abc.com]# cp -R * /home/abc1/public_html

. Change the ownership of the files copied under public_html of abc1.com

 Then take backup of mysql datatbase of abc.com

mysqldump abc_databasename > abc_databasename.sql   ( of abc.com)

Create a new database and username under abc1.com ( add user to database, make a note of db name, user & password)

then go to Shell and enter the following command :--

mysql -u abc1_user -ppassword abc1_databasename < abc_databasename.sql

Then go to the configuration file and do the changes accordingly.

And your site has been copied with database  to new site.

Enjoye now...

Sunday 24 April 2011

linux bash command (basic commands)

 **Basic Command** Linux BASH command line are given below  :---


****************************************************************

alias    -Create an alias
awk      -Find and Replace text, database sort/validate/index
break    -Exit from a loop
builtin  -Run a shell builtin  
cal      -Display a calendar
case     -Conditionally perform a command
cat      -Display the contents of a file
cd       -Change Directory
cfdisk   -Partition table manipulator for Linux
chgrp    -Change group ownership
chmod    -Change access permissions
chown    -Change file owner and group
chroot   -Run a command with a different root directory
cksum    -Print CRC checksum and byte counts
clear    -Clear terminal screen
cmp      -Compare two files
comm     -Compare two sorted files line by line
command  -Run a command - ignoring shell functions
continue  -Resume the next iteration of a loop
cp       -Copy one or more files to another location
cron     -Daemon to execute scheduled commands
crontab  -Schedule a command to run at a later time
csplit   -Split a file into context-determined pieces
cut      -Divide a file into several parts
date     -Display or change the date & time
dc       -Desk Calculator
dd       -Data Dump - Convert and copy a file
declare  -Declare variables and give them attributes
df       -Display free disk space
diff     -Display the differences between two files
diff3    -Show differences among three files
dir      -Briefly list directory contents
dircolors  -Colour setup for `ls'
dirname  -Convert a full pathname to just a path
dirs     -Display list of remembered directories
du       -Estimate file space usage
echo     -Display message on screen
ed       -A line-oriented text editor (edlin)
egrep    -Search file(s) for lines that match an extended expression
eject    -Eject CD-ROM
enable   -Enable and disable builtin shell commands
env      -Display, set, or remove environment variables
eval     -Evaluate several commands/arguments
exec     -Execute a command
exit      -Exit the shell
expand   -Convert tabs to spaces
export   -Set an environment variable
expr     -Evaluate expressions
factor   -Print prime factors
false    -Do nothing, unsuccessfully
fdformat   -Low-level format a floppy disk
fdisk    -Partition table manipulator for Linux
fgrep    -Search file(s) for lines that match a fixed string
find     -Search for files that meet a desired criteria
fmt      -Reformat paragraph text
fold     -Wrap text to fit a specified width.
for      -Expand words, and execute commands
format   -Format disks or tapes
free     -Display memory usage
fsck     -Filesystem consistency check and repair.
function -Define Function Macros
gawk     -Find and Replace text within file(s)
getopts  -Parse positional parameters
grep     -Search file(s) for lines that match a given pattern
groups  -Print group names a user is in
gzip     -Compress or decompress named file(s)
hash     -Remember the full pathname of a name argument
head     -Output the first part of file(s)
history  -Command History
hostname  -Print or set system name
id       -Print user and group id's
if       -Conditionally perform a command
import   -Capture an X server screen and save the image to file
info     -Help info
install  -Copy files and set attributes
join    - Join lines on a common field
kill     -Stop a process from running
less     -Display output one screen at a time
let      -Perform arithmetic on shell variables
ln        -Make links between files
local     -Create variables
locate    -Find files
logname  -Print current login name
logout    -Exit a login shell
lpc        -Line printer control program
lpr        -Off line print
lprint     -Print a file
lprintd   -Abort a print job
lprintq   -List the print queue
lprm     -Remove jobs from the print queue
ls          -List information about file(s)
m4          -Macro processor
man         -Help manual
mkdir      -Create new folder(s)
mkfifo     -Make FIFOs (named pipes)
mknod    -Make block or character special files
more       -Display output one screen at a time
mount     -Mount a file system
mtools    -Manipulate MS-DOS files
mv         -Move or rename files or directories
nice       -Set the priority of a command or job
nl          -Number lines and write files
nohup   -Run a command immune to hangups
passwd   -Modify a user password
paste      -Merge lines of files
pathchk  -Check file name portability
popd     -Restore the previous value of the current directory
pr         -Convert text files for printing
printcap -Printer capability database
printenv -Print environment variables
printf   -Format and print data
ps       -Process status
pushd    -Save and then change the current directory
pwd      -Print Working Directory
quota    -Display disk usage and limits
quotacheck  -Scan a file system for disk usage
quotactl  -Set disk quotas
ram      -ram disk device
rcp      -Copy files between two machines.
read      -read a line from standard input
readonly  -Mark variables/functions as readonly
remsync  -Synchronize remote files via email
return    -Exit a shell function
rm         -Remove files
rmdir     -Remove folder(s)
rpm       -Remote Package Manager
rsync     -Remote file copy (Synchronize file trees)
screen   -Terminal window manager
sdiff    -Merge two files interactively
sed     -Stream Editor
select   -Accept keyboard input
seq      -Print numeric sequences
set      -Manipulate shell variables and functions
shift    -Shift positional parameters
shopt    -Shell Options
shutdown  -Shutdown or restart linux
sleep    -Delay for a specified time
sort      -Sort text files
source  -Run commands from a file `.'
split     -Split a file into fixed-size pieces
su        -Substitute user identity
sum      -Print a checksum for a file
symlink  -Make a new name for a file
sync     -Synchronize data on disk with memory
tac        -Concatenate and write files in reverse
tail        -Output the last part of files
tar        -Tape ARchiver
tee       -Redirect output to multiple files
test      -Evaluate a conditional expression
time     -Measure Program Resource Use
times   -User and system times
touch  -Change file timestamps
top     - List processes running on the system
traceroute  -Trace Route to Host
trap     -Run a command when a signal is set(bourne)
tr       -Translate, squeeze, and/or delete characters
true     -Do nothing, successfully
tsort    -Topological sort
tty      -Print filename of terminal on stdin
type     -Describe a command

ulimit   -Limit user resources
umask    -Users file creation mask
umount   -Unmount a device
unalias  -Remove an alias
uname    -Print system information
unexpand -Convert spaces to tabs
uniq     -Uniquify files
units    -Convert units from one scale to another
unset    -Remove variable or function names
unshar  -Unpack shell archive scripts
until     -Execute commands (until error)
useradd   -Create new user account
usermod  -Modify user account
users     -List users currently logged in
uuencode  -Encode a binary file
uudecode  -Decode a file created by uuencode

v        -Verbosely list directory contents (`ls -l -b')
vdir     -Verbosely list directory contents (`ls -l -b')
vi       -Text Editor

watch    -Execute/display a program periodically
wc       -Print byte, word, and line counts
whereis  -Report all known instances of a command  
which    -Locate a program file in the user's path.
while    -Execute commands
who      -Print all usernames currently logged in
whoami  - Print the current user id and name (`id -un')

xargs     -Execute utility, passing constructed argument list(s)
yes       -Print a string until interrupted

.period - Run commands from a file
###      Comment / Remark


*******************************************************************************

Saturday 23 April 2011

How to install Joomala

** Steps for Joomla Intallation **:-

. First wget the pachage:--

1) wget http://joomlacode.org/gf/download/frsrelease/6828/22537/Joomla_1.0.15-Stable-       Full_Package.tar.gz

2) Change the ownership for Joomla package.

3) extact the package:-
tar -xzvf Joomla_1.0.15-Stable-Full_Package.tar.gz

4) Change the ownership of content,
  For exampal : chown tunerpar.tunerpar * -R

5) Open the site in browser

chmod 777 administrator/backups/
chmod 777 administrator/components/
chmod 777 administrator/language/
chmod 777 administrator/language/en-GB/
chmod 777 administrator/modules/
chmod 777 administrator/templates/
chmod 777 components/
chmod 777 images/
chmod 777 images/banners/
chmod 777 images/stories/
chmod 777 language/
chmod 777 language/en-GB/
chmod 777 language/pdf_fonts/
chmod 777 media/
chmod 777 modules/
chmod 777 plugins/
chmod 777 plugins/content/
chmod 777 plugins/editors/
chmod 777 plugins/editors-xtd/
chmod 777 plugins/search/
chmod 777 plugins/system/
chmod 777 plugins/user/
chmod 777 plugins/xmlrpc/
chmod 777 tmp/
chmod 777 templates/
chmod 777 Cache Directory /home/rsvpwebd/public_html/cache/
chmod 777 Cache Directory /home/rsvpwebd/public_html/administrator/cache/
chmod 777 tmp/
chmod 777 /home/rsvpwebd/public_html/cache/
chmod 777 administrator/backups/

6) Create configuration file,

    touch configuration.php

7) Change the ownership for config file

    chown tunerpar.tunerpar configuration.php

8) If php global setting is on then enter the code in

    .htaccess file To tunn of the setting:-

     php_flag register_globals off

   To make writable session save path, Just put the following code in your

   .htaccess file:php_value session.save_path '/tmp'

9) Make writable confi file

   chmod 666 configuration.php

10) Add username "localhost"

11) create a database username & password and fill it in blank fields.

12) Insert email ID of user.

13) Save the admin login

14) Click on view site and then rename the installation directory and refesh the browser..

THATS IT YOUR JOOMLA SITE IS READY TO USE.
---------------------------*********----------------------------

Friday 22 April 2011

Apache Error

// If Apache cannot START & you have this kind of ERROR // :-


 *-* Code is as follow given below :-


Invalid command 'BytesLog', perhaps mis-spelled or defined by

a module not included in the server configuration you will have

to recompile the mod_log_bytes module :-


Code si given below :-

cd /usr/local/cpanel/apache
/usr/local/apache/bin/apxs -iac mod_log_bytes.c


**************************************************************

Thank you 

Thursday 21 April 2011

check ftp username on server

 */* Just type given scripts below :--

--------------------------------

/scripts/whoowns domain name

--------------------------------

/scripts/whoowns webgrowth.info

--------------------------------

230000 240000 vnode ring resul

--------------------------------

/scripts/whoowns webgrowth.info


--------------------------------

Wednesday 20 April 2011

if cpsrvd fails on whm or server

fire below given scripts :-

/etc/init.d/chkservd restart

Tuesday 19 April 2011

whm account not able to create

Not able to create accounts on WHM  just telling my "Account Created", Yet there is no actual acount created.
This is the result of a failed Cpanel update,The Account Creation perl modules are missing..

**You can check this by using this command : --

tail -f /usr/local/cpanel/logs/error_log

**To fix, login via SSH and issue this command :--

 /scripts/upcp

Sunday 17 April 2011

MEMORY RELATED ERROR

//** If you get any out of memory errors , Then you have to shut down certain services immediately **//:-

 ------------******---------------

 service httpd stop

 ------------******---------------

 service mysql stop

 ------------******---------------

 service couirer-imap stop

 ------------******---------------

 service exim stop

 ------------******---------------



***This services once stop problem will be solved***

Saturday 16 April 2011

Few important scripts

//** Here are some very important scripts which could help you with following problems**//:-

*****------

Updates the server software:--

/scripts/upcp

*****------

Reinstalls exim:--

/scripts/exim4

*****------

View traffic or if you think a site is being DDoS:--

cd /usr/local/apache/domlogs

tail -f targetsite.com

*****------

Bandwidth issues :--

/scripts/cleanbw

*****------

To fix problem in webalizer that stop updating stats:--

/scripts/fixwebalizer

*****------

Self Explanatory:--

/scripts/fixcommonproblems

/scripts/fixeverything


**************************** Done....

Friday 15 April 2011

Usful scripts

**** Several useful scripts are given below **** :--

----------------********------------------

*Fixing Mail List MailMan :--

/usr/local/cpanel/bin/convertmailman2

----------------********------------------

*Reinstall MailMan :--

/scripts/reinstallmailman
/scripts/fixhome
pico /etc/my.cnf

----------------********------------------

*Edit php.ini :--

pico /usr/local/lib/php.ini

----------------********------------------

*Edit Apache Conf :--

pico /etc/httpd/conf/httpd.conf

----------------********------------------

*Checking Real Time Top Processes Login to SSH and run
top

----------------********------------------

*Run cpanel backup :--

/scripts/cpbackup

----------------********------------------

*To try and fix domain controller :--

/scripts/fixndc

----------------********------------------

*Quotas :--

/scripts/initquotas - takes a while to run
/scripts/resetquotas
/scripts/fixquotas - takes a while to run

----------------********------------------

*Add a Dns Entry :--

/scripts/adddns

----------------********------------------

*Install Frontpage Mail Exts :--

/scripts/addfpmail

----------------********------------------

*Add JavaServlets to an account (jsp plugin required) :--

/scripts/addservlets

----------------********------------------

*Add a User :--

/scripts/adduser

----------------********------------------

*Run WHM Lite :--

/scripts/admin

----------------********------------------

*Add Rlimits (cpu and mem limits) to apache :--

/scripts/apachelimits

----------------********------------------

*Resync with a master DNS Server :--

/scripts/dnstransfer

----------------********------------------

*Edit A User's Quota :--

/scripts/editquota

----------------********------------------

*Search For Trojans in /dev :--

/scripts/finddev

----------------********------------------

*Locate Trojan Horses :--

/scripts/findtrojans

----------------********------------------

*Suggest Usage :--

/scripts/findtrojans &gt; /var/log/trojans
/scripts/fixtrojans /var/log/trojans

----------------********------------------

*Make Interchange work with suexec :--

/scripts/fixcartwithsuexec

----------------********------------------

*Fix Most Problems with Interchange :--

/scripts/fixinterchange

----------------********------------------

*Run on a trojans horse file created by findtrojans to remove them :--

/scripts/fixtrojans

----------------********------------------

*Run this if a user's stats stop working :--

/scripts/fixwebalizer

----------------********------------------

*Fix a broken valias file :--

/scripts/fixvaliases

----------------********------------------

*Turn on DMA and 32bit IDE hard drive access (once per boot) :--

/scripts/hdparamify

----------------********------------------

*Re-scan quotas. Usually fixes Disk space display problems :--

/scripts/initquotas

----------------********------------------

*Turn on SUEXEC (probably a bad idea) :--

/scripts/initsuexec

----------------********------------------

*Display Ipusage Report :--

/scripts/ipusage

----------------********------------------

*Terminate an Account :--

/scripts/killacct

----------------********------------------

*Delete "Security Problem Infested RPMS" :--

/scripts/killbadrpms

----------------********------------------

*Fix Various Mail Permission Problems :--

/scripts/mailperm

----------------********------------------

*Attempt to Troubleshoot a Mail Problem :--

/scripts/mailtroubleshoot

----------------********------------------

*Change a Mysql Password :--

/scripts/mysqlpasswd

----------------********------------------

*Kill Potential Security Problem Services :--

/scripts/quicksecure

----------------********------------------

*Rebuild Ip Address Pool :--

/scripts/rebuildippool

----------------********------------------

* Delete Nasty SSL entry in apache default httpd.conf :--

/scripts/remdefssl

----------------********------------------

*Restart a Service (valid services: httpd,proftpd,exim,sshd,cppop,bind,mysql) :--

/scripts/restartsrv?? (example: /scripts/restartsrv httpd)

----------------********------------------

*Syncup Security Updates from RedHat/Mandrake :--

/scripts/rpmup

----------------********------------------

*Force a webalizer/analog update :--

/scripts/runlogsnow

----------------********------------------

*Remove non-important suid binaries :--

/scripts/secureit

----------------********------------------

*Install Frontpage 4+ on an account :--

/scripts/setupfp4

----------------********------------------

*Return a Simple process list. Useful for finding where cgi scripts are running from :--

/scripts/simpleps

----------------********------------------

*Suspend an account :--

/scripts/suspendacct

----------------********------------------

*Syncup Cpanel RPM Updates :--

/scripts/sysup

----------------********------------------

*Unblock an IP :--

/scripts/unblockip

----------------********------------------

*UnSuspend an account :--

/scripts/unsuspendacct

----------------********------------------

*Update Cpanel :--

/scripts/upcp

----------------********------------------

*Update /scripts :--

/scripts/updatenow

----------------********------------------

*Create a New Account :--

/scripts/wwwacct

----------------********------------------

*Awstats to run manually :--

/scripts/runweblogs account_username

----------------********------------------

*License Not working :--

rdate -s rdate.darkorb.net

----------------********------------------

All done...