Linux non-package installation: quick example
The quickest way to get started:
- Make a directory for your installation:
mkdir newinstall
- Navigate to the newly-created directory:
cd newinstall
- Go to P4 Server Downloads
- Under Family, click Linux
- Under Platform, click Linux
- Click Download
- Copy the p4d file in your newly-created directory.
- Give the OS user execution permission for the p4d file:
chmod 755 p4d
- Configure the OS environment to have a Perforce user:
export P4USER=perforce
- Configure the OS environment to have a P4 Server port:
export P4PORT=localhost:1666
- Invoke the server executable, p4d, while specifying the current directory with `pwd` enclosed in backticks and the port as -p 1666:
./p4d -r `pwd` -p 1666 -J journal -L log -d
The output is:
Perforce db files in '/home/bruno/newinstall' will be created if missing...
Perforce Server starting... - Go to Download P4 CLI
- Under Family, click Linux
- Under Platform, click Linux (x64)
- Click Download
-
Copy the p4 file to the same directory where you copied the p4d file.
- Give the OS user execution permission for the p4 file:
chmod 755 p4
- Issue the p4 info command as follows, with ./ before p4 info:
./p4 info
- From the output, write down for future use value of the Server address (line 8):Copy
User name: perforce
Client name: linux-bruno
Client host: linux-bruno
Client unknown.
Current directory: /home/bruno/newinstall
Peer address: 127.0.0.1:12345
Client address: 127.0.0.1
Server address: localhost:1666
Server root: /home/bruno/newinstall
Server date: 2018/11/14 15:18:55 -0800 PST
Server uptime: 00:00:09
Server version: P4D/LINUX26X86_64/2018.2/1234567 (2018/11/02)
Server license: none
Case Handling: sensitive -
Create the first super user:
./p4 -p localhost:1666 -u super passwdEnter and confirm the password when prompted.
If no users exist on the server, P4 Server creates the user and grants that user super access.
Use the initial super user to log in to P4V.
- Download the P4 Visual Client (P4V) application that has a graphical user interface, P4V, from P4V Download. Depending on your flavor of Linux, the steps might be similar to:
- Extract p4v.tgz
- Install the application.
Invoke the executable: ./p4v
- As shown in the Connecting with P4V video, connect the client to the "remote" server by using the Server address from Step 13.
- Watch the videos on How to Create a Workspace in P4V and Version Control Basic Concepts and Basic Operations in P4V.