您的位置:首页 > 其它

mac下svn开机自启动配置

2016-06-16 10:57 435 查看
在 /Library/LaunchDaemons下

步骤:

在/Library/LaunchDaemons下新建org.tigris.subversion.svnserve.plist。

org.tigris.subversion.svnserve.plist内容:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>UserName</key>
<string>Lovell</string>
<key>Label</key>
<string>org.tigris.subversion.svnserve</string>
<key>ProgramArguments</key>
<array>
<string>/opt/subversion/bin/svnserve</string>
<string>--inetd</string>
<string>--root</string>
<string>/Users/Lovell/Desktop/develop-work/svn-workspace/svn</string>
</array>
<key>ServiceDescription</key>
<string>SVN Version Control System</string>
<key>Sockets</key>
<dict>
<key>Listeners</key>
<array>
<dict>
<key>SockFamily</key>
<string>IPv4</string>
<key>SockServiceName</key>
<string>svn</string>
<key>SockType</key>
<string>stream</string>
</dict>
<dict>
<key>SockFamily</key>
<string>IPv6</string>
<key>SockServiceName</key>
<string>svn</string>
<key>SockType</key>
<string>stream</string>
</dict>
</array>
</dict>
<key>inetdCompatibility</key>
<dict>
<key>Wait</key>
<false/>
</dict>
</dict>
</plist>

提示:查看svnserve路径方法:

which svnserve

红色字体,第一个是你的账户名,第二个是你的svnserve所在路径,自己改自己的,第三个是你数据仓库,自己改自己的。

#授权开机启动权限给root,否则报/Library/LaunchDaemons/org.tigris.subversion.svnserve.plist: Path had bad ownership/permissions无权限错误
sudo chown -R root /Library/LaunchDaemons/org.tigris.subversion.svnserve.plist
#授权svn仓库的使用权限给当前用户
sudo chown -R Lovell /Users/Lovell/Desktop/develop-work/svn-workspace/svn
电脑重启,可用。

参考资料:https://www.zennaware.com/cornerstone/helpbook/pages/appendix/launchd.html
                  http://blog.csdn.net/whyliu_/article/details/9045589
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: