zoukankan      html  css  js  c++  java
  • [SCM]源码管理 Perforce之Windows上多个perfoce和proxy并存

    默认地windows的安装文件perforce.exe可以将perforce或proxy安装为windows services,默认的services的名字分别为perforce和perforce proxy。但是对于在同一个windows系统上安装多个perforce或proxy的services的时候,我们需要使用svcinst.exe(可以在perforce server的安装目录下获得)来手动地完成services的安装。

    一 安装第二个perforce server

    假设我们已经有一个perforce server安装在c:\perforce, 且以名字为perforce的service运行。现在我们假设第二个perforce server的root为c:\p4root2且service名为为perforce2。

    1) 创建P4ROOT目录

    mkdir c:\p4root2

    2)拷贝p4d到P4ROOT目录下,且修改名字为p4s,表示此server将以service方式运行。拷贝license文件到P4ROOT下,方便起见也将svcinst.exe拷贝到P4ROOT下。

    copy c:\perforce\p4d.exe c:\p4root2
    copy c:\perforce\p4d.exe c:\p4root2\p4s.exe
    install {duplicate license} into c:\p4root2\license
    copy c:\perforce\svcinst.exe c:\p4root2\svcinst.exe
    # copy c:\perforce\svcinst.dll c:\p4root2\svcinst.dll

    如果是2008.1以前的版本,还需要拷贝svcinst.dll。

    3)使用service安装程序来安装perforce2 service。在安装前需要先切换到P4ROOT目录。

    cd c:\p4root2
    svcinst create -n Perforce2 -e c:\p4root2\p4s.exe -a

    4)设置perforce2 service的参数。使用client p4.exe来执行如下设置。

    p4 set -S Perforce2 P4ROOT=c:\p4root2
    p4 set -S Perforce2 P4PORT=1667
    p4 set -S Perforce2 P4LOG=log
    p4 set -S Perforce2 P4JOURNAL=journal

    查看参数的设置,使用p4 set -S Perforce2。

    5)使用service安装程序来启动service,如下:

    svcinst start -n Perforce2

    注意: 如果P4ROOT指向的是网络路径,则需要使用管理员账号来创建service。可以对svcinst使用-r和-u来指定管理员账号。

    svcinst create -n Perforce2 -e c:\p4root2\p4s.exe -a -r -u UserName Password

    二 创建service名字为AAA的proxy

    过程与创建perforce service相同,脚本如下:

    mkdir c:\p4proxyAAA
    copy C:\Program Files\Perforce\Proxy\p4p.exe c:\p4proxyAAA\p4p.exe
    copy c:\p4proxyAAA\p4p.exe c:\p4proxyAAA\p4ps.exe
    svcinst create -n "Perforce Proxy AAA" -e c:\P4ProxyAAA\p4ps.exe -a
    p4 set -S "Perforce Proxy AAA" P4PORT=1999
    p4 set -S "Perforce Proxy AAA" P4LOG=log
    p4 set -S "Perforce Proxy AAA" P4PCACHE=c:\P4ProxyAAA
    p4 set -S "Perforce Proxy AAA" P4TARGET=perforce:1666
    p4 set -S "Perforce Proxy AAA"

    svcinst start -n "Perforce Proxy AAA"

    参考: http://kb.perforce.com/article/35

     
  • 相关阅读:
    使用Fiddler和雷电模拟器抓取安卓https请求
    Robot Framework -- 安装接口测试库
    Robot Framework --为了进行Web测试,安装SeleniumLibrary外部库
    robotframework+python3+eclipse+RED自动化测试框架初学笔记
    LeetCode Weekly Contest 27
    LeetCode Weekly Contest 26
    京东4.7实习笔试题
    牛客网模拟笔试 2
    4.1几道最近的题目
    网易3.25实习笔试
  • 原文地址:https://www.cnblogs.com/itech/p/2151007.html
Copyright © 2011-2022 走看看