- 浏览: 414114 次
- 性别:
- 来自: 郑州
文章分类
最新评论
-
yan789654100:
先谢谢了,去研究一下
Java网络围棋游戏源码含大厅,仿QQ游戏 -
dan0773:
火狐里面用不了
梅花雨日历控件源码,及应用实例 -
左手边:
挺好的不错
Velocity教程 -
liuxuejin:
既然是教程,连个例子都没有!顶多是个笔记而已
Velocity教程 -
sky_pearl:
泪奔……求大厅代码!!!
Java网络围棋游戏源码含大厅,仿QQ游戏
以前的svnserve要想成为windows服务,必须依赖于svnservice或其他工具。从Subversion1.4开始,Subversion本身就集成Windows服务的工具。
1,安装svnservice
在Windows NT中(包括Windows XP, Windows 2000, Windows 2003 Server)本身包含了一个安装服务的工具,叫做"Service Control",也就是sc.exe。
例如我的Subversion安装在"D:\Subversion",版本库在"D:\svnroot",而我希望对应的Subversion服务名为svnservice,安装这个svn服务的命令就可以这样写:
sc create svnservice binpath= "D:\Subversion\bin\svnserve.exe --service -r D:\svnroot" displayname= "SVNService" depend= Tcpip 例如:
sc create Subversion_Service binPath= "\"D:\Program Files\Subversion\bin\svnserve.exe\" --service -r e:\svn\project" displayName= "SubversionService" depend= Tcpip
请注意,因为便于察看,上面的命令分为多行,但在实际执行时应该在一行里。另外,在以前启动svnserve时会使用"-d"选项,也就是守护进程模式,在这里不能使用,会导致服务无法启动。同样,"-i"和"-t"选项也不能使用。
在命令行窗口执行完这个命令之后,服务还没有启动,你可以继续运行"net start svnservice"启动这个服务,然后使用"net stop svnservice"停止服务。
另外还有两点需要小心处理。首先,如果路径中包括空格,一定要用“\”处理“"”号,例如上面的例子中如果svnserve.exe在“c:\ program files\subversion\”中,则命令应该写为“binpath= "\"c:\program files\subversion\bin\svnserve.exe\"”(“”中的内容),整个命令如下,红色部分是改变部分:
sc create svnservice binpath= "\"D:\program files\Subversion\bin\svnserve.exe\" --service -r D:\svnroot" displayname= "SVNService" depend= Tcpip 其次,sc对选项的格式还有要求,例如“depend= Tcpip”不能写为“depend = Tcpip”或“depend=Tcpip”,也就是“=”前不能有空各,而后面必须有空格。
2,删除服务
如果服务安装的有问题,你可能需要删除服务。要删除前面添加的服务,只需要运行"sc delete svnservice","svnservice"就是我们创建服务时使用的名字。
3,配置服务是自动启动
默认情况下安装的服务不会随Windows的启动而启动,为了使svn服务能够随Windows启动而启动,需要修改一下"sc create"命令(首先要删除),增加"start= auto"选项:
sc create svnservice binpath= "D:\Subversion\bin\svnserve.exe --service -r D:\svnroot" displayname= "SVNService" depend= Tcpip start= auto 当然你也可以使用图形化的工具修改服务的属性,你可以在“开始->运行...”中执行"services.msc",然后在界面中修改。
Windows Service Support for svnserve ==================================== svnserve can now be run as a native Windows service. This means that the service can be started at system boot, or at any other time, without the need for any wrapper code to start the service. The service can be managed like any other Windows service, using command-line tools ("net start", "net stop", or sc.exe) or GUI tools (the Services administrative tool). Installation ------------ For now, no means is provided to install the service. Most Windows OSes derived from Windows NT (such as Windows XP, Windows 2000, Windows 2003 Server) provide a command-line tool for installing services, called SC.EXE for "Service Control". To create a service for svnserve, use SC.EXE: sc create <name> binpath= "c:\svn\bin\svnserve.exe --service <svn-args>" displayname= "Subversion Repository" depend= Tcpip where <name> is any service name you want, e.g. "svnserve", and <svn-args> are the arguments to svnserve, such as --root, --listen-port, etc. (All of this should be specified on a single line, of course.) In order for svnserve to run as a Windows service, you MUST specify the --service argument, and you must NOT specify any other run mode argument, such as --daemon, --tunnel, --inetd, or any of their short forms. There is no short form for --service. If the path to svnserve.exe contains spaces or other characters that must be escaped, then you must enclose the path to svnserve.exe with double-quotes, which themselves must be quoted using a backslash. Fortunately the syntax is similar to that on Unix platforms: sc create <name> binpath= "\"c:\program files\subversion\bin\svnserve.exe\" ..." SC has many options; use "sc /?". The most relevant are: sc create <name> create a new service sc qc <name> query config for a service sc query <name> query status sc delete <name> delete any service -- BE CAREFUL! sc config <name> ... update service config; same args as sc create sc start <name> start a service (does NOT wait for completion!) sc stop <name> stop a service (does NOT wait for it to stop!) 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. If you want to be able to see the command shell, add these arguments to the "sc create" command-line: type= own type= interact This sets the "interactive" bit on the service, which allows it to interact with the local console session. You can create as many services as you need; there is no restriction on the number of services, or their names. I use a prefix, like "svn.foo", "svn.bar", etc. Each service runs in a separate process. As usual, it is your responsbility as an administrator to make sure that no two service instances use the same repository root path, or the same combination of --listen-port and --listen-host. Uninstalling ------------ To uninstall a service, stop the service, then delete it, using "sc delete <name>". Be very careful with this command, since you can delete any system service, including essential Windows services, accidentally. Also, make sure that you stop the service before you delete it. If you delete the service before stopping it, the Service Control Manager will mark the service "deleted", but will intentionally not stop the service. The service will be deleted when the system reboots, or when the service finally exits. After all, you only asked to delete the service, not to stop it. That's all there is to it. Automatically Starting Service on System Boot --------------------------------------------- By default, SC creates the service with the start mode set to "demand" (manual). If you want the service to start automatically when the system boots, add "start= auto" to the command line. You can change the start mode for an existing service using "sc config <name> start= auto", or also by using the Windows GUI interface for managing services. (Start, All Programs, Administrative Tools, Services, or just run "services.msc" from Start/Run or from a command-line.) Note: In order for svnserve to start correctly on system boot, you must properly declare its startup dependencies. The Service Control Manager will start services as early as it can, and if you do not properly declare its startup dependencies, it can potentially start before the TCP/IP stack has been started. This is why you must provide specify 'depend= Tcpip' to SC.EXE when creating the service. Starting and Stopping the Service --------------------------------- You start and stop the service like any other Windows service. You can use the command-line "net start <name>", use the GUI Services interface. Debugging --------- Debugging a Windows service can be difficult, because the service runs in a very different context than a user who is logged in. By default, services run in a "null" desktop environment. They cannot interact with the user (desktop) in any way, and vice versa. Also, by default, services run as a special user, called LocalSystem. LocalSystem is not a "user" in the normal sense; it is an NT security ID (SID) that is sort of like root, but different. LocalSystem typically does NOT have access to any network shares, even if you use "net use" to connect to a remote file server. Again, this is because services run in a different login session. Depending on which OS you are running, you may have difficulty attaching a debugger to a running service process. Also, if you are having trouble *starting* a service, then you can't attach to the process early enough to debug it. So what's a developer to do? Well, there are several ways you can debug services. First, you'll want to enable "interactive" access for the service. This allows the service to interact with the local desktop -- you'll be able to see the command shell that the service runs in, see console output, etc. To do this, you can either use the standard Windows Services tool (services.msc), or you can do it using sc.exe. * With the GUI tool, open the properties page for a service, and go to the "Log On" page. Select "Local System account", and make sure the "Allow service to interact with desktop" box is checked. * With SC.EXE, configure the service using the command: sc <name> config type= own type= interact Yes, you must specify type= twice, and with exactly the spacing shown. In both cases, you'll need to restart the service. When you do, if the service started successfully, you'll see the console window of the service. By default, it doesn't print anything out. Next, you'll want to attach a debugger, or configure the service to start under a debugger. Attaching a debugger should be straightforward -- just find the process ID. But if you need to debug something in the service startup path, you'll need to have a debugger attached from the very beginning. There are two ways to do this. In the first method, you alter the command-line of the service (called the "binary path"). To do this, use SC.EXE to set the binary path to whatever debugger you are going to use. I use the most recent version of WinDbg, which is excellent, and is available at: http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx For example, this command would configure the service to start under a debugger: sc config <name> binpath= "d:\dbg\windbg.exe -g -G d:\svn\bin\svnserve.exe --root d:\path\root --listen-port 9000" depend= Tcpip The entire command must be on a single line, of course, and the binary path must be in double-quotes. Also, the spacing MUST be: binpath= "..." Substitute whatever debugger you want, with whatever command-line you want, in place of windbg.exe. Then start the service (sc start <name>), and the Service Control Manager should execute the command-line you provided as the binary path. Then your debugger should start, and should launch the svnserve process. Known Issues ------------ * No management tool (installer, etc.). For the first version, this is intentional; we just want to get the service functionality tested and committed before dealing with installation. * Right now, I don't know of a way to cleanly stop the svnserve process. Instead, the implementation closes the listen socket, which causes the main loop to exit. This isn't as bad as it sounds, and is a LOT better than other options (such as terminating a thread). To Do ----- * The support for running svnserve as a Windows service is complete, but there is still more work to be done for installing and managing services.
- SVNService.zip (38.7 KB)
- 描述: svnservice 源文件
- 下载次数: 6
发表评论
-
Extjs 验证使用
2012-08-10 10:16 994/** * 用户表单面板 */ Ext.def ... -
使用ext的store.load 之后然后使用store.getCount 值为零解决办法
2012-07-13 09:12 1231使用ext的store.load(),之后然后使用store. ... -
什么样的cms系统算是强大
2012-07-10 17:41 988现在建站的cms系统层出不穷。从简单的到功能复杂的。从功 ... -
OpenCV背景去除的几种方法(转)
2012-07-02 10:15 8603OpenCV背景去除的几种方法 1、肤色侦测法 肤 ... -
error: command 'mt.exe' failed with exit status 31
2012-06-18 17:39 2425python setup.py build_ext -i ... -
MyBatis 3 + Spring3 多数据源配置
2012-02-27 14:50 1382详细内容地址: 终于把 MyBatis 3 和 Sp ... -
Google Earth 开发示例(Hello World)
2011-04-13 17:06 1631Google Earth Hello World 示例 &l ... -
DB2 分页查询方法,查询top N 条记录
2011-01-13 18:50 28111. db2分页查询sql select * f ... -
Birt 中的通过Script加入调试输出SQL语句代码
2010-11-18 15:54 1412用Brit制作报表时可通过在Script脚本中加入以下代码输出 ... -
TSM - Creating an include-exclude list (optional)
2010-06-09 11:00 1561Creating an include-exclude l ... -
TSM - Configuring the Web client
2010-06-09 10:51 933Configuring the Web client The ... -
Linux下 Tsm 服务器、客户端安装配置全过程
2010-05-17 10:06 1752系统环境:LINUX AS5 存储:IBM DS400 ... -
安装DB2补丁步骤
2009-10-27 17:30 17661. 通过运行 su - root ... -
WAS 6.0.2.9 部署应用使用过滤器问题解决办法
2009-08-05 16:07 1441支撑环境: IBM WebSphere Application ... -
MyEclipse5.5GA配置Websphere V6.1 全过程(详细版)
2009-07-16 13:32 1285转载自:http://blog.chinaunix.net/u ... -
WebSphere Application Server 6.0.2.9 配置 SqlServer 2000 SP2时出错问题解决
2009-07-15 12:56 1836WebSphere Application Server 6. ... -
WAS 5.1 部署应用容器属性配置
2009-07-07 14:52 2547WAS 5.1 部署应用容器属性配置 引用地址:http:/ ... -
Struts JSR168 Portlet using the ITIM API
2009-06-02 19:29 983Leveraging the IBM Tivoli Ident ... -
ITIM API
2009-06-02 19:22 943ITIM API http://publib.boulder ... -
打开IBM WebSphere Portal trace 收集
2009-05-26 10:37 1432Collecting login-specific infor ...
相关推荐
- 使用`yum install mod_dav_svn subversion`命令安装Subversion和Apache(如果未安装)。 6. **设置**: - 配置Apache:修改`/etc/httpd/conf/httpd.conf`中的`ServerName`,启动Apache服务并检查是否成功。 - ...
Ubuntu中安装subversion服务器,Ubuntu中安装subversion配置服务器,超级详细!
【Linux系统安装Subversion服务器与配置】\n\nSubversion(简称SVN)是一个功能强大的版本控制系统,用于管理和跟踪文件及目录的变更。它解决了传统版本控制系统的诸多问题,如CVS系统中存在的文件重命名、目录管理...
【Linux系统安装Subversion服务器与配置】 Subversion(SVN)是一个开源的版本控制系统,用于管理文件和目录的变更历史,常用于软件开发中的代码版本管理。与CVS相比,SVN提供了更好的文件命名和目录管理,更有效的...
1. **启动Subversion服务** 根据你的配置,启动相应的服务: 对于Apache: ```bash sudo systemctl start apache2 ``` 对于内置DAV/svn服务器: ```bash sudo svnserve -d -r /var/svn ``` 2. **测试...
### Subversion 安装为 Windows 服务 #### 概述 在早期的 Subversion 版本中,若想将其作为 Windows 服务运行,则通常需要借助第三方工具如 svnservice 或其他方式来实现这一功能。然而从 Subversion 1.4 版本开始...
1. 安装:下载并安装Subversion服务器软件,如VisualSVN Server(Windows)或Apache HTTP Server + mod_dav_svn(跨平台)。 2. 创建仓库:在服务器上创建一个新仓库,指定存储位置。 3. 配置访问控制:设置用户和...
- Linux用户通常使用包管理器(如apt-get或yum)来安装Subversion服务器和客户端。 - Mac用户可以使用Homebrew或者通过下载预编译的二进制包来安装。 3. **创建仓库** - 在服务器上创建一个目录作为Subversion...
在Linux系统上,这可能涉及使用包管理器(如apt-get或yum)来安装subversion、apache2(或httpd)以及可能的其他依赖。在Windows上,可以下载并安装VisualSVN Server等预配置的解决方案。 接下来,我们需要创建...
#### 二、Windows环境下安装Subversion服务器 - **环境需求**: - 操作系统: Windows 2000 Server with SP4 - Apache HTTP Server: Apache_2.0.63-win32-x86-no_ssl.msi - SSPI: mod_auth_sspi-1.0.2-2.0.54.zip ...
6. 启动Subversion服务。 在实际操作中,可能还需要安装其他依赖,例如apr-iconv、neon、serf等,这些库可能没有包含在提供的压缩包内,但通常可以从Linux发行版的软件仓库中获得。 总的来说,源码安装Subversion ...
这通常涉及安装Subversion服务器软件,如在描述中提到的`Setup-Subversion-1.6.17.rar`文件,这是一个Subversion服务器的安装包。安装过程中,你需要选择合适的安装路径,配置服务器端的仓库(repository),并设置...
- 安装Subversion服务器:按照安装向导的指示完成安装过程,通常选择默认选项即可。 - 安装Subversion客户端:推荐使用TortoiseSVN,它是一个与Windows资源管理器集成的图形化客户端,可以从`...
在CentOS操作系统上安装Subversion,特别是对于最小化安装的系统,可能需要手动安装必要的RPM包。以下是关于Subversion在CentOS上安装、配置和使用的一些核心知识点。 1. **RPM包管理**: - CentOS使用RPM(Red ...
6. **启动和管理Subversion服务**:Subversion服务器可以通过`systemctl start svnserve`启动,`systemctl enable svnserve`将其设置为开机启动。你可以使用`systemctl status svnserve`查看服务状态。 7. **访问...
Linux 下安装 Subversion Subversion 是一个版本控制系统,广泛应用于软件开发、文档管理等领域。为了在 Linux 环境下安装 Subversion,需要安装相关依赖包,包括 OpenSSL、zlib 和 Apache。 一、安装依赖包 1. ...
在SUSE Linux中,可以使用YaST(YaST Control Center)或zypper包管理器来安装Subversion。打开终端,输入以下命令来安装必要的组件: ```bash sudo zypper install subversion apache2-mod_dav_svn ``` 这会...
一、安装Subversion服务 1. **下载与运行安装包**:首先,从可靠的源下载"Setup-Subversion-1.6.15.msi",然后双击运行安装程序。按照向导的指示进行操作,选择"服务器安装"选项,这将确保安装必要的服务器组件。 ...