Apache+resin Installation Step Process

Source: Internet
Author: User
Tags join

It should be noted that when compiling Apache must join the DSO support, if not, please add the--ENABLE-MODULE=SO option to recompile Apache

Install resin:

Download the resin installation package

/usr/local
# tar -zxvf resin-2.1.4.tar.gz 
/usr/local
# cd resin-2.1.4/bin 
/usr/local/resin-2.1.4/bin
# httpd.sh start

If there are no error messages

Take a look at http://ip:8080/.

You can see the resin of the page to indicate that the resin was successfully run alone

Here are the more important integration resin and Apache

First Compile Mod_caucho

Download Resin's Source code

/usr/local# tar -zxvf resin-2.1.4-src.tar.gz /usr/local
# cd resin-2.1.4-src /usr/local/resin-2.1.4-src
# ./configure --with-apxs=/usr/local/apache/bin/apxs 或者 /usr/local/resin-2.1.4-src
# ./configure --with-apxs=/usr/local/apache /usr/local/apache为apache的安装路径
然后 /usr/local/resin-2.1.4-src
# make 
# make install
修改resin-2.1.4/conf/resin.conf
<!--   
 - The root file directory of the server. Apache users will change   
 - this to /usr/local/apache/htdocs and IIS users will change it   
 - to d:inetpubwwwroot   
-->;  
<doc-dir>;/usr/local/apache/htdocs/</doc-dir>;   
<!-- the http port -->;

This section will change Doc-dir to own Doc dir, I am here is/usr/local/apache/htdocs/

Modify Httpd.conf

Join

LoadModule caucho_module /usr/local/apache/libexec/mod_caucho.so 
AddModule mod_caucho.c  
<IfModule mod_caucho.c>;   
CauchoConfigFile /usr/local/resin-2.1.4/conf/resin.conf 
<Location /caucho-status>; 
SetHandler caucho-status 
</Location>; 
</IfModule>;

Restart Apache and resin

/usr/local/resin-2.1.4/bin/httpd.sh stop 
/usr/local/apache/bin/apachectl stop  
/usr/local/resin-2.1.4/bin/httpd.sh start 
/usr/local/apache/bin/apachectl start

Browser Open

http://ip/caucho-status/

If you appear

Status:caucho Servlet Engine

It means no problem.

Test

Create a test.jsp under the/usr/local/apache/htdocs/

/usr/local/apache/htdocs# VI test.jsp

<%@page language="java"%>; 
 2+2=<%=2+2%>;

Browser Open http://ip/test.jsp

If you can see

2+2=4

Then it was a success.



Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.