--Linux9 JDK1.4.2 apache2.0.48 Tomcat4.1.29 JK2.0.2 mysql4.0.16
One. Prepare before installation.
1. All components are installed to / usr / local / e789 directory
2. Unzip the command: Tar -Vxzf file name (.tar or .tar.gz)
3. Copy command: CP file name or CP -RF folder name
4. Delete command: RM file name or rm -rf folder name
5. Edit file command: vi file name: Q! Do not save exit: WQ save exit
two. Install JDK 1.4.2
1. Perform a binary ./j2sdk-1_4_2-linux-i586.bin decompressed generated J2SDK1.4.2 folder
2. Return the folder as JDK142
3. Profile (setting environment variable): / etc / profile
Java_home = / usr / local / e789 / jdk142
Export java_home
Tomcat_home = / usr / local / e789 / tomcat4129
Export Tomcat_home
Catalina_home = / usr / local / e789 / tomcat4129
Export catalina_home
Catalina_base = / usr / local / e789 / tomcat4129
Export catalina_base
Apache_home = / usr / local / e789 / apache2048
EXPORT APACHE_HOME
Httpd_home = / usr / local / e789 / apache2048
EXPORT httpd_home
Classpath = / usr / local / e789 / jdk142 / lib: / usr / local / e789 / jdk142 / jre / lib
Export ClassPath
PATH = $ paht: / usr / local / e789 / jdk142 / bin: / usr / local / e789 / jdk142 / jre / bin
three. Install Tomcat 4.1.29
1. Unpacking file jakarta-tomcat-4.1.29.tar.gz
2. Remove the folder after the decompression is Tomcat4129
3. Start (stop) command: ./ bin / startup.sh (shutdown.sh)
4. Test Tomcat: Enter http: // (IP): 8080 in IE, if there is any content, the installation is successful
four. Installation Configuration Apache 2.0.48
1. Unsocompression file httpd-2.0.48.tar.gz
2. Installation: 1. / Configure --with-layout = apache
--Prefix = / usr / local / e789 / apache2048
--enable-module = so
--enable-mods-shared = MOST
--with-mpm = prefork
2make
3make install
3. Profile: /usr/local/e789/apache2048/conf/httpd.conf
Documentroot "/ usr / local / e789 / tomcat4129 / webapps" (will not point to Tomcat's WebApps directory)
4. Startup file :/ bin / httpd -k start (Restart / STOP)
5. Test Apache: Enter http: // (ip) in IE, if there is any content, the installation is successful
Fives. Install JK2
1. Unfocked file JAKARTA-TOMCAT-Connectors-jk2-src-current.tar.gz
2. Remove the folder after the decompression is JK202
3. Execute the buildconf.sh file.
4. Execute the configure file:
1. / jk / native2 / configure --with-apxs2 = / usr / local / e789 / apache2048 / bin / apxs --enable-eAPI
--with-Tomcat41 = / usr / local / e789 / tomcat4129
2make
3make install (I am doing, this order is not easy)
six. Whole and Apache and Tomcat
1. Copy jkjni.so and mod_jk2.so files to Apache's MODULES directory
Cp /usr/local/e789/jk202/jk/build/jk2/apache2/*.so / usr / local / e789 / apache2048 / modules
2. Copy the jk2.properties file to Tomcat's conf directory
Cp /usr/local/e789/jk202/jk/conf/jk2.properties / usr / local / e789 / Tomcat4129 / Conf
3. Copy the worker2.properties file to the cicket directory of Apache
Cp /usr/local/e789/jk202/jk/conf/Worker2.properties / usr / local / e789 / apache2048 / conf
4. Edit JK2.Properties file
vi /usr/local/tomcat/conf/jk2.properties
# List of needed handlers.
Handler.list = ChannelSocket, Request
# Override the default port for the channelsocket
Channelsocket.port = 8009
5. Edit Apache http.conf
Vi /usr/local/apache/conf/http.conf
LoadModule JK2_Module Modules / MOD_JK2.SO
DirectoryIndex index.html index.html.var index.jsp
6. Edit Apache / Conf / Workers2.Properties file
# Only at beginnin. In production uncomment it out [logger.apache2] level = DEBUG [shm] file = / usr / local / apache / logs / jk2.shm size = 1048576 # Example socket channel, override port and host. [Channel . Socket: localhost: 8009] Port = 8009 Host = 127.0.0.1 # define the wor [AJP13: localhost: 8009] channel = channel.socket: localhost: 8009 # uri mapping [uri: *. jsp] worker = ajp13: localhost : 8009 (responsible for sending * .jsp) 7. Edit Tomcat Server.xml
Port = "8009" minprocessors = "5" MaxProcessors = "75" enablelookups = "true" redirectport = "8443" Acceptcount = "10" debug = "0" connectionTIMEOUT = "0" useURIValidationHack = "false" protocolHandlerClassName = "org.apache.jk.server.JKCoyoteHandler" /> <-! Define the top level container in our container hierarchy -> 8. Start Tomcat and Apache test (start Tomcat first) 9. Establish a virtual directory: 1 established in Tomcat / Conf / Server.xml file Unpackwars = "true" autodeploy = "true" Xmlvalidation = "false" xmlnamespaceaWare = "false"> TimeStamp = "true" /> RELOADABLE = "True /> Host> DOCBASE is a real directory 2 is established in the apache / conf / workers2.properties file [URI: / DIRNAME / *. JSP] Work = AJP13: Localhost: 8009 Seven. Install mysql4.0.16 1. Urinkable file: mysql-debug-4.0.16-pc-linux-i686.tar.gz 2. Change the decompressed directory to mysql4016 3. Create User: useradd -g root mysql Passwd -u mysql 4. Change the owner of mysql4016 directory to mysql users: chown -r mysql: root mysql4016 5. Establish a connection file under / usr / local Ln -s / usr / local / e789 / mysql4016 mysql 6. Log in as a MySQL user, run the script to establish an initialization database: Su mysql ./mysql4016/scripts/mysql_install_db EXIT (Back to root) 7. Copy the boot script to the /etc/rc.d/init.d directory CD /etc/rc.d/init.d Cp /usr/local/mysql/support-files/mysql.server mysql 8. Run Chkconfig to add mysql to the system's start-up service group / SBIN / CHKCONFIG - Del mysql / sbin / chkconfig --Add MySQL 9. Test mysql Start: /etc/rc.d/init.d/mysql start If Starting MySQLD daemon with databases from / var / lib / mysql is successful (/ usr / local / mysql / bin / mysql is mysql client program) 10. Finally change the administrator password ./bin/mysqladmin -u root password E789 11. Log in: mysql -u root -p e789