June 2012
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

June 2012
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Grep Command

Grep Command

some examples of grep command:

* Print Apache’s documentroot directory name:

$ grep -i documentroot /etc/httpd/conf/httpd.conf

* View file contents without comments and empty lines:

$ grep -Ev “^$|^#” /etc/my.cnf

* print only IP address assigned to the interface:

$ ifconfig eth0 | grep ‘inet addr:’ | cut -d’:’ -f2 | awk […]

FIND Command

FIND Command

Find is a versatile tool which can be used to locate files and directories satisfying different user criteria. But the sheer number of options for this command line tool makes it at the same time both powerful and encumbering for the user. Here I will list a few combinations which one can […]

MYSQL Back On Unix

MYSQL Back On Unix

Shell script is a script where we are writing different types of commands and executing those commands from a single file. We can execute that command manually, by entering command one by one. But if we use shell script we have to write those commands into a text file for […]

IPTABLES Rules

Limiting Spam and Attacks Security – Training You can use a bridge to effectively limit spam and attacks by managing the IP Ranges per Country.The basis behind the thought here is that these IP Address Ranges probably do not need access to your network in any way, unless you are an International business. By blocking […]

Bind Configuration in Chroot Environment

Bind Configuration in Chroot Environment Wriiten by Babar Zahoor

Dated:12-01-2010

Pupose: Configuration of DNS (Bind) server in chroot environment.

OS CentOS 5.4 X86_64

————————————- Please Install the bind packages ————————————-

[root@ns1 ~]# yum install bind bind-utils bind-* Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: virror.hanoilug.org * extras: ftp.hostrino.com * updates: ftp.hostrino.com […]

VSFTP

CentOS 6

vsftpd 2.2.2

su – root

yum install vsftpd

cd /etc/vsftpd/

vi config

anonymous_enable=NO This is set to YES by default.

local_enable=YES This is set to NO by default and change when you want the local users to have ftp access.

xferlog_enable=Yes This is set to NO by default. Your logs will be written […]

10 Apache Security and Hardening Tips

10 Apache Security and Hardening Tips

Tip No. 1: Disable Apache Signature and/or Apache Banner

# ServerSignature Off # ServerTokens ProductOnl

Tip No. 2: The Trace HTTP Request

Add the following to the web-server’s configuration file. For example alter the following file in Ubuntu: /etc/apache2/apache2.conf .

* TraceEnable off

Tip 3: Remove PHP scripts […]

Fedora

Building High Performance webserver On Centos in Dell Servers

Performance tuning a CentOS LAMP web server for high traffic volumes

This document is prepared and Posted on August 17, 2010 by William Jamieson – Thank you very much William 🙂

Performance tune a LAMP server to handle approximately 70 full page loads per second which equated to 4,250 concurrent virtual users. We ended […]

swap issues on Linux and clear the swap usage

swap issues on Linux

clear the swap usage

free -to (Total memory usage)

free -m (Memory usage of swap)

swapoff -a && swapon -a ( swap off and on)

free

cat /proc/swaps sync; echo 3 > /proc/sys/vm/drop_caches

To free pagecache: # echo 1 > /proc/sys/vm/drop_caches

To free dentries and inodes: […]