Apache + Tomcat + PHP + MOD

xiaoxiao2021-03-06  39

Apache Tomcat PHP MOD_SSL OPENSSL MYSQL integration

The Install Packages Which We NEED:

a) apache_1.3.33.tar.gz

b) jakarta-tomcat-4.1.31.tar.gz

c) JAKARTA-TOMCAT-Connectors-4.1.31-src.tar.gz

D) JAKARTA-TOMCAT-Connectors-JK-1.2.6-src.tar.gz

e) J2SDK1.4.2_05.tar.gz

f) MOD_SSL-2.8.22-1.3.33.tar.gz

g) OpenSSL-0.9.7E.TAR.GZ

h) mm-1.3.1.tar.gz

i) PHP-4.3.10.TAR.GZ

j) mysql-standard-4.1.8-pc-linux-i686.tar.gz

http://www.apache.org/dist

http://www.sun.com

http://www.modssl.org

http://www.openssl.org

http://www.ossp.org/pkg/lib/mm/

http://www.php.net

http://www.mysql.com

Save the package in this Directory: / usr / local / src /

#CD / USR / Local / SRC /

Download The Packages Which We NEED:

Wget http://www.apache.org/dist/httpd/apache_1.3.33.tar.gz

Wget http://www.apache.org/dist/apr/apr-1.0.1.tar.gz

Wget http://www.apache.org/dist/jakarta/tomcat-4/v4.1.31/bin/jakarta-tomcat-4.1.31.tar.gz

Wget http://www.apache.org/dist/jakarta/tomcat-4/v4.1.31/src/jakarta-tomcat-connectors-4.1.31-src.tar.gz

Wget http://www.apache.org/dist/jakarta/tomcat-connectors/jk/source/jk-1.2.6/jakarta-tomcat-connectors-jk-1.2.6-src.tar.gz

Wget http://www.openssl.org/source/openssl-0.9.7e.tar.gz

Wget ftp://ftp.ossp.org/pkg/lib/mm/mm-1.3.1.tar.gz

Wget http://www.modssl.org/source/mod_ssl-2.8.22-1.3.33.tar.gz

Wget http://cn.php.net/get/php-4.3.10.tar.gz/from/this/mirror

#tar -zvxf apache_1.3.33.tar.gz

#tar -zxvf openssl-0.9.7e.tar.gz

#tar -zxvf mm-1.3.1.tar.gz

#TAR -ZXVF MOD_SSL-2.8.22-1.3.33.tar.gz

#TAR -ZXVF J2SDK-1_4_2_05.tar.gz

#TAR -ZXVF JAKARTA-TOMCAT-4.1.31.TAR.GZ

#TAR -ZXVF JAKARTA-TOMCAT-Connectors-4.1.31-src.tar.gz

#TAR -ZXVF JAKARTA-TOMCAT-Connectors-JK-1.2.6-src.tar.gz

#TAR -ZXVF APR-1.0.1.tar.gz

#tar -zxvf mysql-standard-4.1.8-pc-linux-i686.tar.gz # tar -zxvf php-4.3.10.tar.gz

Install OpenSSL, MM, MODSSL AND APACHE with ALL of the modules:

#CD OpenSSL-0.9.7E

#. / config --help

#. / config -help

#. / config /

--PREFIX = / usr / local /

No-threads

#make

#make test

#make install

#CD ..

#CD MM-1.3.1

#. / configure --help

#. / configure /

--Disable-shared

#make

#make install

#CD ..

#CD MOD_SSL-2.8.22-1.3.33

#. / configure --help

#. / configure /

--with-apache = .. / Apache_1.3.33 /

--with-mm = .. / mm-1.3.1 /

--with-ssl = .. / OpenSSL-0.9.7E /

--with-EAPI-ONLY

#cd ../apache_1.3.33

#Ssl_base = .. / openssl-0.9.7e

#Eapi_mm = .. / mm-1.3.1

