Installing Perforce on CentOS 6.7

Install CentOS minimal

Start NIC
ifup eth0

yum update
yum install nano

Stop and disable firewall (I assume you have some other firewall):
service firewall stop
chkconfig firewall off

disable selinux:
nan /etc/selinux/config
-change to ‘disabled’

Set up the Perforce repo as described here:

Install perforce server:
yum install perforce-server.x86_64

Set up a config file for an instance of perforce server that we’ll call “capnjosh1”:
cp /etc/perforce/p4dctl.conf.d/p4d.template /etc/perforce/p4dctl.conf.d/capnjosh1.conf

edit that new conf file:
replace %NAME% with “capnjosh1”
replace %ROOT% with where you want the files to be (/capnjosh1-p4root)
replace %PORT% with 1666

create the directory and make owned by the user perforce (automatically set up by the yum installation):
mkdir /capnjosh1-p4root
chown perforce:perforce /capnjosh-p4root/

Start perforce server:
service perforce-p4dctl start

Run p4 protect to set up core permissions:
p4 protect
-by default it’ll give the OS account ‘root’ full perforce access
(if you set to a different port besides 1666, you will have to set this environment variable “export P4PORT=1667”, or whatever port number you put)

If it doesn’t start, it’ll say as much… likely check your p4root folder and make sure it’s owned by the ‘perforce’ user.

Here’s what’s cool, if you want to add more perforce instances, just copy-paste that .conf file and change the name, port, and p4root path.

When you uninstall perforce, it’ll auto-rename your .conf files so they won’t get auto-loaded if you reinstall perforce again.