第二部分: 手动测试服务,以命令的方式快速启动服务,主要是写plist前的验证.
launchctl:
1. 快速验证启动服务程序是否能成功运行,不须要复制org.apache.tomcat.plist到 java
~/Library/LaunchAgentsapache
/Library/LaunchAgentstomcat
/Library/LaunchDaemonsapp
/System/Library/LaunchAgents测试
/System/Library/LaunchDaemonsthis
意思是快速验证一个须要部署的程序是否能正确运行,固然配置也得和plist同样.spa
[plain] view plain copy.net
2. 中止服务blog
[plain] view plain copyip
3. 移除当前job里的服务
[plain] view plain copy
4. 提示错误 launchctl run error: File exists
表示job已经启动过,须要先中止再移除才能够从新运行.
[plain] view plain copy
5. 配置的输出提示错误,说明没有配置 JAVA_HOME 环境变量.
[plain] view plain copy
6. 设置环境变量
[plain] view plain copy
7. 删除环境变量
[plain] view plain copy
http://blog.csdn.net/infoworld/article/details/47419877