Perforce requires at least two executables: the server (p4d), and at least one Perforce client
program (such as p4 on UNIX, or p4.exe on Windows).

If you have Administrator privileges, it is usually best to install Perforce as a service. If
you don’t, install it as a server.

Windows Installation

Use the Perforce installer program to install or upgrade the Perforce Server, Perforce
Proxy, or the Perforce Command-Line Client.

Windows services VS windows servers

To run any task as a Windows server, a user account must be logged in, because shortcuts
in a user’s Startup folder cannot be run until that user logs in. A Windows service, on the
other hand, is invoked automatically at boot time and runs regardless of whether or not a
user is logged in to the machine.

The Perforce service (p4s.exe) and the Perforce server (p4d.exe) executables are copies
of each other; they are identical apart from their filenames. When run, they use the first
three characters of the name with which they were invoked (that is, either p4s or p4d) to
determine their behavior. For example, invoking copies named p4smyserver.exe or
p4dmyservice.exe invokes a service and a server, respectively.

Starting and stopping the Perforce service

services.msc or user command line: p4 admin stop

Starting and stopping the Perforce server

The server executable, p4d.exe, is normally found in your P4ROOT directory. To start the
server, first make sure your current P4ROOT, P4PORT, P4LOG, and P4JOURNAL settings are
correct; then run: %P4ROOT%\p4d
To start a server with settings different from those set by P4ROOT, P4PORT, P4LOG, or
P4JOURNAL, use p4d command-line flags. For example:
c:\test\p4d -r c:\test -p 1999 -L c:\test\log -J c:\test\journal
starts a Perforce server process with a root directory of c:\test, listening to port 1999,
logging errors to c:\test\log, and with a journal file of c:\test\journal. The p4d
command-line flags are case-sensitive.
To stop the Perforce server, use the command:
p4 admin stop

Windows configuration parameter precedence

Under Windows, Perforce configuration parameters can be set in many different ways.
When a Perforce client program (such as p4 or P4V), or a Perforce server program (p4d)
starts up, it reads its configuration parameters according to the following precedence:
1. The program’s command-line flags have the highest precedence.
2. The P4CONFIG file, if P4CONFIG is set
3. User environment variables
4. System environment variables
5. The Perforce user registry (set by p4 set)
6. The Perforce system registry (set by p4 set -s)
When a Perforce service (p4s) starts up, it reads its configuration parameters from the
environment according to the following precedence:
1. Windows service parameters (set by p4 set -S servicename) have the highest
precedence.
2. System environment variables
3. The Perforce system registry (set by p4 set -s)
User environment variables can be set with any of the following:
• The MS-DOS set command
• The AUTOEXEC.BAT file
• The User Variables tab under the System Properties dialog box in the Control Panel
System environment variables can be set with:
• The System Variables tab under the System Properties dialog box in the Control Panel

Moving between machines of the same architecture

If the architecture of the two machines is the same (for example, SPARC/SPARC, or
x86/x86), the versioned files and database can be copied directly between the machines,
and you only need to move the server root directory tree to the new machine. You can use
tar, cp, xcopy.exe, or any other method. Copy everything in and under the P4ROOT
directory - the db.* files (your database) as well as the depot subdirectories (your
versioned files).
1. Back up your server (including a p4 verify before the backup) and take a
checkpoint.
2. On the old machine, stop p4d.
3. Copy the contents of your old server root (P4ROOT) and all its subdirectories on the
old machine into the new server root directory on the new machine.
4. Start p4d on the new machine with the desired flags.
5. Run p4 verify on the new machine to ensure that the database and your versioned
files were transferred correctly to the new machine.
(Although the backup, checkpoint, and subsequent p4 verify are not strictly necessary,
it’s always good practice to verify, checkpoint, and back up your system before any
migration and to perform a subsequent verification after the migration.)

Delete a workspace

From the "View" menu, select "Workspaces". You'll see all of the workspaces you've created. Select the workspaces you want to delete and click "Edit" -> "Delete Workspace", or right-click and select "Delete Workspace". If the workspace is "locked" to prevent changes, you'll get an error message.

To unlock the workspace, click "Edit" (or right-click and click "Edit Workspace") to pull up the workspace editor, uncheck the "locked" checkbox, and save your changes. You can delete the workspace once it's unlocked.

In my experience, the workspace will continue to be shown in the drop-down list until you click on it, at which point p4v will figure out you've deleted it and remove it from the list.

