Perforce Public Knowledge Base - P4D: Installing A New License File
Reset Search
 

 

Article

P4D: Installing A New License File

« Go Back

Information

 
Problem
How do I install a new license file?
 
Solution

Important: Before you continue rename the new license file to be 'license.txt'.

In order to avoid confusion for sites that have multiple servers, your new license file may be named using the license host or IP address, along with other identifying information. Regardless of what the file is named when you receive it, be sure to change the name to license.txt.

When you add new users, extend support, or when the Perforce Server's IP address or port number changes, you need to install a new license file. To install a new license file, use one of the following three methods:

1. Install the File and (Re)start the Server

Server Currently Running:
  • If there are no changes to the IP address or port number in your license file or you are not switching from an unlicensed to a licensed server, you can copy the new license file over the existing license in the Perforce server root (P4ROOT) directory and the P4 Server will continue running. The p4 info command will reflect the updated license information.
  • If the Perforce Server's IP address changes, or the port number in the license file changes, you must also stop and start the Perforce Server

Note: If the IP address or port on the license is incorrect, or if there is another issue with the license file, the server will not restart after shutting down. Confirm the IP address and port, and use the Change of Server online to make changes as needed, and follow the steps for a server that is not currently running.

Server Not Currently Running:

  1. Remove any license file still in the Perforce server root (P4ROOT) directory.
  2. Copy the new license file as "license" to the P4ROOT directory.
  3. Start the server as normal, or as instructed below.
Stopping and Restarting
To stop a P4 Server instance: 
p4 -u User -p Server:Port admin stop
To start a P4 Server Instance:
The method to start a Perforce server depends upon your platform/operating system.
  • Windows: Open an administrator command prompt and enter this command: 
net start perforce
 
Note: You can also enter "services.msc" to go to the Service Management Console, find "Perforce", and select "Start".
  • Linux/Unix/Mac: Run the Perforce Server startup script you usually use. If you do not have a Perforce startup script, the following command will start the Perforce Server in Daemon Mode in the specified P4ROOT location. For example:
p4d -r /specify/path/to/P4ROOT -d   

Note: The actual startup string or configuration used in your production environment might be very different than the basic server invocation above.

2. Use the p4 license Command

The p4 license command enables Perforce 'super' users to update or display the Perforce license file. This command requires a valid license file already in the Perforce server root directory.

To display your current license:

p4 license -o

To install a new license, enter the command:
 
cat license | p4 license -i

Or the command:
 
p4 license -i < license

Note: The general use case for the p4 license command is adding new users or extending support without stopping the server. However, when the server IP address or port number has changed in the license file, the p4 license command will not work. For example, if the IP address changed in the new license file, then you will receive the following message:

Server license IPaddress changed, cannot proceed.

In this case, you must stop and restart the server as detailed above.

3. Use the P4V Administration Tool (P4Admin)

Note: If the IP address or host has changed in the license file you can not use P4Admin to update the license file. Use option 1 (Install the file directly to the Perforce server root directory) to install the new license.

To install your new licenses using P4V:

  1. Launch P4V and open a connection to a Perforce/Helix server as a super user.
  2. Choose the "Tools | Administration..." menu item in P4V.
  3. After P4Admin opens, click on the "Load new license file" link on the Administration Home page and browse to the license file on your local disk.

After successful installation, the Administration tool Home page is updated with the new license information.

Note: If you also need to install a new Swarm license file, the article on Swarm: Installing a New License File will guide you through the process.

 

Related Links

Feedback

 

Was this article helpful?


   

Feedback

Please tell us how we can make this article more useful.

Characters Remaining: 255