Monday, March 2, 2009

Installing java and tomcat(Binary installation)

Install Java

1. Download java from sun website
2. Move that file to /tmp directory
3. Run that bin using sh /tmp/jdk1.5.bin
4. It will create a directory jdk move this folder to /opt
5. Create a symbolic link inside /opt itself ln -s /usr/java/jdk1.5 java

installing Tomcat

1. Download tomcat tar file from web site
2. Extract it and move to /opt /tomcat
3. make a symbolic link ln -s tomcat Tomcat
4. Create a user called tomcat and mention home directory (useradd -d /opt/tomcat tomcat )
5. Change the ownership of the file of tomcat directory (chown -r tomcat.tomcat tomcat)
6 . Mention java home directory in vim /opt/tomcat/bin/catalina.sh
you can mention it any were top of that file
JAVA_HOME=/opt/java
make cygwin=false
7 To start or stop the service got /opt/tomcat/bin (Better login as tomcat user and start it)
./startup.sh
./shutdown.sh

You can check tomcat working or not .Open a browser and type Localhost:8080 if you get tomcat page your installation was success :)


java files you can put in /opt/tomcat/webapps

go to httpd.conf file mention this line
ProxyPass /javafolder http://localhost:8080/javafolder

No comments:

curl and cacert

curl -v --cacert cacert.pem https://www.example/cgi-bin/f ile.xgi -I -X POST