Perforce 使用笔记的更多相关文章

  1. 【Tools】Pro Git 一二章读书笔记

    记得知乎以前有个问题说:如果用一天的时间学习一门技能,选什么好?里面有个说学会Git是个很不错选择,今天就抽时间感受下Git的魅力吧.   Pro Git (Scott Chacon) 读书笔记:   ...

  2. [Git00] Pro Git 一二章读书笔记

    记得知乎以前有个问题说:如果用一天的时间学习一门技能,选什么好?里面有个说学会Git是个很不错选择,今天就抽时间感受下Git的魅力吧.   Pro Git (Scott Chacon) 读书笔记:   ...

  3. 《Linux就该这么学》自学笔记_ch21_使用Git分布式版本控制系统

    <Linux就该这么学>自学笔记_ch21_使用Git分布式版本控制系统 文章主要内容: 分布式版本控制系统 使用Git服务程序 提交数据 移除数据 移动数据 历史记录 还原数据 管理标签 ...

  4. Git、Github、Gitkraken 学习笔记

    <Git.Github.Gitkraken 学习笔记> 一.写在前面 1.参考资料 本文参考 <Pro Git> 一书. 在官网有免费在线版可供阅读:https://git-s ...

  5. git-简单流程(学习笔记)

    这是阅读廖雪峰的官方网站的笔记,用于自己以后回看 1.进入项目文件夹 初始化一个Git仓库,使用git init命令. 添加文件到Git仓库,分两步: 第一步,使用命令git add <file ...

  6. js学习笔记:webpack基础入门(一)

    之前听说过webpack,今天想正式的接触一下,先跟着webpack的官方用户指南走: 在这里有: 如何安装webpack 如何使用webpack 如何使用loader 如何使用webpack的开发者 ...

  7. SQL Server技术内幕笔记合集

    SQL Server技术内幕笔记合集 发这一篇文章主要是方便大家找到我的笔记入口,方便大家o(∩_∩)o Microsoft SQL Server 6.5 技术内幕 笔记http://www.cnbl ...

  8. PHP-自定义模板-学习笔记

    1.  开始 这几天,看了李炎恢老师的<PHP第二季度视频>中的“章节7:创建TPL自定义模板”,做一个学习笔记,通过绘制架构图.UML类图和思维导图,来对加深理解. 2.  整体架构图 ...

  9. PHP-会员登录与注册例子解析-学习笔记

    1.开始 最近开始学习李炎恢老师的<PHP第二季度视频>中的“章节5:使用OOP注册会员”,做一个学习笔记,通过绘制基本页面流程和UML类图,来对加深理解. 2.基本页面流程 3.通过UM ...

随机推荐

  1. NV Perf Kit

    https://developer.nvidia.com/gameworksdownload#?dn=perfkit-4-0-0 Title Version Release Date PerfKit  ...

  2. 只要项目是maven构建的,pom.xml中依赖的jar包全都默认去你电脑本地仓库去找

    只要项目是maven构建的,pom.xml中依赖的jar包全都默认去你电脑本地仓库去找

  3. 让Win8自动登录免输入密码的小技巧

    按Win+R键,输出“netplwiz”,单击“确定”,弹出“用户帐户”窗口.将第一个画框上的勾选去掉——应用——弹出自动登录输入你的密码——确定——确定完成.重启看看电脑是不是不用输入密码也可以自动 ...

  4. PHP学习(五)----jQuery和JSON数据

    对于jQuery: jQuery 是一个 JavaScript 库. jQuery 极大地简化了 JavaScript 编程.

  5. 【转】android中最好的瀑布流控件PinterestLikeAdapterView

    [源地址]http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2014/0919/1696.html 之前我们介绍过一个开源的瀑布流控件Stag ...

  6. C 判断路径存在

    1   用   int   access(const   char   *pathname,   int   mode);   判断有没有此文件或目录 --它区别不出这是文件还是目录2   用   i ...

  7. Java反射机制深入研究

    ava 反射是Java语言的一个很重要的特征,它使得Java具体了“动态性”.   在Java运行时环境中,对于任意一个类,能否知道这个类有哪些属性和方法?对于任意一个对象,能否调用它的任意一个方法? ...

  8. NSURLSession

    参考文章1, apple文档 一.NSURLSessionConfiguration 介绍:分别配置每一个 session 对象.(NSURLConnection 很难做到) 分类: 1) defau ...

  9. 前端 JSer 装逼手册

    阅读 8143收藏 2352016-7-18 SegmentFault 分享:吉祥物 @ SegmentFault 在装逼成本越来越高的 JS 圈,是时候充值一下了 -- 题记. 作者:kenberk ...

  10. 【Java 进阶篇】【第一课】String类

    引用 String类包含在java.lang包中.这个包会在Java启动的时候自动import,所以可以当做一个内置类(built-in class).我们不需要显式的使用import引入String ...