标签:sys splay bin sof include tail 命名 div elf
下载地址
http://wrapper.tanukisoftware.com/doc/english/download.jsp
下载包
wrapper-linux-x86-64-3.5.30.tar.gz
解压
tar xvf /usr/file/wrapper-linux-x86-64-3.5.30.tar.gz -C /usr/java/
重命名
cd /usr/java mv wrapper-linux-x86-64-3.5.30 wrapper
新建名为code的简单maven工程,写一个主类Main.java
package com.xmyself.code; public class Main { public static void main(String[] args) { System.out.println("start wrapper success"); } }
打包为jar文件,全名code-0.0.1-SNAPSHOT.jar,将文件放在centos的/usr/file目录
进入配置文件目录
cd /usr/java/wrapper/conf
编辑wrapper.conf
vi wrapper.conf
修改如下内容
# Java Main class. This class must implement the WrapperListener interface # or guarantee that the WrapperManager class is initialized. Helper # classes are provided to do this for you. See the Integration section # of the documentation for details. wrapper.java.mainclass=com.xmyself.code.Main # Java Classpath (include wrapper.jar) Add class path elements as # needed starting from 1 wrapper.java.classpath.1=../lib/wrappertest.jar wrapper.java.classpath.2=../lib/wrapper.jar wrapper.java.classpath.3=/usr/file/code-0.0.1-SNAPSHOT.jar # Name of the service wrapper.name=testwrapper # Display name of the service wrapper.displayname=Test Wrapper Sample Application # Description of the service wrapper.description=Test Wrapper Sample Application Description
进入wrapper的bin目录
cd /usr/java/wrapper/bin
启动
wrapper -c ../conf/wrapper.conf
控制台将一直运行code-0.0.1-SNAPSHOT.jar中的代码,持续输出“start wrapper success”
标签:sys splay bin sof include tail 命名 div elf
原文地址:http://www.cnblogs.com/ywlaker/p/6060388.html