Install apache + resin

Source: Internet
Author: User
Install apache + resin-Linux Enterprise Application-Linux server application. For more information, see the following section. Note that DSO support must be added during apache compilation. If not, add the -- enable-module = so option to re-compile 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 no error message exists
Let's take a look at http: // ip: 8080/
The resin page is displayed, indicating that the resin operation is successful.

The following are important integrations of resin and apache.
Compile mod_caucho first
Download the source code of resin

/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 or/usr/local/resin-2.1.4-src
#./Configure -- with-apxs =/usr/local/apache for apache installation path and then/usr/local/resin-2.1.4-src
# Make
# Make install


Modify resin-2.1.4/conf/resin. conf

;
;
;/Usr/local/apache/htdocs/ ;
;
In this section, change doc-dir to your own doc dir. Here I am/usr/local/apache/htdocs/


Modify httpd. conf
Join

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


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


Open the browser
Http: // ip/caucho-status/
If
Status: Caucho Servlet Engine
Indicates no problem

Test
Create a test. jsp file under/usr/local/apache/htdocs /.

/Usr/local/apache/htdocs # vi test. jsp
<% @ Page language = "java" %>;
2 + 2 = <% = 2 + 2%>;


Open http: // ip/test. jsp in the browser
If you can see
2 + 2 = 4
Congratulations!
You have succeeded.

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.