This bash script will setup Perforce a good 90% of the way. Running all the commands you need to run it. Making it nice and easy to get setup and working.
I had a few clients who wanted it setup and it was the same commands over and over again, so a quick bash script and now its easier than ever.
-
Ubuntu based only - I tried to get it working on Debian what I normally use but either packages weren't available or they were out of date. Without a lot of messing around updating sources its just easier to use Ubuntu for now.
-
Randomly sometimes the script will just stop running. No idea why. You can try to view the last thing it ran then re-run from there. If you can let me know WHICH bit it stopped on, I can try to fix.
Video: https://youtu.be/P8DKbF6aQfk
- Clone the repo / download the
perforce_server_setup.sh
git clone https://github.com/d3kryption/ubuntu_perforce_server_setup- Move the bash file onto your server and run it as sudo.
sudo ./perforce_server_setup.sh- Some steps will pause execution and wait for you to enter some details to continue.
NOTE: The newest version of the script automates the Typemap part!
In version 2024.1, a fatal bug causes P4 to stop working when you UPDATE / UPGRADE. It can be resolved with the below steps.
-
Modify the file
nano /etc/perforce/p4dctl.conf.d/master.conf -
You need to add the lines above P4ROOT:
P4PORT = SSL:YOUR IP ADDRESS:1666P4LOG = /var/log/perforce/p4errP4SSLDIR = /mnt/YOUR STORAGE LOCATION/root/ssl -
Press CTRL+X to exit, Y to save, and then enter
-
Now upgrade the Perforce DB
sudo -u perforce /opt/perforce/sbin/p4d -r YOUR PERFORCE LOCATION/master/root -xue.g.sudo -u perforce /opt/perforce/sbin/p4d -r /mnt/MyDrive/Perforce/master/root -xu -
Now reboot the Perforce service:
systemctl start helix-p4dctl.serviceand then Perforce:p4 admin restart