Tuesday, May 15, 2012

Install Sun Java and Tomcat 6 on SLES 11 SP2

1) Install Sun Java
>rpm ivh jdk-6u31-linux-amd64.rpm
2) Upgrade zlib library by rpm
>rpm -Uvh zlib-*.rpm

zlib-1.2.5-8.1.x86_64.rpm


zlib-devel-1.2.5-8.1.x86_64.rpm
3) Install belows required libraries from SLES 11 SDK
>rpm -ivh lib*.rpm
libapr-util1-1.3.9-9.2.x86_64.rpm
libapr1-1.4.2-3.1.x86_64.rpm
libapr1-devel-1.4.2-3.1.x86_64.rpm
libdb-4_8-4.8.30-2.4.x86_64.rpm
libopenssl-devel-1.0.0c-17.1.x86_64.rpm
libopenssl1_0_0-1.0.0c-17.1.x86_64.rpm
4) Install libtcnative
zypper install libtcnative*

/usr/lib64 # ln -s libtcnative-1.so.0 libtcnative-1.so
5) Start Tomcat



Thursday, May 3, 2012

Install HP 10G Driver on ESXi 4.0


To update or add drivers on existing VMware ESX and ESXi Server 4.0 installations using vihostupdate:
1. Power on the ESX or ESXi Server host.
2. Place the driver CD in the CD-ROM drive of the host on which either the vSphere CLI package is
installed or vMA is hosted.
http://h20565.www2.hp.com/portal/site/hpsc/template.PAGE/public/psi/swdHome/?sp4ts.oid=4274763&spf_p.tpst=psiSwdMain&spf_p.prp_psiSwdMain=wsrp-navigationalState%3Dlang%253Den%257Ccc%253DUS%257CprodNameId%253D4274763%257CprodSeriesId%253D4194735%257CswLang%253D8%257CswEnvOID%253D4115%257Caction%253DlistDriver&javax.portlet.begCacheTok=com.vignette.cachetoken&javax.portlet.endCacheTok=com.vignette.cachetoken
3. Log in to vMA.
4. Configure VI fast path-> vifp addserver (ESXi Server host IP address).
5. Initialize fast path to the correct ESXi Server vifpinit (IP address).
6. Mount the ISO image from vMA.
7. Run the vihostupdate command to install drivers using the offline bundle:

vihostupdate --install --bundle <offline_bundle>.zip

E.g.

vihostupdate --install --bundle EMU-be2net-4.0.306.0-offline_bundle-473366.zip
vihostupdate --install --bundle hp-esxi4.0uX-bundle-1.6-5.zip
vihostupdate --install --bundle BCM-bnx2-2.0.22f.v40.1-offline_bundle-383735.zip
vihostupdate --install --bundle BCM-tg3-3.120h.v40.1-offline_bundle-543909.zip
vihostupdate --install --bundle ntx-nx_nic-4.0.614-164009-offline_bundle-674775.zip
vihostupdate --install --bundle qlg-qlcnic-4.0.727-164009-offline_bundle-483210.zip
vihostupdate --install --bundle SVE-be2net-2.102.518.0-offline_bundle-329992.zip

Friday, April 6, 2012

Apache Tomcat / Java SE 6 HotSpot[tm] Virtual Machine Garbage Collection Tuning

http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html

Sample for 2G Memory Machine with 1.5G HugePage for short session jsp

JAVA_OPTS="$JAVA_OPTS -server -XX:+UseLargePages -Xms1280M -Xmx1344M -Xss256K -XX:PermSize=128M -XX:MaxPermSize=192M -XX:NewSize=1024M -XX:TargetSurvivorRatio=90 -verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -XX:+PrintTenuringDistribution -XX:+PrintHeapAtGC -XX:+UseTLAB -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSClassUnloadingEnabled -XX:MaxTenuringThreshold=23 -XX:SurvivorRatio=10 -XX:+ExplicitGCInvokesConcurrent -XX:+DisableExplicitGC -XX:CMSInitiatingOccupancyFraction=70 -XX:CMSInitiatingPermOccupancyFraction=90 -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSIncrementalPacing -XX:+HeapDumpOnOutOfMemoryError -XX:+CMSIncrementalMode -XX:ParallelGCThreads=2 -XX:+CMSConcurrentMTEnabled -XX:ConcGCThreads=3 -Dfile.encoding=UTF8 -XX:+UseCMSCompactAtFullCollection -XX:+CMSParallelRemarkEnabled  -XX:ReservedCodeCacheSize=32M -XX:MaxGCPauseMillis=20 -XX:MaxGCMinorPauseMillis=4"

Sample for 4G Memory Machine with 3G HugePage for short session jsp

JAVA_OPTS="$JAVA_OPTS -server -XX:+UseLargePages -Xms2048M -Xmx2560M -Xss256K -XX:PermSize=384M -XX:MaxPermSize=512M -XX:NewSize=1536M -XX:TargetSurvivorRatio=90 -verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -XX:+PrintTenuringDistribution -XX:+PrintHeapAtGC -XX:+UseTLAB -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSClassUnloadingEnabled -XX:MaxTenuringThreshold=23 -XX:SurvivorRatio=10 -XX:+ExplicitGCInvokesConcurrent -XX:+DisableExplicitGC -XX:CMSInitiatingOccupancyFraction=70 -XX:CMSInitiatingPermOccupancyFraction=90 -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSIncrementalPacing -XX:+HeapDumpOnOutOfMemoryError -XX:+CMSIncrementalMode -XX:ParallelGCThreads=2 -XX:+CMSConcurrentMTEnabled -XX:ConcGCThreads=3 -Dfile.encoding=UTF8 -XX:+UseCMSCompactAtFullCollection -XX:+CMSParallelRemarkEnabled  -XX:ReservedCodeCacheSize=32M -XX:MaxGCPauseMillis=20 -XX:MaxGCMinorPauseMillis=4"

