开发者

plist for automatically start tomcat on Mac at startup

I want to use a Mac mini as a server. So I've installed tomcat and I want it to start automatical开发者_如何学运维ly when booting. On Windows this is called a "services". I'm new to Mac OS but I read that this is a plist file in the /Library/LaunchDaemon folder.

So I found following link: https://gist.github.com/661713 I copied the files and inserted the correct paths.

But when I try to launch launchctl load /Library/LaunchDaemons/org.apache.tomcat.plist

I get the following errors:

launchctl: no plist was returned for: /Library/LaunchDaemons/org.apache.tomcat.plist launchctl: no plist was returned for: /Library/LaunchDaemons/org.apache.tomcat.plist nothing found to load


I noticed I'm completely new to Mac. So changing the extension name of a file doesn't really mean to change the filetype :)
I wrote the plist with textedit, but it wasn't a "true" plist. So I created a plist with the property list editor and the error disappeared.


The illegal characters that stop this launching are usually the spaces for indentation. Re-edit the file with nano, and remove spaces and reindent with Tab. That fixed the problem for me.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