The Ten-Minute Test Drive for Linux/UnixThis version is for Linux or Unix using the Perforce Visual Client (P4V). |
Introduction
This page tells you how to get a simple Perforce installation up and running in ten minutes. You'll set up the Perforce Server (P4D) and the Perforce Visual Client (P4V) on the same machine. Examples are shown in csh and bash—if you're in a different shell, use its syntax. You must be an experienced Linux or Unix user.
If you need more guidance setting up a demo, please visit the Technical Support page for contact options.
Unix users: Note that P4V is supported for Solaris 8, 9, &10 for SPARC as well as x86 and x86_64.
Installing Perforce
Make a directory to use for your demo installation, and set up your environment:
mkdir ~/perforce
For csh:
set path=(~/perforce $path) setenv P4PORT 1666 setenv P4RES ~/perforce/P4VResources
For bash:
export PATH=~perforce:$PATH export P4PORT=1666 export P4RES ~/perforce/P4VResources
Go to our downloads page and download the server executable (p4d), P4V (p4v.tgz),
and the Perforce Command-Line Client (P4) for your platform. Put the programs in your ~/perforce directory.
Make the server executable, then start it (root permission not required):
cd ~/perforce chmod a+x p4d ./p4d -d
Unzip and untar p4v.tgz:
tar xvzf p4v.tgz
Finally, launch P4V:
./p4v
Trying Perforce
You now have everything you need to use Perforce on your machine. The demo is limited to two users and five client workspaces, but all Perforce features are available to you. Here are some things you can try.
Getting Started
Follow these steps to get started with Perforce:
- On the P4V Open Connection dialog, click the New button next to User.
- Enter User information and select Save.
- Click the New button next to Open Workspace.
- Name your workspace
mywsand click the OK button. - Enter
~/mywsas Root and click the Save button. - Back on the Open Connection dialog, click the OK button.
Now you see P4V's main screen. Notice that there are no files in the depot or workspace yet—that's what the next step is all about.
Adding New Files to the Perforce Depot
Here's how to add files to the depot:
- Create the directory
~/mywsand put some sample files into it. - In P4V, click the Workspace tab (lower left) and press F5 to refresh the display.
- Right-click the workspace folder and choose Mark for Add.
- Click the
toolbar button
and see your pending changelist on the right. - Right-click
and
choose Submit. - Enter a description and click the Submit button.
The files you added are now in the depot.
Working on Files
The files you added are now under Perforce's control. Now you can check them out, modify them, and submit them.
- In the left pane, right-click a file and choose Check Out.
- Double-click the file to edit it. (To pick an editor, right-click the file and choose Open With...).
- In P4V, right-click the file and choose Submit.
- Enter a description and click the Submit button.
- Right-click another file and choose Rename/Move... .
- Pick a new name and location and submit your change.
You've done the basics—feel free to explore more P4V features.
Cleaning Up
After you're done, uninstall your Perforce demo so that you don't confuse it with any working Perforce installation you install later:
- Quit P4V
- Stop P4D by issuing
p4admin stop. - Delete the
~/perforceand~/mywsdirectories:rm -rf ~/perforce rm -rf ~/myws
For More Information
The Perforce commands shown in this demo are just to get you started. For more information, consult the following sources:
- The P4V product page has more details about the GUI, as does the P4V online help.
- Take a look at other Perforce components, too.
- For the big picture, see our technical documentation.
If you have questions about Perforce or comments on this demo, please email us at support@perforce.com.