发新话题
打印

使用sc安装服务时总返回sc create的帮助信息

使用sc安装服务时总返回sc create的帮助信息

我这里环境是xp sp2
svn版本是1.4.0
设置了以下环境变量
复制内容到剪贴板
代码:
SVN_HOME=D:\Program Folders\svn-win32
path =%SVN_HOME%\bin
APR_ICONV_PATH =%SVN_HOME%\iconv
使用
复制内容到剪贴板
代码:
svnserve -d -r d:\svn-root
能正常启动服务,访问资源库也正常

但是使用
复制内容到剪贴板
代码:
sc create svnservice binpath="D:\Program Folders\svn-win32\bin\svnserve.exe --service -r d:\svn-root" displayname=Subversion depend=Tcpip start=auto
总是返回
复制内容到剪贴板
代码:
Creates a service entry in the registry and Service Database.
SYNTAX:
sc create [service name] [binPath= ] <option1> <option2>...
CREATE OPTIONS:
NOTE: The option name includes the equal sign.
type= <own|share|interact|kernel|filesys|rec>
       (default = own)
start= <boot|system|auto|demand|disabled>
       (default = demand)
error= <normal|severe|critical|ignore>
       (default = normal)
binPath= <BinaryPathName>
group= <LoadOrderGroup>
tag= <yes|no>
depend= <Dependencies(separated by / (forward slash))>
obj= <AccountName|ObjectName>
       (default = LocalSystem)
DisplayName= <display name>
password= <password>
看过svn官方站点的对windows安装服务的介绍,有提到说如果路径包含空格,需要在路径的开始结尾加上\"
复制内容到剪贴板
代码:
sc create svnservice binpath="\"D:\Program Folders\svn-win32\bin\svnserve.exe\" --service -r d:\svn-root" displayname=Subversion depend=Tcpip start=auto
还是返回相同的内容

使用sc create最基础的参数
复制内容到剪贴板
代码:
sc create svnservice binpath="\"D:\Program Folders\svn-win32\bin\svnserve.exe\" --service -r d:\svn-root"
也是返回相同内容

服务中确实不存在同名的服务
关掉服务窗口,还是上面提到的返回结果
甚至乱输入一个其它的现存的exe路径(服务名随便乱输入),也是返回同样的结果
实在想不到哪里有问题了


P.S.:code使用等宽字体好看些,现在才发现Discuz只是简单的给code加个框

[ 本帖最后由 netwjx 于 2006-10-30 16:56 编辑 ]

TOP

看这个 http://www.subversion.org.cn/ind ... ;id=83&Itemid=9

我想
      sc create svnservice
      binpath= "D:\Subversion\bin\svnserve.exe --service -r D:\svnroot"
      displayname= "SVNService"
      depend= Tcpip

注意depent=后面是有空格的,还有binpath=,displayname=

TOP

我只看过(Google到的)http://svn.collab.net/repos/svn/tags/1.4.0/notes/windows-service.txt
但是英文不是很好

Note that the command-line syntax for SC is rather odd.  Key/value
pairs are specified as "key= value" (without the double-quotes).  The
"key=" part must not have any spaces, and the "value" part MUST be
separated from the "key=" by a space.
这段就没仔细看....

太浪费管理员时间了

[ 本帖最后由 netwjx 于 2006-10-30 18:18 编辑 ]

TOP

呵呵,也是这命令格式太怪。

TOP

受到启发了,看来还有很多的东西要学习的。

TOP

試出來囉~~~~It's works


sc create svnservice binpath= "\"C:\Program Files\Subversion\bin\svnserve.exe  --service -r E:\svn_repos\""  displayname= "SVNService" depend= Tcpip


BTW : 成功之後,可以用"我的電腦"->滑鼠右鍵選"管理"->找到服務-->然後找你加入的SERVICE

  加油吧~大伙們~

TOP

楼上繁体字,台湾同胞?

TOP

貌似可以安裝但無法起動:


轉各灣:
系統環境變數加入:C:\Program Files\Subversion\bin
開任意命令視窗(command windows) 測試command svnserve
成功後

改成下列:
sc create svnservice2 binpath= "svnserve.exe --service -r E:\svn_repos\"

用我的電腦>滑鼠右鍵>選管理->找服務及應用程式>找服務>找svnservice2
滑鼠右鍵>內容

   分別測試:已停用,手動,自動

可以的話 repository 就ok了~~



         但是阿帕器起不來~~ 也沒辦法 recursive 加入整各目錄和子目錄所有檔案~~
    真不方便~~~

TOP

recursive 加入整各目錄

用TortoiseSVN啦

TOP

上面方式 重新開機就無效了~

重新裝Subversion 到 C:/Subversion
下面就可以用了~~
sc create SVNService binpath= "C:/Subversion/bin/svnserve.exe --service -r E:/svn/" displayname= "SVNService" depend= Tcpip

TOP

发新话题