#. / configure --help

#. / configure /

--Prefix = / usr / local / apache /

--enable-module = SO /

--enable-module = SSL /

--enable-module = MOST /

--enable-rule = EAPI /

--enable-shared = max /

--enable-shared = SSL

#make

#make certificate view = 1

#make certificate

#make install

#make clean (make distclean)

#CD ..

#CD PHP-4.3.10

#. / config -help

#. / configure /

--with-apxs = / usr / local / apache / bin / apxs /

--with-openssl = / usr / local / ssl

#CD ..

#tar -zxvf mysql-standard-4.1.8-pc-linux-i686.tar.gz

#CP -R mysql-standard-4.1.8-pc-linux-i686 / usr / local / mysql

Install the JDK:

#TAR -ZVXF J2SDK1.4.2_05.tar.gz

#CP -R J2SDK1.4.2_05 / usr / local /

#CD ..

#LN -S J2SDK1.4.2_05 / usr / local / java

Install Tomcat:

#TAR -ZVXF JAKARTA-TOMCAT-4.1.31.TAR.GZ

#CP -R jakarta-Tomcat-4.1.31 / usr / local /

#CD ..

#LN-S Jakarta-Tomcat-4.1.31 Tomcat

#CD / usr / local / tomcat / bin /

Edit The File: Catalina.sh, add the underline:

Java_home = / usr / local / java

Java_opts = "- XMS256M -XMX512M"

Catalina_home = / usr / local / tomcat

Edit the file: / etc / profile, add the underline: #java environment variable settingsjava_home = / usr / local / java /

Export java_home

Classpath = $ java_home / lib / Tools.jar: $ java_home / lib / dt.jar

Export ClassPath

Catalina_base = / usr / local / Tomcat

Export catalina_base

Catalina_home = / usr / local / tomcat

Export catalina_home

PATH = $ PATH: $ java_home / bin: $ catalina_home / bin

#TOUCH / ETC / PROFILE

#java -version

#

#CD / USR / Local / SRC /

#TAR -ZXVF APR-1.0.1.tar.gz

#TAR -ZXVF JAKARTA-TOMCAT-Connectors-4.1.31-src.tar.gz

#CP -R APR-1.0.1 / Jakarta-Tomcat-Connectors-4.1.31-SRC / WebApp / APR

#CD JAKARTA-TOMCAT-Connectors-4.1.30-SRC / WebApp / Support /

#. / buildconf.sh

#. / configure /

-With-apxs = / usr / local / apache / bin / apxs

# Make # cd apache-1.3

#CP MOD_WEBAPP.SO / USR / local / apache / libexec /

Edit the file: /usr/local/apache/conf/httpd.conf

LoadModule WebApp_module libexec / mod_webapp.soaddmodule MOD_WEBAPP.C

You can use the following when you don't make a virtual host:

WebAppConnection WarpConnection Warp 192.168.1.10:8008

WebAppDeploy root warpConnection /

WebAppDeploy Examples WarpConnection / Examples

NamevirtualHost 192.168.1.10

# ServerAdmin Webmaster@dummy-host.example.com

Documentroot / usr / local / apache / htdocs

ServerName 192.168.1.10

# Irelog logs / dummy-host.example.com-error_log

# Customlog logs / dummy-host.example.com-access_log Common

WebAppDeploy root warpConnection /

NamevirtualHost 192.168.1.11

# ServerAdmin Webmaster@dummy-host.example.com

Documentroot / usr / local / apache / htdocs

Servername 192.168.1.11

# Irelog logs / dummy-host.example.com-error_log

# Customlog logs / dummy-host.example.com-access_log Common

WebAppDeploy Examples WarpConnection / Examples

Modify file: /usr/local/tomcat/conf/server.xml

Port = "8008" MINPROCESSORS = "5" maxprocessors = "75"

Enablelookups = "true" AppBase = "WebApps"

Acceptcount = "10" debug = "0" />

