我需要在服务器中运行一个java jar,以便在两个应用程序之间进行通信.我编写了两个shell脚本来运行它,但是一旦我启动该脚本,我就无法关闭/终止该过程.如果我按ctrl+ C或关闭控制台,服务器将关闭.任何人都可以帮我如何修改此脚本作为普通服务器运行?
#!/bin/sh
java -jar /web/server.jar
echo $!
#> startupApp.pid
Run Code Online (Sandbox Code Playgroud) 我在具有命令行访问权限的AWS实例上运行RHEL 7.2(Maipo).令我最大的惊喜是,vim需要安装,因为我对RedHat相当新,我最初是最简单的安装方式,所以我在下面添加它以供将来参考,所以像我这样的初学者可以破解用它.
我通过brew在mac Motion Lion上安装了sonatype nexus服务器,如下所示:
\n\n\xe2\x9e\x9c ~ brew install nexus\n==> Downloading http://download.sonatype.com/nexus/oss/nexus-2.6.3-01-bundle.tar\n\nAlready downloaded: /Library/Caches/Homebrew/nexus-2.6.3-01.tar.gz\n\n==> Caveats\n\nTo have launchd, start nexus at login:\n\nln -sfv /usr/local/opt/nexus/*.plist ~/Library/LaunchAgents\n\nThen to load nexus now:\n\nlaunchctl load ~/Library/LaunchAgents/homebrew.mxcl.nexus.plist\nOr, if you don't want/need launchctl, you can just run:\n\n/usr/local/opt/nexus/libexec/bin/nexus start\n\n==> Summary\n\n /usr/local/Cellar/nexus/2.6.3-01: 285 files, 42M, built in 2 seconds\n\n\xe2\x9e\x9c ~ /usr/local/opt/nexus/libexec/bin/nexus start\n\nStarting Nexus OSS...\n\nStarted Nexus OSS.\nRun Code Online (Sandbox Code Playgroud)\n\n但我可以\xe2\x80\x99t找到nexus服务器启动正常,8081端口未启动。
\n\n在哪里可以找到日志文件?
\n