Resin install document
Centos6快速安装文档 resin3.1.13
软件下载地址:
http://caucho.com/products/resin/download/gpl#download
#系统环境
[root@www conf]# cat /etc/redhat-release
CentOS release 6.4 (Final)
[root@www conf]# uname -r
2.6.32-358.el6.x86_64
[root@www conf]# uname -m
x86_64
一、安装jdk
#上传jdk安装包
[root@www tools]# rz -y
jdk-6u34-fcs-bin-b04-linux-amd64-19_jul_2012.bin
#检查
[root@www tools]# ll
jdk-6u34-fcs-bin-b04-linux-amd64-19_jul_2012.bin
#授权x权限
chmod +x jdk-6u34-fcs-bin-b04-linux-amd64-19_jul_2012.bin
#安装jdk
./jdk-6u34-fcs-bin-b04-linux-amd64-19_jul_2012.bin
省略部分...中间有一步要按回车键,然后等待几秒,即可完成。
Done.
#########################################################
#查看安装好的文件
ls -l jdk1.6.0_34/
#创建目录
mkdir -p /application
#把文件移到/application目录下
mv jdk1.6.0_34/ /application/
#切换目录
[root@www tools]# cd /application/
#做个软链接
[root@www application]# ln -s jdk1.6.0_34/ jdk
#检查
[root@www application]# ls -l /application/jdk
lrwxrwxrwx. 1 root root 12 Feb 25 23:05 /application/jdk -> jdk1.6.0_34/
#查看jdk版本
[root@www application]# /application/jdk/bin/java -version
java version "1.6.0_34"
Java(TM) SE Runtime Environment (build 1.6.0_34-b04)
Java HotSpot(TM) 64-Bit Server VM (build 20.9-b04, mixed mode)
#配置JAVA环境变量
echo '#java env start config by oldboy 2011-8-24' >>/etc/profile echo 'export JAVA_HOME=/application/jdk' >>/etc/profile echo 'export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib' >>/etc/profile echo 'export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$HOME/bin' >>/etc/profile echo 'export RESON_HOME=/application/resin' >>/etc/profile echo '#java env end config by nulige 2017-2-25' >>/etc/profile
#检查
tail -6 /etc/profile
#使环境变量生效
source /etc/profile
#检查是否成功
echo $JAVA_HOME echo $RESIN_HOME echo $CLASSPATH echo $PATH
#查看java版本
[root@www application]#java -version
java version "1.6.0_34"
Java(TM) SE Runtime Environment (build 1.6.0_34-b04)
Java HotSpot(TM) 64-Bit Server VM (build 20.9-b04, mixed mode)
二、安装resin
软件名称:resin-3.1.13.tar.gz
#开始安装
cd /home/nulige/tools/ ll tar xf resin-3.1.13.tar.gz mv resin-3.1.13 /application/ ln -s /application/resin-3.1.13/ /application/resin ls -l /application/resin/
###################不和apache配置生成模块则,则无需编译#####################
三、配置resin
[root@www tools]# mkdir -p /app/logs/resinlog
[root@www tools]#
[root@www tools]# cd /application/resin/conf
[root@www conf]# ls -l
total 48
-rw-r--r--. 1 root root 12216 Nov 9 2012 app-default.xml
-rw-r--r--. 1 root root 3007 Nov 9 2012 development.conf
-rw-r--r--. 1 root root 270 Nov 9 2012 fine.conf
-rw-r--r--. 1 root root 641 Nov 9 2012 minimal.conf
-rw-r--r--. 1 root root 9970 Nov 9 2012 resin.conf
-rw-r--r--. 1 root root 9970 Nov 9 2012 resin.conf.orig
#都是xml格式的配置文件
[root@www conf]# vi resin.conf
从88行开始删除到146行,(快整跳到88行,用快捷键:88gg) 再用快捷键:59dd (删除59行内容)
#再添加下面代码到删除的地方,并注意:server id= xxx,是指启动时指定的标签,地址就是本机网卡地址,端口不用改。
<http address="*" port="8080"/> #如果做web服务用,就把端口修改成80。
添加代码如下:
<!-- resin Configure by old-boy 6:58 2011-8-25 --> <server id='oldboy' address='10.0.0.8' port='6911' watchdog-port="6921"> <http address="*" port="8080"/> <jvm-arg>-Xmx256m</jvm-arg> <jvm-arg>-Xss1m</jvm-arg> <jvm-arg>-Xdebug</jvm-arg> <jvm-arg>-Dcom.sun.management.jmxremote</jvm-arg> <memory-free-min>1M</memory-free-min> <thread-max>256</thread-max> <socket-timeout>65s</socket-timeout> <keepalive-max>128</keepalive-max> <keepalive-timeout>15s</keepalive-timeout> </server>
四、启动resin并检查
#杀下java进程
[root@www conf]# killall java
java: no process killed
#启动resin
[root@www conf]# /application/resin/bin/httpd.sh -server oldboy start
Resin/3.1.13 started -server 'oldboy' for watchdog at 127.0.0.1:6921
#检查端口(必须有三个端口)
[root@www conf]# netstat -lntup|egrep "6911|6921|8080"
tcp 0 0 :::8080 :::* LISTEN 2373/java
tcp 0 0 ::ffff:192.168.1.139:6911 :::* LISTEN 2373/java
tcp 0 0 ::ffff:127.0.0.1:6921 :::* LISTEN 2345/java
#检查服务启动
[root@www conf]# ps -ef|grep java
#访问resin
http://192.168.1.139:8080/ (ip指的是你网卡的ip)
#如果访问不成功,注意关闭本机防火墙
[root@www conf]# /etc/init.d/iptables stop iptables: Flushing firewall rules: [ OK ] iptables: Setting chains to policy ACCEPT: filter [ OK ] iptables: Unloading modules: [ OK ]
#配置站点目录
[root@www ~]# ll /application/resin/webapps/ROOT/
total 8
-rw-r--r--. 1 root root 1507 Nov 9 2012 index.jsp
drwxr-xr-x. 5 root root 4096 Feb 26 00:35 WEB-INF
[root@www ~]# echo '<99+1=<%=99+1>' >/application/resin/webapps/ROOT/test.jsp
[root@www ~]# cat /application/resin/webapps/ROOT/test.jsp
<99+1=<%=99+1>
[root@www ~]# curl http://192.168.1.139/test.jsp
#配置启动方式
#系统自带的启动脚本(有兴趣的自己了解下)
[root@www ~]# cp /application/resin/contrib/init.resin.in /etc/init.d/resind
#自己写一个启动脚本,放在启动目录
[root@www init.d]#cd /etc/init.d/
#resind启动脚本
[root@www init.d]#vi resind #!/bin/sh #authon:nulige by QQ:155236879 #Linux startup scripts for Resin #chkconfig:345 85 15 #descriptsion:Resin is a Java Web server # #To install, configure this file as needed and copy init.resin #to /etc/rc.d/init.d as resin. Then use "# /sbin/chkconfig resin reset" # . /etc/init.d/functions StartPath='/application/resin/bin/httpd.sh' ResinLog=/app/logs/resinlog [ ! -d $ResinLog ] && mkdir -p &ResinLogresind(){ #如果是多进程增加下面的配置段:oldboy后面空格再接标签名即可 for id in oldboy do$StartPath -server $id $1 >> $ResinLog/resin_startup.logif [ $? -eq 0 ]thenaction "$1 $id resin..."/bin/trueelseaction "$1 $id resin..."/bin/falsefi done}case "$1" instart)resind $1echo '------checking-------'sleep 15netstat -lnt|egrep "80|69"echo '------check over------';;stop)resind $1;;restart)resind stopresind start;;*)echo "Usage: $0{start|stop|restart}"exit 1 esacexit 0
#dos2unix处理一下
[root@www init.d]# dos2unix /etc/init.d/resind
dos2unix: converting file /etc/init.d/resind to UNIX format ...
#给脚本加个执行权限
[root@www init.d]# chmod +x resind
[root@www init.d]# ls -l resind
-rwxr-xr-x. 1 root root 859 Feb 26 02:20 resind
#杀java
[root@www init.d]# killall java
[root@www init.d]# killall java
java: no process killed
#用脚本启动
[root@www init.d]# /etc/init.d/resind start
start oldboy resin.../bin/true [ OK ]
------checking-------
tcp 0 0 :::8080 :::* LISTEN 4025/java
tcp 0 0 ::ffff:192.168.30.131:6911 :::* LISTEN 4025/java
tcp 0 0 ::ffff:127.0.0.1:6921 :::* LISTEN 3997/java
------check over------
#添加开机自启动
[root@www init.d]# chkconfig --add resind
[root@www init.d]# chkconfig resind on
[root@www init.d]# chkconfig --list resind
resind 0:off 1:off 2:on 3:on 4:on 5:on 6:off
Resin install document相关推荐
- [KIWI syslog]Install document
安全日志的标准是rfc5425 它介绍SSL-tunnel日志标准和相关要求的标准定义.此外,IANA分配TCP端口6514作为一个标准的端口安全日志. 安装说明: 1.安装日志服务器 官方下载地址: ...
- [转]VS2010安装说明及所有安装出错的解决办法
注意:如果你打算安装SQL Server要安装完成后,在安装VS2010,我从今尝试过先安装VS2010(把里面的关于SQL的项去掉)再安装SQL,结果失败了. 安装步骤: 1. 安装DAEMON虚拟 ...
- js粘贴板为什么获取不到图片信息_【第1829期】复制黏贴上传图片和跨浏览器自动化测试...
前言 这个操作体验倒是不错.今日早读文章由丁香园@蒋璇投稿分享. @蒋璇, 前端开发攻城狮, 现任职于丁香园. 英语爱好者, 测试驱动开发(TDD)&行为驱动开发(BDD)推崇者. 先专注于 ...
- oracle透明网关 中文,Oracle透明网关的一些文章
Oracle透明网关的一些文章: http://www.oracle.com/technetwork/database/gateways/index.html Oracle透明网关的认证清单见下: h ...
- macOS更新10.14.6 更新到macOS Monterey
在设置中软件更新 出现更新错误,无法直接升级 下载安装包 参考网上某个地方的说法 cat /var/log/install.log| grep pkg http://swcdn.apple.com/c ...
- (转)为Linux服务器部署高效防毒软件
作为一个操作系统,Linux对病毒的抵抗能力是人所共知的.这主要得力于其优秀的技术设计,这不仅使它的作业系统难以宕机,而且也使其难以被滥用.首先,Linux早期的使用者一般都是专业人士,就算是今天,虽 ...
- 为Linux服务器部署高效防毒软件
为一个操作系统,Linux对病毒的抵抗能力是人所共知的.这主要得力于其优秀的技术设计,这不仅使它的作业系统难以宕机,而且也使其难以被滥用.首先,Linux早期的使用者一般都是专业人士,就算是今天,虽然 ...
- 相关搜索------搜索引擎研究之三
用过搜索引擎的大家都知道,其有个相关搜索功能.既有推进搜索的意思,但是有时候他也是简单的罗列相关词,并不能理解用户的实际需求. 比如:一天我突然看见易中天与小崔说事的视频,我就想去搜索一下,googl ...
- 最全VS2010初级教程学习手册
目录 <Visual C++ 2010入门教程>系列二:安装.配置和首次使用VS2010 1 写在前面 第一章 关于Visual Studio.VC和C++的那些事 1 第二 ...
最新文章
- 教你打包Java程序,jar转exe随处可跑
- vivo Y81s的usb调试模式在哪里,打开vivo Y81susb调试模式的流程
- SAP与其他系统交互的方式
- grep搜索子目录中包含某字符串的特定文件
- leetcode303 区域和检索
- 大动作!华为海思注册资本从6亿增加到20亿
- linux基础练习,Linux基础指令练习
- 微软发布关于 Surface Pro 3 TPM 绕过漏洞的安全公告
- Xcode7 低版本iOS系统上下有黑边的问题
- python 把list中的所有元素串起来变为字符串
- C#结合VS开发WinForm学习笔记
- JOBDU 1108	堆栈的使用
- Linux GCC make文件的写法4--清晰版
- bios调整服务器性能模式吗,怎样更改BIOS设置提高显卡性能
- cnchar - 功能全面、支持多端的汉字拼音笔画开源 JS 库
- 电大计算机应用基础win7操作,新版电大《计算机应用基础》(win7)操作题解题步骤.doc...
- 个人去办理上沪c流程
- linux版retroarch游戏,RetroArch下载
- html绑定带有形参的函数,Python中函数参数类型和参数绑定
- 【学习笔记-时间序列预测】prophet-使用.3节日与特殊事件