4000-520-616
欢迎来到免疫在线!(蚂蚁淘生物旗下平台)  请登录 |  免费注册 |  询价篮
主营:原厂直采,平行进口,授权代理(蚂蚁淘为您服务)
咨询热线电话
4000-520-616
当前位置: 首页 > 新闻动态 >
新闻详情
resin安装与配置-梅花香自苦寒来!-51CTO博客
来自 : 51CTO技术博客 发布时间:2021-03-25

resin安装与配置

1、下载resin并解压

[root@daixuan src]# pwd

/usr/local/src

http://caucho.com/products/resin/download

[root@daixuan src]# wget http://caucho.com/download/resin-4.0.45.tar.gz

[root@daixuan src]# tar zxvf resin-4.0.45.tar.gz

[root@daixuan src]# ls

resin-4.0.45

sin-4.0.45]# cd resin-4.0.45


2、配置编译参数

[root@daixuan src]# ./configure --prefix=/usr/local/resin --with-java=/usr/local/jdk1.8.0_65/

这里会报错:configure: error: Can\'t find valid JAVA_HOME

[root@daixuan resin-4.0.45]# ./configure --prefix=/usr/local/resin --with-java-home=/usr/local/jdk1.8.0_65 //这里加上--with-java-home,就不会报错了

[root@daixuan resin-4.0.45]# make

[root@daixuan resin-4.0.45]# make install

[root@daixuan resin-4.0.45]# ls /usr/local/resin/

app-inf conf endorsed libexec project-jars webapp-jars

bin doc lib log resin-inf webapps

[root@daixuan resin-4.0.45]# ls /etc/init.d/resin

/etc/init.d/resin


3、启动resin

[root@daixuan resin-4.0.45]# /etc/init.d/tomcat stop //先停掉tomcat,因为都是用java

[root@daixuan resin-4.0.45]# /etc/init.d/resin start

Starting resin: .

[root@daixuan resin-4.0.45]# ps aux | grep resin

root 14270 0.0 0.0 6048 784 pts/0 S+ 00:02 0:00 grep resin

[root@daixuan resin-4.0.45]# netstat -lnp | grep java

tcp 0 0 127.0.0.1:6600 0.0.0.0:* LISTEN 14162/java

tcp 0 0 127.0.0.1:6800 0.0.0.0:* LISTEN 14210/java

tcp 0 0 :::8080 :::* LISTEN 14210/java

在浏览器输入:192.168.101.230:8080

\"wKiom1aEAR_heiJvAABLrCJ-bN0574.png\"


4、配置resin,默认监听端口修改为80

[root@daixuan resin-4.0.45]# cd /usr/local/resin/conf/

[root@daixuan conf]# ls

app-default.xml cluster-default.xml health.xml keys licenses resin.properti

[root@daixuan conf]# vim resin.properties

app.http : 80

[root@daixuan conf]# /etc/init.d/resin restart

Stopping resin: .

Starting resin: .

[root@daixuan conf]# netstat -lnp | grep java //默认端口修改成功,浏览器使用80端口即可访问

tcp 0 0 :::80 :::* LISTEN 14548/java


5、resin如何修改虚拟主机

[root@daixuan conf]# mkdir /tmp/resin

[root@daixuan conf]# vim resin.xml //添加一个虚拟主机配置

cluster id=\"app\"

host id=\"www.123.com\" root-directory=\'.\'

web-app id=\"/\" root-directory=\"/tmp/resin\"/

/host

/cluster


6、测试resin解析

[root@daixuan conf]# cp /data/tomcatweb/111.jsp /tmp/resin/

[root@daixuan conf]# curl -x127.0.0.1:80 www.123.com/111.jsp

html

body

center

NOW time is: Thu Dec 31 00:40:21 CST 2015

/html

在浏览器中输入www.123.com/111.jsp,可以看到其可以正常解析

\"wKioL1aECbezDF_DAABFCIJu5_o681.png\"




©著作权归作者所有:来自51CTO博客作者1350368559的原创作品,如需转载,请注明出处,否则将追究法律责任 resin安装与配置 Linux服务

本文链接: http://resinpts.immuno-online.com/view-748730.html

发布于 : 2021-03-25 阅读(0)