SJSW can be used in several ways, like a Servlet/JSP engine and or a Static File serving server and or running traditional NSAPI plug ins. Unless a lot of caching or huge Java-Heap is needed, the 32bit web server is good for most generic cases. Given below are some generic tunings applicable to a server capable of serving all of the above for about 8000 connections. magnus.conf --------------------- ListenQ: 8192 ConnQueueSize: 8192 RqThrottle: 128 ThreadIncrement: 128 UseNativePoll: 1 KeepAliveTimeout: 30 MaxKeepAliveConnections: 8192 KeepAliveThreads: 2 KeepAliveQueryMeanTime: 50 Init fn="cache-init" disable="true" Init fn="pool-init" block-size="65536" nsfc.conf --------------------- FileCacheEnable=on CacheFileContent=on TransmitFile=off MaxAge=3600 MediumFileSizeLimit=1000001 MediumFileSpace=1 SmallFileSizeLimit=500000 SmallFileSpace=1000000000 MaxFiles=16384 MaxOpenFiles=16384 server.xml --------------------- Make sure to use the following JVM parameters <JVMOPTIONS>-server</JVMOPTIONS> <JVMOPTIONS>-Xbatch</JVMOPTIONS> <JVMOPTIONS>-Xloggc:/tmp/gc.log</JVMOPTIONS> <JVMOPTIONS>-Xmx1024m</JVMOPTIONS> <JVMOPTIONS>-Xms1024m</JVMOPTIONS> <JVMOPTIONS>-XX:ParallelGCThreads=4</JVMOPTIONS> <JVMOPTIONS>-XX:+DisableExplicitGC</JVMOPTIONS> <JVMOPTIONS>-XX:-BindGCTaskThreadsToCPUs</JVMOPTIONS> Replace LIBMTMALLOC=/usr/lib/libmtmalloc.so with LIBMTMALLOC=/usr/lib/libumem.so |
Friday, October 8, 2010
Sun One performance configuration paramters
Configure SSL in Weblogic application server
1. Create a Directory C:\MyCertificates
2. Go to above created folder & add new file – build.xml
<project name=”Generate Keystores” default=”all” basedir=”.”> <property name=”alias” value=”alias” /> <property name=”dname” value=”CN=localhost, OU=Customer Support, O=BEA Systems Inc, L=Denver, ST=Colorado, C=US”/> <property name=”keypass” value=”keypass” /> <property name=”identity.jks” value=”identity.jks” /> <property name=”storepass” value=”storepass” /> <property name=”cert.cer” value=”cert.cer” /> <property name=”trust.jks” value=”trust.jks” /> <property name=”jdk.home” value=”C:/bea/jdk150_06″ /> <target name=”all” depends=”create-keystores”/> <target name=”create-keystores”> |
3. Now Open a command/Shell Prompt and then run the <bea.home>\weblogic92\server\bin\startWLS.cmd to weblogic specific environment details.
4. Run the <ant.home>/bin/ant to create all the required Certificates.
5. Create a wlst script to configure the ssl on weblogic, copy below contain to text file and name as ssl.py.
Note that we need to edit the details highlighted in
cd ("/Servers/" + server_name) |
6. Run the command <bea.home>\weblogic92\common\bin\wlst.cmd
Or even we can configure manually by using Admin console for that follow below steps
7. Now Login to the Admin Console to Configure these Certificates…
Home >Summary of Servers >AdminServer > General SSL Listen Port: Enabled (Check) SSL Listen Port: 7002 Home >Summary of Servers >AdminServer > Keystores Keystores: Custom Identity Custom Trust Identity Custom Identity Keystore: <path>/identity.jks Custom Identity Keystore Type: JKS Custom Identity Keystore Passphrase: storepass Confirm Custom Identity Keystore Passphrase: storepass Trust Custom Trust Keystore:<path>/trust.jks Custom Trust Keystore Type: JKS Custom Trust Keystore Passphrase: storepass Confirm Custom Trust Keystore Passphrase: storepass Click SAVE Home >Summary of Servers >AdminServer > SSL Identity and Trust Locations: Keystores Private Key Alias: alias Private Key Passphrase: keypass Confirm Private Key Passphrase: keypass Click SAVE |
Now try to access the Admin Console…on HTTPS port
https://localhost:7002/consoleOpenldap - opensource ldap server
1. Download the below two files,
i. openldap-2.2.29-db-4.3.29-openssl-0.9.8a-win32_Setup.exe
ii. openldap-for-windows.msi
2. Edit slapd.conf under C:\Program Files\OpenLDAP location with below
# $OpenLDAP: pkg/ldap/servers/slapd/slapd.conf,v 1.23.2.8 2003/05/24 23:19:14 kurt Exp $ # # See slapd.conf(5) for details on configuration options. # This file should NOT be world readable. # ucdata-path ./ucdata #include ./schema/core.schema ## updated selfcare schemas include ./schema/selfcare/Attributes.schema include ./schema/selfcare/ObjClass.schema include ./schema/selfcare/ppolicy.schema #include ./schema/cosine.schema #include ./schema/nis.schema #include ./schema/inetorgperson.schema #include ./schema/openldap.schema #include ./schema/dyngroup.schema #include ./schema/java.schema #include ./schema/attribute.schema #include ./schema/object.schema # Load dynamic backend modules: # modulepath /usr/lib/openldap # or /usr/lib64/openldap # moduleload accesslog.la # moduleload auditlog.la # moduleload back_sql.la # moduleload denyop.la # moduleload dyngroup.la # moduleload dynlist.la # moduleload lastmod.la # moduleload pcache.la # moduleload ppolicy.la # moduleload refint.la # moduleload retcode.la # moduleload rwm.la # moduleload syncprov.la # moduleload translucent.la # moduleload unique.la # moduleload valsort.la # Global Definitions serverID 1 password-hash {SHA} threads 20 concurrency 20 #gentlehup on #idletimeout 300 #loglevel -1 sizelimit 1000 #timelimit 3600 #readonly off lastmod on #schemacheck on # Define global ACLs to disable default read access. # Do not enable referrals until AFTER you have a working directory # service AND an understanding of referrals. #referral ldap://root.openldap.org pidfile ./run/slapd.pid argsfile ./run/slapd.args # Load dynamic backend modules: # modulepath ./libexec/openldap # moduleload back_bdb.la # moduleload back_ldap.la # moduleload back_ldbm.la # moduleload back_passwd.la # moduleload back_shell.la # Enable TLS if port is defined for ldaps TLSVerifyClient never TLSCipherSuite HIGH:MEDIUM:-SSLv2 TLSCertificateFile ./secure/certs/server.pem TLSCertificateKeyFile ./secure/certs/server.pem TLSCACertificateFile ./secure/certs/server.pem # Sample security restrictions # Require integrity protection (prevent hijacking) # Require 112-bit (3DES or better) encryption for updates # Require 63-bit encryption for simple bind # security ssf=1 update_ssf=112 simple_bind=64 # Sample access control policy: # Root DSE: allow anyone to read it # Subschema (sub)entry DSE: allow anyone to read it # Other DSEs: # Allow self write access # Allow authenticated users read access # Allow anonymous users to authenticate # Directives needed to implement policy: # access to dn.base="" by * read # access to dn.base="cn=Subschema" by * read # access to * # by self write # by users read # by anonymous auth # # if no access controls are present, the default policy is: # Allow read by all # # rootdn can always write! ####################################################################### # bdb database definitions ####################################################################### database bdb suffix "o=Root" rootdn "o=Root" # Cleartext passwords, especially for the rootdn, should # be avoid. See slappasswd(8) and slapd.conf(5) for details. # Use of strong authentication encouraged. #rootpw secret rootpw {SSHA}ZKKuqbEKJfKSXhUbHG3fG8MDn9j1v4QN # The database directory MUST exist prior to running slapd AND # should only be accessible by the slapd and slap tools. # Mode 700 recommended. directory ./data dirtyread searchstack 20 # Indices to maintain index mail pres,eq index objectclass pres index default eq,sub index sn eq,sub,subinitial index telephonenumber index cn index ou #index numsubordinates pres ##extra #pwdFailureCountInterval 1 |
3. Start ldap server by running the run.cmd file from path
C:\Program Files\OpenLDAP\run
4. Commands
slapd -d -1 -h ldap://127.0.0.1 -f slapd1.conf ldapadd -h <ip> -p <port> -D "o=Root" -w <password> -f openldap.ldif ldapsearch -v -h <ip> -p <port> -D "o=Root" -w <password> -b 'o=Root' (ou=*)' ldapmodify -h <IP> -p <port> -D "o=Root" -w <password> -f |
Ant task to deploy applicaion on to running weblogic server
Steps:
1. Call <<bea_home>>\weblogic92\server\bin\startWLS.cmd to set weblogic specific env details
2. Create a file build.properties and add below details
deploy.name=ApplicationName deploy.source=Application.war wls.hostname=127.0.0.1 wls.port=7001 wls.username=weblogic wls.password=weblogic deploy.target=AdminServer |
3. Create a file build.xml as shown below
<?xml version="1.0" encoding="UTF-8"?> <project default="deploy" name="Test"> <!-- These targets added to control wls deploy, undeploy & redploy from ant tool --> <taskdef name="wlserver" classname="weblogic.ant.taskdefs.management.WLServer"> <classpath> <pathelement location="${wl.home}/lib/weblogic.jar" /> </classpath> </taskdef> <!-- Deploying Applications --> <target name="deploy"> <wldeploy debug="true" action="deploy" name="${deploy.name}" source="${deploy.source}" user="${wls.username}" nostage="true" password="${wls.password}" verbose="true" adminurl="t3://${wls.hostname}:${wls.port}" targets="${deploy.target}" /> </target> <!-- Redeploying Applications --> <target name="redeploy"> <wldeploy action="redeploy" name="${deploy.name}" user="${wls.username}" nostage="false" password="${wls.password}" verbose="true" adminurl="t3://${wls.hostname}:${wls.port}" targets="${deploy.target}"/> </target> <!-- Uneploying Applications --> <target name="undeploy"> <wldeploy action="undeploy" name="${deploy.name}" failonerror="false" user="${wls.username}" password="${wls.password}" verbose="true" adminurl="t3://${wls.hostname}:${wls.port}" targets="${deploy.target}" /> </target> </project> |
4. Run <<ant_home>>\bin\ant deploy
Subscribe to:
Posts (Atom)