Remote Deployment of Java applications on Linux

Source: Internet
Author: User
Remote Deployment of Java applications on Linux-general Linux technology-Linux programming and kernel information. The following is a detailed description. Author: guojie

During work, you need to deploy the upgraded application to a Linux machine. I used to be unfamiliar with Linux and learned some Linux commands during the deployment process.

Applications are packaged into jar files in Java. Use java-jar XXXXX. jar to start the program.

I use the F-Secure SSH Client tool, but once the remote connection to the Client is closed, the program stops.

Later, I asked my colleagues to use the nohup java-jar XXXXX. jar & command to ensure that the command runs in the background. At the same time, this command will create a nohup. out file in this directory, and write all output and error information.

In this way, you can use the command tail-f nohup. out to monitor the running of the program in real time.

Nohup command
Purpose
Run the command without hanging up.

Syntax
Nohup {-p pid | Command [Arg...] [&]}

Description
The nohup Command runs the Command specified by the Command parameter and any relevant Arg parameter, while ignoring all pending signals, you can also modify the process specified by the-p option to ignore all pending signals.

After logging out, you can use the nohup command to run programs in the background. To run the nohup command in the background, add the & (symbol indicating "and") to the end of the command.

Note:-p pid and Command cannot be specified at the same time. When-p pid is used, the output of the specified process is not redirected to nohup. out.

Flag
-P pid is the process ID of a running process. The nohup command modifies the specified process to ignore all pending SIGHUP signals.

Exit status
This Command returns the following export value: 126 can be searched but cannot call the Command specified by the Command parameter. 127 The nohup Command has an error or cannot find the Command specified by the Command parameter.

Otherwise, the exit status of the nohup Command is the exit status of the Command specified by the Command parameter.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.