Windows installation: Quickstart
If you already have an installation and now want a more recent version, see Upgrade the server.
To learn how to install and secure a P4 Server on Windows, watch this video or read the instructions following the video.
Install P4 Server
These steps assume you are installing P4 Server for the first time. If you are upgrading P4 Server, see Upgrade the server.
-
Log on to Windows with Administrator privileges to install the P4 Server.
-
Download P4 Server for Windows from the Perforce website.
-
Install the P4 Server using the downloaded installer binary.
-
In Select Applications:
-
Choose the features to install - Server (P4D) and Command-Line Client (P4). These are selected by default.
-
(Optional) Change the primary install directory. By default, this is
C:\Program Files\Perforce.
-
-
In Server Configuration:
-
Enter a Port Number, by default, this is
1666. You can specify another port number. -
In P4ROOT, create or choose the default server location. For example,
C:\P4ROOT.
-
-
In Client Configuration:
-
In Server, type in
<machine-name>:1666where<machine-name>is the name of your machine and port number is what you entered above. To run P4 Server on your machine, enterlocalhost:1666. -
In User Name, enter yourP4 Server user name.
The user name is required to create the first Perforce user account that will connect to your P4 Server.This first user will be the superuser.
-
-
Click Next and then Install.
-
Once the installation is complete, check that P4 Server is running by opening a command window and running:
p4 -p <machine name>:1666 info
This will output server information to the command window.
P4 Server is now installed. You can now connect to the server using P4V.
Connect to the server using P4V
To connect to the P4 Server, you need a client application such as P4V.
To install P4V:
-
Download P4V for Windows from the Perforce website.
-
Install the P4V using the downloaded installer binary.
-
On the Select Applications screen, select all applications. This includes:
-
P4 Visual Client (P4V) (P4V)
-
P4Merge - A merging and file comparison tool
-
P4Admin - Visual administration client for P4 Server
-
P4 - The command-line client for P4 Server
-
-
Click Next.
-
On the Client Configuration screen, enter or select the following information:
-
Server: This is your P4 Server address. If you are setting up P4 Server on your machine, enter
localhost:1666. Otherwise, enter<machine-name>:1666where<machine-name>is the name of your machine. -
User Name: This is the username for the super user created during the P4 Server installation.
-
Text Editing Application: Accept the default editor or click Browse to select a different application.
-
-
Click Next.
-
On the Ready to install screen, click Install to start installation. If you are prompted to allow the installer to make changes to your computer, click Yes.
-
When installation is complete, click Exit. P4V opens unless you selected not to open it.
P4V is now installed. You can now connect P4 Server and P4V. For more information on setting up the initial connection, see Connect to P4 Server.
If you see the error message about distributed version control
If you see the error message, "Helix Versioning Engine cannot be installed because setup has detected that this machine is already configured for distributed version control":
- Locate the
p4d.exefile in the DVCS folder. - Remove it or rename it.
- Run the installer.
This is a legacy message and Helix Core has now been renamed to P4.
To learn more, see the Perforce Knowledge Base article, Error Installing P4 Server on Windows.
Support for Long File Names on Windows
On Windows systems, file paths are traditionally limited to 260 characters. P4 Server can be configured to support long file names and paths that exceed this limit.
You typically only need to review or modify this setting if:
-
You are using a version of P4 Server older than 2015.2.
-
You work with tools that generate very deep directory structures.
-
You encounter errors related to Windows path length limits.
Default behavior
For P4 Server 2015.2 and later, long file name support is enabled by default. For earlier versions, it is disabled by default and must be enabled manually by setting filesys.windows.lfn=1.
For example:
p4 configure set filesys.windows.lfn=1
When enabled, P4 Server supports:
-
Paths up to 32,767 characters
-
Individual path components up to 255 characters
Client and proxy considerations
Depending on the depth of your workspace paths, you may also need to enable long file name support on:
-
Client machines
-
Proxies (which operate as clients)
To enable long file name support for a Windows proxy service, run:
p4 set -S "Perforce Proxy" P4DEBUG=filesys.windows.lfn=1
Only set this value when required by your environment.
What's next
After you have set up P4 Server and P4V, the next recommended steps are to:
-
Configure an administrative user. See the Quickstart Guide.
-
Secure your P4 Server. See Secure the server.
To learn how to start, stop, and manage the server service, see Manage the P4 Server Windows service.