Freebsd+resin successfully built support JSP platform
Last Update:2017-02-28
Source: Internet
Author: User
JS Environment: FREEBSD 4.9 apache1.3.29+php4.3.4+mysql4+ports installation
First you have to cvsup sync ports,
/usr/local/bin/cvsup-g-L 2/usr/local/etc/ports-supfile
/usr/local/bin/cvsup-g-L 2/usr/local/etc/stable-supfile
And then into http://www.freebsd.org/ports/java.html.
Go to BSD's official website on Java to collect all the software needed for JDK-1.4.2P5. Put it in the/usr/ports/distfiles.
And then into/USR/PORTS/JAVA/JDK14.
Preferred to download J2sdk-1_4_2_02-linux-i586.bin
Then #sh/j2sdk-1_4_2_02-linux-i586.bin-----untie. Then, in this example: Copy to
/usr/local/linux-sun-jdk1.4.2/
With Setenv alt_bootdir/usr/local/linux-sun-jdk1.4.2/(point to your extracted directory)
#make This is a very regular time. Rest ~ ~ ~
#make Install
Note: There can be errors during installation
You can use the environment variable when make ...
(should be prompted by the error, my own change this sentence, in this case, I need to add before make
freebsd# unsetenv LANG
freebsd# unsetenv Java_home
freebsd# unsetenv CLASSPATH
freebsd# setenv alt_javaws_bootdir/usr/local/jdk1.4.2
freebsd# setenv alt_bootdir/usr/local/linux-sun-jdk1.4.2/
If there is no error.
Can be seen under the/usr/local/.
/usr/local/jdk1.4.2 directory.
Then test,/usr/local/jdk1.4.2/bin/java-version
freebsd#./java-version
Java Version "1.4.2-P5"
Java (TM) 2 Runtime environment, Standard Edition (build 1.4.2-p5-fuweb_11_dec_2003_16_38)
Java HotSpot (TM) Client VM (build 1.4.2-p5-fuweb_11_dec_2003_16_38, Mixed mode)
Appears below. Indicates a successful JDK installation
Install resin below
Resin-3.0.4.tar.gz I'm down with this bag, the newest CP to/usr/local.
# tar ZXVF resin-3.0.4.tar.gz
Set Setenv java_home/usr/local/jdk1.4.2
#./configure--with-apxs=/usr/local/sbin/apxs
# make
# make Install
And then into/usr/local/resin-3.0.4/bin.
Modify the httpd.sh file.
# you can predefine Java_home and resin_home
#
java_home=/usr/local/jdk1.4.2
Export Java_home
#
resin_home=/usr/local/resin-3.0.4
Export Resin_home
wq!
Note: APACHE will add the following modules in/usr/local/etc/apache/httpd.conf,
#
# Mod_caucho Resin Configuration
#
LoadModule caucho_module/usr/local/libexec/apache/mod_caucho.so
Resinconfigserver localhost 6802
If there is such a representation. Consolidation success
Start resin
http://218.24.233.13:8080 success
Then configure resin.conf
Enter/usr/local/resin-3.0.4/conf
VI resin.conf
After.
Edit the following.
My server is doing a virtual host. Let one of the domain names support the JSP
Configuration is as follows.
freebsd# pwd
<!--
-Resin 3.0 configuration file.
-->
<resin xmlns= "Http://caucho.com/ns/resin" >
<!--
-Logging configuration for the JDK Logging API.
-->
<log name= ' level= ' info ' path= ' stdout: ' timestamp= ' [%h:%m:%s.%s] '/>
<log name= ' Com.caucho.java ' level= ' fine ' path= ' stdout: '
Timestamp= ' [%h:%m:%s.%s] '/>
<log name= ' com.caucho.loader ' level= ' config ' path= ' stdout: '
Timestamp= ' [%h:%m:%s.%s] '/>
<!--
-For production sites, change dependency-check-interval to something
-like 600s, so it is only a checks for updates every minutes.
-->
<dependency-check-interval>10s</dependency-check-interval>
<!--
-Can change the compiler to "Javac" or jikes.
-The default is "internal" only because it ' s the most
-Likely to be available.
-->
<javac compiler= "Internal" args= ""/>
<!--security providers.
-<security-provider>
-Com.sun.net.ssl.internal.ssl.Provider
-</security-provider>
-->
<!--creates the deploy directory for. Ear expansion-->
<ear-deploy path= ' Deploy '/>
<!--creates the Deploy directory for. RAR expansion-->
<resource-deploy path= ' Deploy '/>
<!--creates a second deploy directory for. War expansion-->
<web-app-deploy path= ' Deploy '/>
<!--includes the Web-app-default for default Web-app behavior-->
<resin:include path= "App-default.xml"/>
<!--configures the default host, matching any host name-->
<document-directory>/home/fuweb/wwwroot</document-directory>
<!--configures the root Web-app-->
<web-app id= '/' >
<!--adds XSL to the search path-->
<class-loader>
<simple-loader path= "$host-root/xsl"/>
</class-loader>
<servlet-mapping url-pattern= "/servlet/*" servlet-name= "Invoker"/>
</web-app>
</server>
</resin>
If you want to start from
Build an ln connection in/USR/LOCAL/ETC/RC.D
Ln-s resin.sh/usr/local/resin-3.0.4/bin/httpd.sh
After the start of the can. Let you www.hc888.com directory support JSP
test.jsp file
<% @page language= "java"%>
2+2=<%=2+2%>
<% @page language= "java"%>
2+2=<%=2+2%>
<body>