1.安装jdk
之前装过了,就不做演示了
vim /etc/profile //注意java的配置文件
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
export JAVA_HOME JRE_HOME PATH CLASSPATH
2.安装resin
安装地址:http://caucho.com/products/resin/download
这里我们使用rpm包安装:
安装语句:
rpm -ivh resin-pro-4.0.58-1.x86_64.rpm
resin的配置文件,将以下内容添加到/etc/profile里面:
RESIN_HOME=/usr/local/share/resin
RESIN_ROOT=/var/resin
export RESIN_HOME RESIN_ROOT
重启配置文件:source /etc/profile
resin主要目录简介
[root@cc-01 src]# tree /usr/local/share/resin
/usr/local/share/resin
├── bin
│ ├── resinctl
│ ├── resinctl.in
│ ├── resin.sh
│ ├── start.bat
│ └── stop.bat
├── lib
│ ├── activation.jar
│ ├── activation.LICENSE
│ ├── eclipselink-2.4.0.jar
│ ├── javaee-16.jar
│ ├── javamail-141.jar
│ ├── javamail-14.LICENSE
│ ├── javax.faces-2.1.24.jar
│ ├── jsf.LICENSE
│ ├── pro.jar
│ ├── resin-eclipselink.jar
│ ├── resin.jar
│ ├── validation-api-1.0.0.GA.jar
│ ├── webservices-extra-api.jar
│ ├── webservices.LICENSE
│ └── webutil.jar
└── libexec64
├── libresin_os.so
├── libresin.so
└── libresinssl.so
etc/resin/resin.properties # properties 配置文件,以key:value 形式出现,供resin.xml使用
/etc/resin/resin.xml # resin主配置文件
/var/resin/ # resin的根目录
/var/resin/webapps/ # web应用程序在resin默认部署目录
/var/log/resin/ # resin服务器日志存放目录
/usr/local/share/resin # resin服务器的家目录(主要存放resin的启动脚本、运行过程常用的jar包、resin的一些常用动态库文件)
resin的启动:
[root@cc-01 resin]# /usr/local/share/resin/bin/resinctl start
Resin/4.0.58 launching watchdog at 127.0.0.1:6600
Resin/4.0.58 started -server 'app-0' with watchdog at 127.0.0.1:6600
JAVA进程查看命令:
[root@cc-01 resin]# jps
9826 Resin
9779 WatchdogManager
3333 plugin-core.jar
9882 Jps
3247 Bootstrap
浏览器访问: ip:8080
如上图所示,将生成的用户名和密码文件放入配置文件/etc/resin/resin.properties里面:
重启resin服务:
[root@cc-01 src]# /usr/local/share/resin/bin/resinctl restart
Resin/4.0.58 restarted -server 'app-0' for watchdog at 127.0.0.1:6600
重新访问,输入我们刚才配置的用户名和密码:
然后就成功登陆了