Resin configuration details, resin details

Source: Internet
Author: User

Resin configuration details, resin details

Install JDK

JDK is the core of JAVA, including the java Runtime Environment, tools, and base class libraries.

Cd/usr/local/src/

Version 1.8.0 _ 162 downloaded from the official website

Mv jdk1.8.0 _ 162/usr/local/jdk1.8

Set Environment Variables

Vim/etc/profile

JAVA_HOME =/usr/local/jdk1.8/

JAVA_BIN =/usr/local/jdk1.8/bin

JRE_HOME =/usr/local/jdk1.8/jre

PATH = $ PATH:/usr/local/jdk1.8/bin:/usr/local/jdk1.8/jre/bin

CLASSPATH =/usr/local/jdk1.8/jre/lib:/usr/local/jdk1.8/lib:/usr/local/jdk1.8/jre/lib/charsets. jar

Execute the following command to take effect

Source/etc/profile

Check whether the settings are correct

Java-version

The following content indicates that the configuration is correct.

Java version "1.8.0 _ 162"

Java (TM) SE Runtime Environment (build 1.8.0 _ 162-b12)

Java HotSpot (TM) 64-Bit Server VM (build 25.162-b12, mixed mode)

Install resin

Tar zxvf resin-4.0.45.tar.gz

Cd resin-1, 4.0.45

./Configure -- prefix =/usr/local/resin -- with-java-home =/usr/local/jdk1.8

Make & make install

Start resin

/Etc/init. d/resin start

Ps aux | grep resin

Both netstat-lnp can check whether resin is successfully started.

Configure resin

Cd/usr/local/resin/conf/

Structure:

The VM is configured in Configuration in

Vim/tmp/123/111 .jsp

Now time is: <% = new java. util. Date () %>

Curl-x127.0.0.1: 8080 www.123.com/111.jsp

Now time is: Sun Jan 21 22:09:56 CST 2018

Resolution successful

Modify the port number in this file

Vim resin. properties

Nginx proxy resin

Vim/usr/local/nginx/conf/nginx. conf

Add before the last}

Include vhosts/*. conf;

Virtual Host Configuration

Vim/usr/local/nginx/conf/vhosts/proxy. conf

Server {

Server_name www.123.com;

Location /{

Proxy_passhttp: // localhost: 8080 /;

Proxy_set_header Host $ host;

Proxy_set_header X-Real-IP $ remote_addr;

Proxy_set_headerX-Forwarded-For $ proxy_add_x_forwarded_for;

}

}

/Usr/local/nginx/sbin/nginx-t

/Etc/init. d/nginx restart

Restart nginx and enter www.123.com/111.jsp on the webpage.

Port 80 of nginx proxy is successfully used.

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.