去perforce 网站 http://www.perforce.com/downloads/Perforce/Customer 下载,或者直接在linux终端用wget 下载,加上执行权限,并放到/usr/local/bin下。

$ wget http://filehost.perforce.com/perforce/r14.1/bin.linux26x86/p4
$ chmod u+x p4
$ sudo cp p4 /usr/local/bin/

编辑 ~/.bashrc 文件加入下面一些变量
export P4USER=jschen
export P4PORT=192.1.1.1:1666
export P4EDITOR=vim
export P4IGNORE=p4ignore
export P4CLIENT=jschen-fedora

登录perforce服务器,设置workspace
[[email protected]:~]$ p4 login
Enter password:
User jschen logged in.
[[email protected]:~]$ p4 client

更改 Root 和View选项
Client: jschen-fedora
Root: /back/code/
View:
//my_project/… //jschen-fedora/my_project/…