Step 1) Find where perforce is installed on the unix box.
Say this folder: /home/pvprapp1/opt/perforce
Step 2) Export the environment variable.
Issue command: export PATH=$PATH:$HOME/opt/perforce/bin
Issue command: export P4PORT=...net:1999
you can also export variables like
P4USER, P4PASSWD.
But some perforce are ticket based login strategy. "Ticket based" means, as soon as you issue "p4 login", you will get a ticket, and until the ticket expired or you issue "p4 logout", you are out.
Step 3) At this time, you can issue p4 command, and see a help menu.
Issue command: p4
Step 4) Config the client setup.
Issue command: p4 client
Step 5) The above command will bring you to a vi editor. There, you can edit all the configurations.
Client: <workspace name> --- This is the P4CLIENT value
Root: <workspace location>
View: <which branch on perforce server is mapped to where>
Issue command: export P4CLIENT= <your P4CLIENT value>
In your later uage, you need to put your 3 EXPORT(PATH, P4PORT, P4CLIENT) into your .bashrc in your ~ folder.
Step 6) Synchronize with Perforce to get all the source code
Issue command: p4 sync