Sample for 4G Memory Machine with 3G HugePage for long session jsp

JAVA_OPTS="$JAVA_OPTS -server -XX:+UseLargePages -Xms1536M -Xmx2048M -Xss256K -XX:PermSize=512M -XX:MaxPermSize=768M -XX:NewSize=256M -XX:MaxNewSize=768M -XX:TargetSurvivorRatio=90 -verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -XX:+PrintTenuringDistribution -XX:+PrintHeapAtGC -XX:+UseTLAB -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSClassUnloadingEnabled -XX:MaxTenuringThreshold=8 -XX:SurvivorRatio=6 -XX:+ExplicitGCInvokesConcurrent -XX:+DisableExplicitGC -XX:CMSInitiatingOccupancyFraction=70 -XX:CMSInitiatingPermOccupancyFraction=90 -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSIncrementalPacing -XX:+HeapDumpOnOutOfMemoryError -XX:ParallelGCThreads=2 -XX:+CMSConcurrentMTEnabled -XX:ConcGCThreads=3 -Dfile.encoding=UTF8 -XX:+UseCMSCompactAtFullCollection -XX:+CMSParallelRemarkEnabled -XX:MaxGCPauseMillis=20 -XX:MaxGCMinorPauseMillis=4"




CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9001 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=127.0.0.1 -Xloggc:/var/opt/apache-tomcat/logs/gc.log"


pkill -f jstatd

jstatd -J-Djava.security.policy=$CATALINA_HOME/conf/catalina.policy -J-Djava.rmi.server.hostname=127.0.0.1 &




If you get this error on Linux
Java HotSpot(TM) 64-Bit Server VM warning: Failed to reserve shared memory (errno = 12)

Add the following to /etc/sysctl.conf

kernel.shmmax = 3221225472
vm.nr_hugepages = 1536
vm.hugetlb_shm_group = 1000



Add the following to /etc/security/limits.conf

*    soft    memlock unlimited
*    hard    memlock unlimited

Friday, March 23, 2012

ADMT 3.2

Microsoft Document is suck...

This is another better testing procedure I found on the web.


1. On all DC's failure auditing must be enabled:
 --> Policy -> Computer configuration -> windows settings -> security policy -> local policy -> auditing policy -> Audit Accountmanagement (failure and success)
2. On the destination and the source DC the following group policy should be configured simmilar:
 --> Policy -> Computer configuration -> windows settings -> security policy -> local policy -> security options -> Network Security: LAN Manager Authentication
3. Both Domain Admins should be member of the BuiltIn Group Administrators in the other domain
4. Set the registry key hkey_local_machine\system\currnetcontrolset\control\lsa\tcpipclientsupport to 1 on the source dc
5. Disable SID Filtering with netdom.exe and commandline
-->On target dc:
netdom trust {FQDN of target domain} /domain:{FQDN of source domain} /enablesidhistory:yes
netdom trust {FQDN of target domain} /domain:{FQDN of source domain} /quarantine:no
-->On source dc:
netdom trust {FQDN of source domain} /domain:{FQDN of target domain} /enablesidhistory:yes
netdom trust {FQDN of source domain} /domain:{FQDN of target domain} /quarantine:no
6. On the source DC create a local security group in the domain
--> Name: NetBiosNameoftheDomain$$$$ for examble: subdomain$$$
7. gpupdate /force on both domains
8. Add the Domain Admins global group from the target domain to the Administrators local group in the source domain.
9. Test the trust in AD Domains and Trusts

Wednesday, March 14, 2012

Disable unnecessary SLES 11 Service

chkconfig --level 23456 portmap off
chkconfig --level 23456 autofs off
chkconfig --level 23456 smartd off
chkconfig --level 23456 acpid off
chkconfig --level 23456 nfs off
chkconfig --level 23456 splash off
chkconfig --level 23456 splash_early off
chkconfig --level 23456 postfix off
chkconfig --level 23456 alsasound off
chkconfig --level 23456 dbus off
chkconfig --level 23456 network-remotefs off

Install VMware-Tools in SLES 11 SP2 for VMware on ESXi 4.0u4

http://packages.vmware.com/tools/docs/manuals/osp-esx-41-install-guide.pdf

As SLES 11 SP2 is not supported on ESXi 4.0 so we use ESXi 4.1 VMware-Tools.

rpm --import http://packages.vmware.com/tools/VMWARE-PACKAGING-GPG-KEY.pub

wget http://packages.vmware.com/tools/esx/4.1latest/sles11sp2/SRPMS/vmware-open-vm-tools-kmod-8.3.12-559003.src.rpm

YaST2 --install gcc kernel-source kernel-syms

rpmbuild --rebuild vmware-open-vm-tools-kmod-8.3.12-559003.src.rpm


rpm -ivh /usr/src/packages/RPMS/x86_64/vmware-open-vm-tools-kmod-3.0.13-0.27-default-8.3.12-559003.x86_64.rpm


zypper addservice --type=YUM  http://packages.vmware.com/tools/esx/4.1latest/sles11sp2/x86_64/ vmware-tools-collection

zypper install vmware-tools

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

zypper addservice --type=YUM http://packages.vmware.com/tools/esx/latest/sles11.2/x86_64 vmware-tools-collection