1、java的安装
jdk下载地址
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
1.1、安装jdk-1.8
[root@fnw ~]# ls anaconda-ks.cfg Desktop jdk-8u77-linux-x64.rpm [root@fnw ~]# rpm -ivh jdk-8u77-linux-x64.rpm [root@fnw ~]# java -version openjdk version "1.8.0_65" OpenJDK Runtime Environment (build 1.8.0_65-b17) OpenJDK 64-Bit Server VM (build 25.65-b01, mixed mode) [root@fnw ~]# javac ………… 略 [root@fnw ~]# java ………… 略
1.2 jdk环境变量的配置
[root@fnw ~]# echo "JAVA_HOME=/usr/java/jdk1.8.0_77" >> /etc/profile [root@fnw ~]# echo "JRE_HOME=/usr/java/jdk1.8.0_77/jre" >> /etc/profile [root@fnw ~]# echo "PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin" >> /etc/profile [root@fnw ~]# echo "CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib" >> /etc/profile [root@fnw ~]# echo "export JAVA_HOME JRE_HOME PATH CLASSPATH" >> /etc/profile [root@fnw ~]# tail -5 /etc/profile JAVA_HOME=/usr/java/jdk1.8.0_77 JRE_HOME=/usr/java/jdk1.8.0_77/jre PATH=/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/bin:/bin:/usr/java/jdk1.8.0_77/bin:/usr/java/jdk1.8.0_77/jre/bin CLASSPATH=.:/usr/java/jdk1.8.0_77/lib/dt.jar:/usr/java/jdk1.8.0_77/lib/tools.jar:/usr/java/jdk1.8.0_77/jre/lib export JAVA_HOME JRE_HOME PATH CLASSPATH [root@fnw ~]# source /etc/profile
2、resin的安装
2.1、下载安装resin
resin的载地址
http://caucho.com/products/resin/download
[root@fnw ~]# rpm -ivh resin-pro-4.0.45-1.x86_64.rpm warning: resin-pro-4.0.45-1.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID 6ef6d565: NOKEY error: Failed dependencies: openssl-devel is needed by resin-pro-4.0.45-1.x86_64 [root@fnw ~]# yum install openssl-devel -y [root@fnw ~]# rpm -ivh resin-pro-4.0.45-1.x86_64.rpm warning: resin-pro-4.0.45-1.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID 6ef6d565: NOKEY Preparing... ################################# [100%] Updating / installing... 1:resin-pro-4.0.45-1 ################################# [100%] Resin/4.0.45 launching watchdog at 127.0.0.1:6600 Resin/4.0.45 started -server 'app-0' with watchdog at 127.0.0.1:6600
2.2、resin环境变量的配置
[root@fnw resin]# echo "RESIN_HOME=/usr/local/share/resin" >> /etc/profile [root@fnw resin]# echo "RESIN_ROOT=/var/resin" >> /etc/profile [root@fnw resin]# echo "export RESIN_HOME RESIN_ROOT" >> /etc/profile [root@fnw resin]# source /etc/profile
2.3、resin主要目录简介
/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的一些常用动态库文件)
[root@fnw resin]# tree /usr/local/share/resin /usr/local/share/resin ├── bin # resin的启动脚本 │ ├── resinctl │ ├── resinctl.in │ ├── resin.sh │ ├── start.bat │ └── stop.bat ├── lib # 运行过程常用的jar包 │ ├── activation.jar │ ├── activation.LICENSE │ ├── eclipselink-2.4.0.jar │ ├── hibernate-validator-4.3.0.Final.jar │ ├── javaee-16.jar │ ├── javamail-141.jar │ ├── javamail-14.LICENSE │ ├── javax.faces-2.1.24.jar │ ├── jboss-logging-3.1.0.CR2.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 # resin的一些常用动态库文件 ├── libresin_os.so ├── libresin.so └── libresinssl.so
2.4、resin的启动
[root@fnw resin]# bin/resinctl -conf /etc/resin/resin.xml start
2.5、java进程查看命令
[root@fnw resin]# jps 48643 WatchdogManager 48691 Resin 48761 Jps
3、jdk1.8和resin4.0自动化安装shell脚本
#1、install jdk1.8.0_77 rpm -ivh jdk-8u77-linux-x64.rpm #2、config jdk1.8.0_77 environment echo "JAVA_HOME=/usr/java/jdk1.8.0_77" >> /etc/profile echo "JRE_HOME=/usr/java/jdk1.8.0_77/jre" >> /etc/profile echo "PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin" >> /etc/profile echo "CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib" >> /etc/profile echo "export JAVA_HOME JRE_HOME PATH CLASSPATH" >> /etc/profile tail -5 /etc/profile source /etc/profile #3、install resin4.0.45 yum install openssl-devel -y rpm -ivh resin-pro-4.0.45-1.x86_64.rpm #4、config resin4.0.45 environment echo "RESIN_HOME=/usr/local/share/resin" >> /etc/profile echo "RESIN_ROOT=/var/resin" >> /etc/profile echo "export RESIN_HOME RESIN_ROOT" >> /etc/profile source /etc/profile #5、running resin bin/resinctl -conf /etc/resin/resin.xml start
转载于:https://blog.51cto.com/fangniuwa/1763488