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  

Commands to Monitor Servers (CENTOS AND REDHAT)

Commands to Monitor Servers (CENTOS AND REDHAT)

These commands are mainly for rpm based linux servers like CentOS etc..

May be some commands works in ubuntu servers etc…

Command to find out total established connections, closing connection, TIME_WAIT and much more.

netstat -nat | awk ‘{print $6}’ | sort | uniq -c […]

Remove APF Firewall

How to Remove APF Firewall

# ser­vice ipt­a­bles stop

# chk­con­fig apf off

# /bin/rm –rfv /etc/apf

# /bin/rm –fv /etc/cron.daily/fw

# /bin/rm –fv /etc/init.d/apf

# ipt­a­bles –L –n

Tomcat listen on Server IP Address

Tomcat listen on Server IP Address

Connector Connector address=”192.168.1.10″ port=”8080″ protocol=”HTTP/1.1″ maxHttpHeaderSize=”8192″ maxThreads=”300″ minSpareThreads=”25″ maxSpareThreads=”75″ enableLookups=”false” redirectPort=”8443″ acceptCount=”100″ connectionTimeout=”20000″ disableUploadTimeout=”true”

Connector executor=”tomcatThreadPool” port=”80″ protocol=”HTTP/1.1″ connectionTimeout=”20000″ redirectPort=”8443″ address=”192.168.2.15″

Change Tomcat default port to 80 and 443

Change Tomcat default port to 80 and 443

Tomcat by default runs on port number 8080, However there is high chance get a port conflict with others program. Sometime we just need to change the Tomcat port number. Steps of changing the Tomcat Port

1) Locate server.xml in {Tomcat installation folder}\ conf \

2) […]

LMD (Linux Malware Detect) on centos server

LMD (Linux Malware Detect) on centos server

Homepage: http://www.rfxn.com/projects/linux-malware-detect/ Description: Linux Malware Detect (LMD) is a malware scanner for Linux released under the GNU GPLv2 license, that is designed around the threats faced in shared hosted environments. It uses threat data from network edge intrusion detection systems to extract malware that is actively being used […]

Creating a self-signed SSL Certificate

Creating a self-signed SSL Certificate

How to Enable SSL FOR YOUR OWN WEBSITE.

For this you will need the openssl package. First we want to start by generating a private key.

root@localhost# openssl genrsa -out www.rmohan.com.key 1024 Generating RSA private key, 1024 bit long modulus ………….++++++ ………………..++++++ e is 65537 (0×10001)

Then, we need […]

JBOSS operations script

JBOSS operations script

The scripts are tested on RHEL 5

start_jboss.sh (for clustered environment) ————————————————————————– JAVA_OPTS=”-Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.lang.ClassLoader.allowArraySyntax=true” JAVA_OPTS=”$JAVA_OPTS {you can add your custom JVM / application properties here}”

MULTICAST_ADDR={specify multicast addr} BIND_ADDR=`getip.sh` PARTITION=appname-partition1 SERVER={specify profile name} SERVER_PEER_ID=`getserverpeerid.sh`

$JBOSS_HOME/bin/run.sh -b $BIND_ADDR -c $SERVER -g $PARTITION -u $MULTICAST_ADDR -Djboss.messaging.ServerPeerID=$SERVER_PEER_ID $JAVA_OPTS echo “JBOSS […]

Logging on Jboss

Logging on Jboss

Make your logging choices in the file /opt/jboss5.0/jboss-as/server/default/conf/jboss-log4j.xml

App logs location can be defined in

For example, rollover can be done for each hour by uncommenting

JBOSS Admin Console urls

JBOSS Admin Console urls

JBOSS http://{ip_address}:8080/admin-console http://{ip_address}:8080/jmx-console http://{ip_address}:8080/web-console http://{ip_address}:8080/web-console/status

SSL ON JBOSS

SSL ON JBOSS

SSL Setup is same as Tomcat Procedure

1) Create a keystore using keytool utility

#keytool can be found from Java runtime – /opt/jre1.6.0_18/bin/keytool # Enter values as required

mkdir $JBOSS_HOME/ssl cd $JBOSS_HOME/ssl

$ keytool -genkey -alias jboss -keyalg RSA -keystore jboss.keystore -validity 3650 Enter keystore password: Re-enter new password: What […]