Install and deploy Java applications in CentOS 6.5
1. to deploy a java project in Linux, you must use java service wrapper.
: Http://wrapper.tanukisoftware.com/doc/english/download.jsp
Download Community version
2. After downloading the file, use ftp to upload it to the server. copy the file to the installer directory.
# Cp/home/www/ftpfile/wrapper-linux-x86-64-3.5.26.tar.gz/software/app/
3. decompress the file and rename it wrapper.
# Tar-zxvf wrapper-linux-x86-64-3.5.26.tar.gz
# Mv./wrapper-linux-x86-64-3.5.26./wrapper
4. Copy the running script to the bin directory and name it ttcserver (project name ).
# Cp/software/app/wrapper/src/bin/sh. script. in/software/app/wrapper/bin/ttcserver
5. Add execution permission.
# Chmod 775 ttcserver
6. Edit and generate the service file.
# Vim ttcserver
The modification content is as follows:
# Project name
APP_NAME = "ttcserver"
# Project length name
APP_LONG_NAME = "ttcserverApp"
# Wrapper
WRAPPER_CMD = "./wrapper"
# Reference the project configuration file
WRAPPER_CONF = "../conf/ttcserver. conf"
7. Enter the project configuration file directory, copy the configuration file and rename it ttcserver. conf, and edit the project configuration file.
# Cd/software/app/wrapper/conf/
# Cp wrapper. conf ttcserver. conf
# Vim ttcserver. conf
The modification content is as follows:
# Configure JAVA_HOME
Comment out # wrapper. java. command = java. Open the following two lines.
Set. JAVA_HOME =/home/java/jdk1.6.0 _ 45
Wrapper. java. command = % JAVA_HOME %/bin/java
# Project package (package through Build Fat Jar ).
Wrapper. java. classpath.1 = ../lib/ttcserver. jar
Wrapper. java. classpath.2 = ../lib/wrapper. jar
# Simple project
Wrapper. java. mainclass = org. tanukisoftware. wrapper. WrapperSimpleApp
# Project startup class, which must be set
Wrapper. app. parameter.1 = com. zoooq. keeper. Server
# Project name
Wrapper. name = ttcserver
8. Copy the project jar package to the lib directory of wrapper.
# Cp/home/www/ftpfile/ttcserver. jar/software/app/wrapper/lib/
9. Enter the bin directory of wrapper. Test and run.
# Cd/software/app/wrapper/bin/
#./Ttcserver start
If the operation is successful, the PID is displayed.
Note: If the operation fails, you can view the log:
# Vim ../logs/wrapper. log
10. After the operation is successful, the service can be made.
#./Ttcserver install
11. delete a service:
#./Ttcserver remove
Install JDK 1.8.0 _ 25 on Ubuntu 14.04 and configure Environment Variables
Install Oracle JDK 14.04 on Ubuntu 1.8 LTS
CentOS6.3 install JDK and environment Configuration
Install JDK 8 on Ubuntu 14.04
Install JDK graph analysis in Ubuntu