首页 > 代码库 > resin配置

resin配置

resin配置

官网http://caucho.com/

resin需要jdk支持

jdk官网http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html

没有jdk,无法编译java程序

1.安装jdk

cd /usr/local/src

wget‘http://download.oracle.com/otn-pub/java/jdk/8u91-b14/jdk-8u91-linux-i586.tar.gz?AuthParam=1466748694_4fba144996aad848aa5ee7344c94ad2e‘

tar -zxvf jdk-8u77-linux-i586.gz                                    //文件名字可能不一样

mv jdk1.8.0_77 /usr/local/

vim /etc/profile.d/java.sh

添加内容:

JAVA_HOME=/usr/local/jdk1.8.0_77

JAVA_BIN=/usr/local/jdk1.8.0_77/bin

JRE_HOME=/usr/local/jdk1.8.0_77/jre

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

PATH=/usr/local/jdk1.8.0_77/bin:/usr/local/jdk1.8.0_77/jre/bin:$PATH

//$PATH 放到该行的末尾,保证第一个搜索到的java 是自己装的

source /etc/profile.d/java.sh

java -version

//显示自己装的版本就OK

 

 

 

 

 

2安装resin

cd /usr/local/src/

wget‘http://caucho.com/download/resin-4.0.44.tar.gz‘

tar zxvf resin-4.0.44.tar.gz

cd resin-4.0.44

./configure --prefix=/usr/local/resin--with-java-home=/usr/local/jdk1.8.0_91

make

make install

cd /usr/local/resin/

/etc/init.d/resin start                                                     //启动脚本自动生成

vim /usr/local/resin/conf/resin.properties               //修改端口号

找到app.http          : 8080

改为app.http          : 80

/etc/init.d/resin stop

/etc/init.d/resin start

netstat –lnp                                                                      //80端口启动比较慢

vim /usr/local/resin/conf/resin.xml                            //配置虚拟主机

<cluster id="app"> </cluster>结构添加虚拟主机

<host id="www.111.com" root-directory=".">

        <web-appid="/" root-directory="/tmp/resin"/>

</host>

mkdir /tmp/resin

/etc/init.d/resi stop

/etc/init.d/resin start

vim /tmp/resin/1.jsp

添加内容:

<html><body><center>

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

</center></body></html>

curl -x192.168.134.137:80 www.111.com/1.jsp

//正常解析表示配置成功

 

 

 

 


本文出自 “11736718” 博客,请务必保留此出处http://11746718.blog.51cto.com/11736718/1876224

resin配置