How to Configure Tomcat Web Server in Linux

1. First install the rpm of tomcat from tarball in /usr/local dir

cp jakarta-tomcat-5.0.24.tar.gz /usr/local /
2. tar –xzvf jakarta – tomcat-5.0.24.tar.gz
3. Make a symbolic link
ln –s /usr/local/Jakarta-tomcat-5.0.24 /usr/local/tomcat
4.Go to /etc/profile and add the lines above the following line
export JAVA_HOME=/usr/java/j2sdk1.4.2_05
export CATALINA_HOME=/usr/local/tomcat

5. cd /etc
6. . . /profile
7. echo $JAVA-Home

Start the tomcat service by
/ usr /local/tomcat/bin /startup. Sh

Open the following file
9. pico /usr/local /tomcat/conf/tomcat- users.xml and add the following lines

user username = “TomcatAdmin” Password = “password”
Full Name =’” ‘role = “admin, manager , tomcat”/>

Restart the service of tomcat

This will authenicate the user of tomcatAdmin

2. Install the java from the cdrom
rpm –ivh java.xxxx.rpm
3. Install the mysql from cdrom
rpm –ivh

You can access the mysql by sqlyog software at windows, but just writing the username “root” without any password. If you want to create some password for some user then follow the following steps

mysql> use mysql;
Database changed

mysql> INSERT INTO user (Host, User, Password, Select_priv) VALUES ('','eis', password('pucit'), 'Y');
Query OK, 1 row affected (0.00 sec)

mysql> GRANT ALL ON hello.* TO eis;
Query OK, 0 rows affected (0.00 sec)

Now you can login by using the username “eis” with password “pucit” in sqlyoq.

4. For to use the admin of jakarta-tomcat you can , access it by
http:// ip-address:8080/admin

It will require the username and password which you have mentioned in the file
/ usr / local /tomcat/conf/tomcat- users.xml

It will open for you the administration of tomcat, you can create different websites on the same machine

5. Now insert a rule of just insert a rule of IPTABLES to redirect the PORT 8080 of tomcat to PORT 80 of HTTP

iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-port 8080

6. For to use the mysql just start its service
/etc/init.d/mysql start
7. You can restart the tomcat service as

8. Now you can access your website

Forex Trading