Install and configure Tomcat + Apache + mod_jk -- Linux Enterprise Application-Linux server application information. For more information, see. Advantages: the configuration is simple and efficient, avoiding the trouble of compiling webapp. so.
Disadvantages: mod_jk in linux is hard to find.
1. Install JDK. This is very simple. Run
./J2sdk1.4.1 _ 02.bin
Cp-R j2sdk1.4.1 _ 02 // usr/local/j2sdk141
Export JAVA_HOME =/usr/local/j2sdk141
Export PATH = $ PATH:/usr/local/j2sdk141/bin:/usr/local/j2sdk141/jre/bin
Export CLASSPATH = "./:/usr/local/j2sdk141/lib:/usr/local/j2sdk141/jre/lib" # Set Environment Variables
2. install Tomcat 4.1.29and copy the downloaded Tomcat 1.4.29.tar.gz file to the corresponding directory.
Tar xvzf tomcat4.1.29.tar.gz
Cp tomcat4.1.29/usr/local/tomcat4
Export CATALINA_HOME =/usr/local/tomcat4 # Set Environment Variables
3. install apache and redhat. I installed 2.40.20 with redhat9.
4. Installed mod_jk, I installed mod_jk-tomcat4.1.18-rh80.i386.rpm, support tomcat4.xx and httpd2.xx series version.
Note: Only by installing jdk and tomcat in a specific directory can mod_jk be detected, So we force install
Rpm-I -- nodeps mod_jk.rpm
Now all the required software has been installed, and the rest is the configuration work.
5. mod_jk Configuration
Cd/etc/httpd/conf/
Vi mod_jk.properties
Modify workers. tomcat_home is the tomcat installation directory, workers. java_home is the jdk installation directory. Note that the default port connecting to tomcat in this file is 8109, but the default port on tomcat is 8009, So modify it here.
Workers. tomcat_home =/usr/local/tomcat4
Workers. java_home =/usr/local/j2sdk141
Worker. list = ajp13
Worker. ajp13.port = 8009
Worker. ajp13.host = localhost
Worker. ajp13.type = ajp13
6. apache configuration
Vi httpd. conf
Add the following line to LoadModule
LoadModule jk_module modules/mod_jk.so
Add the configuration file mod_jk.