Skip to main content

How to create a Tomcat Instance

Prerequisite:

How to set JAVA_HOME / PATH variables in Windows


1. Create a serverA directory in C:\Apache\Tomcat. This should result to C:\Apache\Tomcat\serverA
2. Create the following empty folders bin, conf, lib, log, temp, webapps, work. There the same folders found in C:\Apache\Tomcat\apache-tomcat-6.0.26
3. In C:\Apache\Tomcat\serverA\bin create startup.bat and put the following 
       
set CATALINA_HOME=C:\Apache\Tomcat\serverA
C:\Apache\Tomcat\apache-tomcat-6.0.26\bin\startup.bat
   
4. In C:\Apache\Tomcat\serverA\bin create shutdown.bat and put the following

set CATALINA_HOME=C:\Apache\Tomcat\serverA
C:\Apache\Tomcat\apache-tomcat-6.0.26\bin\shutdown.bat

5. In C:\Apache\Tomcat\serverA\bin create setenv.bat and put the following. Note that this is where heap size is set.

6. Copy the content of C:\Apache\Tomcat\apache-tomcat-6.0.26\webapps to C:\Apache\Tomcat\serverA\webapps. This will contain the default applications installed with Tomcat including the manager.

7. Copy the content of C:\Apache\Tomcat\apache-tomcat-6.0.26\conf to C:\Apache\Tomcat\serverA\conf

8. Edit server.xml modify the port numbers. I will leave server to the default ports but all additional instances will be incremented by 1; for example serverB will have port 8081.

9. Edit tomcat-user.xml and rolename=”manager”. This will be used in accessing the manager application.

10. At this point the server can be started using the startup script.

Comments

Popular posts from this blog

How to set CATALINA_HOME/PATH variables in Windows

1. Download  apache-tomcat-6.x.x.zip and unzip to C:\Apache\Tomcat. This should result in C:\Apache\Tomcat\apache-tomcat-6.x.x 2. Right click on the My Computer and select properties 3. Click Advanced Tab 4. Click Environment Variables 5. Under System Variables, click New 6. In the Variable name field, enter CATALINA_HOME 7. In the Variable value field, enter the path to where the Tomcat is installed 8. Under System Variables,  look for Path and click Edit 9. In the Variable value, add %CATALINA_HOME%\bin; 10. Click OK 11. Click Apply

Compressing Javascript and CSS using YUI and ANT

Before we look into more specifics you will have to download these two: 1. YUICompression jar from the Yahoo developer site:  http://yuilibrary.com/download/yuicompressor/ 2. YUIAnt jar file from  http://www.ubik-ingenierie.com/miscellanous/YUIAnt/ Place the YUIAnt.jar and YUICompression jar into the lib directory of the project. build.xml: <property name="tools.lib.dir" value="tools"/> <property name="jsmin.dir" value="jsmin"/> <target name="cleanJSMin" description="Remove all generated files.">     <delete dir="${jsmin.dir}"/> </target> <target name="minify" depends="cleanJSMin" description="Minifiy a set of files">     <taskdef name="yuicompress" classname="com.yahoo.platform.yui.compressor.YUICompressTask">         <classpath>             <pathelement path="${tools.lib.dir}/yuicompressor-2.4....

Integrate Redmine with Eclipse

Install Mylyn Tasks Connector: Web Templates  1. Add Mylyn Incubator plugin into eclipse Name : Mylyn Incubator Location : http://download.eclipse.org/mylyn/incubator/3.8 Adding Redmine Task Repository 1. Open Task Repository View 2. Click Add Task Repository 3. Select Web Template (Advanced) 4. Next 5. Add the following  Server :  http://serverurl /redmine Label : Redmine Instance User ID : Password : Under Additional Settings  - Add loginToken Under Advanced Configuration add the following Task URL : ${serverURL}/issues/ New Task URL :  ${serverURL}/projects/ /issues/new Login Request URL :  ${serverUrl}/login?username=${userId}&password=${password}&authenticity_token=${loginToken}   Login Form URL :  ${serverUrl}/login  Login Token Pattern :  Adding Query to Task List View 1. Open Task List View 2. Right Click - New - Query 3. Select Redmine Instance in the List of Re...