System Requirements:
Hardware can run the operating system can
Win2K, WinXP, or Win2003 operating system
Pre-Preparation:
List of required software: (This configuration is complete with the following software versions)
1, Apache_2.0.47-win32-x86-no_ssl (APACHE Web server)
2, Php-4.3.3-win32 (PHP language parser)
3, Mysql-4.0.12-win (MySQL database)
4, j2sdk-1_4_2-windows-i586 (JAVA language environment)
5, jakarta-tomcat-5.0.9 (Tomcat JSP resolution Server)
6, Resin-3.0.3 (Resin JSP resolution Server)
7, Mod_jk_1.2.5_2.0.47.dll (integration of Apache+tomcat Plus)
8, Mm.mysql-2.0.4-bin.jar (JSP access to connect the MySQL file)
1. Installation Apache_2.0.47-win32-x86-no_ssl, the default installation path for the program is: C:\apache2\program files\apache group\, you need to modify its installation path to: C:\
(can also not make changes, mainly in order to modify the configuration to facilitate the modification).
2. After the installation completes, the Apache service automatically loads, when opens the browser, browses: http://localhost, appears the Apache Welcome page (This step needs to change the file "Index.html.en" in the C:\apache2\htdocs directory to " Index.html ", can be displayed); If this step shows an exception, check the installation source files and reinstall.
3. Install Php-4.3.3-win32, general download PHP file for a installation-free compression package, decompression to C:\PHP can be.
4. Configure PHP and Apache to enable parsing of PHP programs.
PHP configuration: "Php.ini-dist" in the C:\PHP\ directory is renamed "PHP.ini" and copied to C:\windows\system32 (Win2K directory: C:\winnt\system32)
Apache Configuration:
C:\apahce2\conf\httpd.conf
httpd.conf
D at the end of this configuration file, add the following statement to support the PHP program:
scriptalias/php/"c:/php/"
AddType application/x-httpd-php. php3
AddType application/x-httpd-php. php
AddType application/x-httpd-php. phtml
Action application/x-httpd-php "/php/php.exe"
5. Restart the Apache server and write the following statement in the editor:
Phpinfo ();
?>
Save the file name "test.php" to the C:\apache2\htdocs directory, and then open the browser, browse: http://localhost/test.php, the presence of PHP basic information on the configuration success. Strictly follow the instructions above to install the configuration, will be a success.
6. Install Mysql-4.0.12-win, always press "next" to install successfully, and then execute "Winmysqladmin.exe" in the C:\mysql\bin directory, the initial information of MySQL appears, indicating the installation was successful.
7. PHP even MySQL here skip, generally no problem.
Here you can take a break and prepare for the following long process ...
Second, install JDK and Tomcat
1. Install J2SDK-1_4_2-WINDOWS-I586,JDK must be installed before Tomcat and resin, the default installation path is OK.
2. Install jakarta-tomcat-5.0.9, the default installation path is OK.
3. Copy mm.mysql-2.0.4-bin.jar files to C:\j2sdk1.4.2\lib and C:\Tomcat 5.0\common\lib respectively
4. Setting environment variables (desktop-> My Computer-> right click-> Select "Properties"-> advanced-> Environment variables), all settings are in the system variable bar.
New-> variable name: java_home
-> Variable Value: C:\j2sdk1.4.2
New-> variable name: tomcat_home
-> Variable Value: C:\Tomcat 5.0
New-> variable name: PATH
-> variable value:.; C:\j2sdk1.4.2\bin; (Front of ".;" Be sure to have it)
Modify Add environment variable CLASSPATH (new) If you do not have this variable name
-> Add variable value:.; C:\j2sdk1.4.2\lib\dt.jar; C:\j2sdk1.4.2\lib\tool.jar;
C:\j2sdk1.4.2\lib\NetComponents.jar;
C:\j2sdk1.4.2\lib\mm.mysql-2.0.4-bin.jar;
C:\Tomcat 5.0\common\classes;
C:\Tomcat 5.0\common\lib;
C:\Tomcat 5.0\common\lib\servlet-api.jar;
(Front of ".;" Be sure to have it)
5. Start Tomcat server, open Browser, browse: http://localhost:8080/, the Tomcat welcome page appears; If this step is abnormal, please check the installation source files and reinstall.
Third, the integration of Apache+tomcat server
1. Copy mod_jk_1.2.5_2.0.47.dll file to C:\Apache2\modules directory.
2. Apache Configuration:
C:\apahce2\conf\httpd.conf
httpd.conf
At the end of this configuration file, add the following statement to support the JSP program:
LoadModule Jk_module Modules/mod_jk_1.2.5_2.0.47.dll
3. See if the port "8009" in the C:\Tomcat 5.0\conf\server.xml file is commented, and if it is consistent with my version, do not change it.
4. Under the C:\Tomcat 5.0\conf\ directory, create a new file named "Workers.properties" and copy the following to the new file workers.properties.
Workers.properties
# only copy the following content:
# This is currently being modified according to the installation directory
WORKERS.TOMCAT_HOME=C:\TOMCAT 5.0
Workers.java_home=c:\j2sdk1.4.1_01
Ps=\
# WORKER.LIST=AJP13
Worker.list=ajp12,ajp13
5. To this Apache and Tomcat consolidation complete, restart Apache and Tomcat servers,
Write the following in the editor:
The current date and the
Save the file name "test.jsp" to the C:\Tomcat 5.0\webapps\root directory, and then open the browser, browse: http://localhost:8080/test.jsp, if the display is normal, and then change the address to: http:// localhost/test.jsp Display the normal description of the configuration was successful. Strictly follow the instructions above to install the configuration, will be a success.
Iv. Integration of Apache+tomcat+mysql
This is a relatively simple, but also the most difficult part of the success of the previous JSP driver has been placed in the appropriate directory, environment variables are set, so just test JSP can connect MySQL database.
1. Test 1, write the following with the editor:
Note: The database here is: Test Connection database save Username: root password is null. According to their own database to make the corresponding changes.
Save the file name "test-mysql.jsp" to the C:\Tomcat 5.0\webapps\root directory, and then open the browser, browse: http://localhost:8080/test-mysql.jsp or http:// Localhost/test-mysql.jsp, after running, if displayed as a blank page, indicating that the connection database succeeded, otherwise the connection is not successful, please step back and carefully configure.
2. Test 2, write the following with the editor:
Save the file name "test-mysql2.jsp" to the C:\Tomcat 5.0\webapps\root directory, and then open the browser, browse: http://localhost:8080/test-mysql2.jsp or http:// Localhost/test-mysql2.jsp, after running.
V. Install Resin, integrate Apache+resin
1. Assume that the machine does not now start another JSP resolution server, if started please close the service.
2. Direct decompression Resin-3.0.3.zip to C:\
3. Use command in character mode: C:\resin-3.0.3\bin\httpd–install
Install resin as a service on the system, and then start resin in the service.
Delete Service command: C:\resin-3.0.3\bin\httpd–remove
4. Open the browser, browse: http://localhost:8080, if the display has resin information, then resin service has started.
5. Apache Configuration:
C:\apahce2\conf\httpd.conf
httpd.conf
At the end of this configuration file, add the following statement:
Resin.conf
Modify the default directory, and the Red section is modified:
C:\Apache2\htdocs
...
Save after the completion, restart the resin service, the edited JSP file into the C:\Apache2\htdocs directory, and then open browser browsing, you can in PHP and JSP between the free channeling.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.