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  

INSTALL SSL Wildcard Certificate MULTIPLE SUBDOMAINS

INSTALL SSL Wildcard Certificate MULTIPLE SUBDOMAINS

Some sub-rmohans share the master rmohan’s SSL Wildcard Certificate,

like as a.rmohan.com and b.rmohan.com share a SSL Wildcard Certificate of *.rmohan.com.

1. put the certificate to the propel place 2. configure apache a. enable name base virtual host ” NameVirtualHost *:443 ” b. make sure listen 443 port […]

LVM

LVM

First LVM Setup

1) fdisk /dev/sdb

WARNING: DOS-compatible mode is deprecated. It’s strongly recommended to switch off the mode (command ‘c’) and change display units to sectors (command ‘u’).

Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-13054, default 1): Using default […]

Create a Logical Partion

Creation deletion of Logical Partition and extended

1) List the Partition Table

[root@localhost ~]# fdisk -l

2) Create Extended Partition on the New disk /dev/sdb

fdisk /dev/sdb

[root@localhost ~]# fdisk /dev/sdb Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk […]

SUDO on Linux

SUDO on Linux

cat /etc/passwd

test:x:500:500:test:/home/test:/bin/bash

[root@localhost ~]# cp /etc/sudoers [root@localhost ~]# cp /etc/sudoers /etc/sudoers.org

1) Full Permission to User # User privilege specification test ALL=(ALL) ALL

Let restart apache with out sudo

[test@localhost ~]$ /etc/init.d/httpd restart rm: cannot remove `/var/run/httpd/httpd.pid’: Permission denied

test@localhost ~]$ sudo /etc/init.d/httpd restart [sudo] password for test: […]

Balancing Traffic Across Data Centres Using LVS

Source is taken from http://www.linuxforu.com/2009/05/balancing-traffic-across-data-centres-using-lvs/

SCP

Fast SCP SCP is a great way to copy files from somewhere to somewhere else, but as we all know it can be slower than (insert slow metaphor here). Here’s a way you can get way speedier(really a word?) transfers using scp.

scp -c arcfour -C sourcefile desthost: BY This way we can copy the […]

Logging on Apache

Apache server behind a proxy server

If you are using an apache server behind a proxy server, you may find that in your log files you will be given the proxy IP as the source IP of the connection. This is true, however you can adjust the apache log settings to pass the X-Forwarded-For […]

Netstat

Netstat

netstat -antpuleo

Will display the Timer running on the service

Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name Timer tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 0 9169 1246/rpcbind off (0.00/0/0) tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 0 22083 14524/sshd off (0.00/0/0) tcp 0 0 0.0.0.0:36998 0.0.0.0:* LISTEN […]

HTTPD process check

HTTPD process check

The apache/httpd config file has a setting which determines how many running processes your apache /httpd daemon will commit to the system. The idea is, that if your web server needs more processes to handle more connections it will spawn a new child and serve the request. If it is able it […]

Eating your memory? Let is find Out

Works on CENTOS AND FEDORA Prints the top 10 memory consuming processes

TR=`free|grep Mem:|awk ‘{print $2}’`;ps axo rss,comm,pid|awk -v tr=$TR ‘{proc_list[$2]+=$1;} END {for (proc in proc_list) {proc_pct=(proc_list[proc]/tr)*100; printf(“%d\t%-16s\t%0.2f%\n”,proc_list[proc],proc,proc_pct);}}’|sort -n |tail -n 10