当前位置: 首页 > 工具软件 > Perforce > 使用案例 >

Centos7/Ubuntu安装 Perforce P4客户端

苏宾鸿
2023-12-01

1 Ubuntu

vim /etc/apt/sources.list.d/perforce.list deb http://package.perforce.com/apt/ubuntu/ xenial release
wget -qO - https://package.perforce.com/perforce.pubkey | apt-key add -
apt-get update
apt-get install -y helix-p4d

# config p4
export P4PORT=10.100.10.96:1666
export P4USER=<your user name>
export P4PASSWD=<your passwd>
p4 login
cd <your p4 dir>
p4 client
# view is :
# //51World/Projects/Unreal4.25/Content/opendrive/... //<your root name>/xodr/...
# //51World/Projects/Unreal4.25/Content/PhysXScene/... //<your root name>/physx_scene/...
# :wq
p4 sync

2 Centos7

(1) Add Perforce's packaging key to your RPM keyring:

sudo rpm --import https://package.perforce.com/perforce.pubkey

(2) Add Perforce's repository to your YUM configuration.

Create a file called /etc/yum.repos.d/perforce.repo with the following content:

[perforce]
name=Perforce
baseurl=http://package.perforce.com/yum/rhel/{version}/x86_64
enabled=1
gpgcheck=1


需要修改 {version} is either 6 for RHEL 6 or 7 for RHEL 7

(3) Install the package by running sudo yum install helix-p4d

You can also browse the repository and download an RPM file directly: https://package.perforce.com/yum/

3 p4 client template

Client: simone_enterprise_linux

Update: 2022/01/10 00:00:24

Access: 2022/01/10 00:00:44

Owner:  cis_qa

Description:
        Created by cis_qa.

Root:   /home/perforce/p4-artifactory

Options:        noallwrite noclobber nocompress unlocked nomodtime normdir

SubmitOptions:  submitunchanged

LineEnd:        local

View:
        //51World/Projects/SimOne4.25/Content/opendrive/... //simone_enterprise_linux/xodr/...
        //51World/Projects/SimOne4.25/Content/PhysXScene/... //simone_enterprise_linux/physx_scene/...

配置环境变量:

export P4USER=cis_qa
export P4PORT=10.100.10.96:1666
export P4CLIENT=unreal_enter

需要先在p4 server端先建好一个名为unreal_enter的workspace

参考文章:
Perforce官方手册

 类似资料: