1.創建執行腳本svn.sh(/root路徑下),其內容很簡單,如下:
#!/bin/bash
svnserve -d --listen-port 8080 -r /home/svnroot/repository(svn資源庫路徑)
2.添加可執行權限
命令行運行
#chmod ug+x /root/svn.sh
3.添加自動運行
打開(vi或gedit)
/etc/init.d/rc.d/rc.local
在最後添加一行內容如下:
/root/svn.sh
保存退出。
4.檢查
重啓服務器,使用 ps -ef 看看svn進程是否啓動了。
原文鏈接:http://blog.chinaunix.net/space.php?uid=725717&do=blog&id=2060377