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. 在 MySQL 中查找含有目标字段的表

    要查询数据库中哪些表含有目标字段,可以使用语句: SELECT TABLE_SCHEMA,TABLE_NAME FROM information_schema.`COLUMNS` WHERE COLU ...

  2. 西川善司【神秘海域(Uncharted)】的图形分析

          本文是为传播0月8日发售的[神秘海域 合集]魅力而短篇连载的第2回,这次主要集中在神秘海域系列的图形的技术方面.原文链接在 http://weekly.ascii.jp/elem/000/ ...

  3. eclipse SDK更新管理器安装插件

    1.在Eclipse的主菜单,点击help,选择Install New Software 2.Work with: Indigo - http://download.eclipse.org/relea ...

  4. Sublime Text3注册码(可用)

    Sublime Text3注册码(可用) (2014-12-20 21:24:56) 转载▼ 标签: sublime sublime3 sublimetext sublimetext3 分类: 实用工 ...

  5. MongoDB性能监控

    1.mongostat 查看运行中的mongodb实例的统计信息 重要指标说明: getmore: 通常发生在结果集比较大的查询时,第一个query返回了部分结果,后续的结果是通过getmore来获取 ...

  6. MySQL出现大量unauthenticated user的问题

    发现这算属MySQL的一个bug,不管连接是通过hosts还是ip的方式,MySQL都会对DNS做反查,IP到DNS,由于反查的接续速度过 慢(不管是不是isp提供的dns服务器的问题或者其他原因), ...

  7. json数据交换

    1.1   为什么要进行json数据交互 json数据格式在接口调用中.html页面中较常用,json格式比较简单,解析还比较方便. 比如:webservice接口,传输json数据. 1.2   s ...

  8. hibernate manytoone中的lazy EAGER

    Hibernate中的字段映射中的Fetch有两种方式:EAGER和LAZY Eager:全部抓取 Lazy:延迟抓取 如果在字段中声明为Eager,那么在取得当前Bean时,同时会抓取Bean中的关 ...

  9. 读书笔记——《图解TCP/IP》(3/4)

    经典摘抄 第五章 IP协议相关技术 1.DNS可以将网址自动转换为具体的IP地址. 2.主机识别码的识别方式:为每台计算机赋以唯一的主机名,在进行网络通信时,可以直接使用主机名称而无需输入一大长串的I ...

  10. HBase的架构以及各个模块的功能

    一:整体架构 1.体系结构 2.物理模型 3.存储体系 regionserver->region->多个store(列簇)->一个memstore和多个storefile 4.HDF ...