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  

Apache commands

Apache commands

#!/bin/sh echo “————————” echo “Verify Configuration” echo “————————” /opt/apache/bin/httpd -f /opt/apacheconf/httpd.conf -t -S

echo “————————” echo “Start Apache” echo “————————”

/opt/apache/bin/httpd -f /opt/apacheconf/httpd.conf -k start

echo “————————” echo “List HTTP Processes” echo “————————” sleep 3 ps -ef | grep http

Custom script to stop Apache (stop_apache.sh) #!/bin/sh

echo “————————” echo “Stop Apache” echo […]

Setup X-Forwarded Proto in Apache

Setup X-Forwarded Proto in Apache

RequestHeader set X-Forwarded-Proto “http”

RequestHeader set X-Forwarded-Proto “https”

JBOSS virtual hosts

JBOSS virtual hosts

Edit /opt/jboss5.0/jboss-as/server/default/deploy/jboss.sar/server.xml to include your virtual hosts.

www.rmohan.com webtest.rmohan.com somename.rmohan.com

Using Apache mod_jk with BigIP LTM and JBOSS

Using Apache mod_jk with BigIP LTM and JBOSS

Using Apache mod_jk with BigIP LTM and JBOSS

1) Make sure your JBOSS is running and listening on AJP port 8009

2) LTM Load Balancer Configuration a) Create a TCP monitor jboss-tcp-monitor using parent profile TCP b) Create a Virtual Server with port 8009 c) Create a […]

Jboss with Apache integration

Jboss with Apache integration

Jboss Apache integration is same procedure of Tomcat Setup. 🙂 so they are not hard to so.

1) Download mod_jk module from

http://www.gtlib.gatech.edu/pub/apache/tomcat/tomcat-connectors/jk/binaries/linux/jk-1.2.28/i586/

2) Copy mod_jk-1.2.28-httpd-2.2.X.so to /opt/apacheconf

3) Edit the httpd.conf and add the following line Include /opt/apacheconf/mod-jk.conf

4) Create /opt/apacheconf/mod-jk.conf file with the following content LoadModule jk_module /opt/apacheconf/mod_jk-1.2.28-httpd-2.2.X.so JkWorkersFile […]

Jboss Linux Tuning

Jboss Linux Tuning

Linux Tuning Optimization

1) Commands to check current settings before updating sys parameters ——————————————————— cat /proc/sys/fs/file-max

ulimit -n

cat /proc/sys/net/core/rmem_default cat /proc/sys/net/core/wmem_default cat /proc/sys/net/core/rmem_max cat /proc/sys/net/core/wmem_max

/sbin/ifconfig -a eth0 Link encap:Ethernet HWaddr inet addr: Bcast: Mask: inet6 addr: fe80::250:56ff:febf:7f5a/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:9313376 errors:0 dropped:0 overruns:0 frame:0

[…]

Vi Editior

Vi Editior

How to copy data in VI editor

vi first edit source file then move your cursor to start of selection ma mark current position with letter a then move your cursor to end of selection y’a yank to buffer x from current position to mark a :e other edit target file move […]

Memory commands

Memory commands

How do I find out System / Server Memory Utilization under RHEL / CentOS / any other Linux distribution?

A. You need to use free command which, displays the total amount of free and used physical and swap memory in the system, as well as the buffers used by the kernel. free […]

CPU COMMAND

CPU COMMAND

PU COMMAND

10 cpu usage command

ps -e -o pcpu,cpu,nice,state,cputime,args –sort pcpu | sed ‘/^ 0.0 /d’

####Watch changeable data continuously

watch -n.1 ‘cat /proc/interrupts’

cat /proc/interrupts

Check CPU Temperature # echo `date +%b-%d-%H:%M:%S` | tr -d ‘\ 012’ ; echo -n ‘ ‘; sensors | awk ‘/CPU Temp:/{ print $3 }’

[…]

Linux System Monitoring Commands

Linux System Monitoring Commands

#1: top – Process Activity Command

Commonly Used Hot Keys

The top command provides several useful hot keys: Hot Key Usage t Displays summary information off and on. m Displays memory information off and on. A Sorts the display by top consumers of various system resources. Useful for quick identification of […]