UPPACKWARS = "true" autodeploy = "true">

Prefix = "Host1_log." Suffix = ". txt" TimeStamp = "true" />

Restart Apache and Tomcat, access the following address: http: // localhosthtp: // localhost: 8080Http://localhost/examples/jsp/index.htmlhttp: // localhost: 8080 / examples / jsp / index.html

4. Install Tomcat Connector

#TAR -ZVXF JAKARTA-TOMCAT-Connectors-JK-1.2.6-src.tar.gz # cd Jakarta-Tomcat-Connectors-JK-1.2.6-SRC / JK / NATIVE /

#. / buildconf.sh

# ./configure /

--enable-jni --enable-EAPI /

-with-apxs = / usr / local / apache / bin / apxs /

--with-java-home = / usr / local / java

# Make

# cp apache-1.3 / mod_jk.so.0.0.0 /usr/local/apache/libexec/mod_jk.so

# Cd /usr/local/jakarta-tomcat-connectors-4.1.31-src/jk/conf

# cp workers.properties / usr / local / apache / confes

Edit The File Workers.properties:

Workers.tomcat_home = / usr / local / tomcat

Workers.java_home = / usr / local / java

PS = /

Worker.list = ajp13

Worker.ajp13.port = 8009

Worker.ajp13.host = localhost

Worker.ajp13.type = ajp13

Worker.ajp13.lbFactor = 1

# vi httpd.conf

In The Bottom, Add The Following Lines:

Port 80

ServerName Localhost: 80

LoadModule JK_Module Libexec / MOD_JK.SO

JkWorkersFile "/usr/local/apache/conf/Workers.properties"

JKLogfile "/var/log/tomcat/tomcat_jk.log"

JKMOUNT / * AJP13

JKMount /*.jsp Ajp13

#CD / USR / local / Tomcat / Conf

#CP server.xml server.xml.bak

#CP server-noExamples.xml.config server.xml

#vi server.xml

Search 8009, In ​​The Connector, Add The Following Lines:

Edit The File Workers.properties:

workers.java_home = / usr / local / j2sdk1.4.2_05ps = / worker.list = work1worker.work1.port = 8009worker.work1.host = localhostworker.work1.type = ajp13worker.work1.cachesize = 10 worker.work1.cache_timeout = 600 worker.work1.socket_keepalive = 1 worker.work1.socket_timeout = 300worker.loadbalancer.type = lbworker.inprocess.type = jniedit the file httpd.conf, add the following lines: # Load mod_jk module LoadModule jk_module libexec / mod_jk.so # Declare the module for # AddModule mod_jk.c # Where to find workers.properties JkWorkersFile /usr/local/apache/conf/workers.properties # Where to put jk logs JkLogFile /var/log/httpd/mod_jk.log # Set the jk log level [debug / error / info] jkloglevel info # select the log format jklogstampformat "[% a% b% D% h:% m:% y]" # jkoptions indicate to send ssl key size, Jkoptions ForwardKeysize Forwarduricompat -forwardDirectories # jkrequestLogformat Set The Request Format JkRequestLogformat "% w% v% T" # static files in all tomcat WebApp context directories are served by apache JkAutoAlias ​​/usr/local/jakarta-tomcat-4.1.30/webapps# send all requests ending in .jsp to worker1 JkMount /*.jsp work1 # send all requests ending / servlet to worker1 JkMount / * / servlet / work1 # Send servlet for context / examples to worker named worker1 # JkMount / examples / servlet / * work1 # Send JSPs for context / examples to worker named worker1 # JkMount /examples/*.jsp work1 # Static files in the examples webapp Are served by apache # alias / example /usr/local/jakarta-tomcat-4.1.30/webapps/examples

# The following line prohibits users from Directly Access Web-INF # #allowoverride none #deny from all # There are unfinished, so stay tuned!

转载请注明原文地址:https://www.9cbs.com/read-76933.html

New Post(0)