configuring p4 on red hat enterprise linux

0

It's time to get rid of this simple but yet not easily explained topic. And whatever I got on internet, in one or other way, failed to sync my WINDOWS depot to RHEL client. Following is the stuff I have done:

  1. Downloaded p4 for RHEL and stored it in /usr/local/bin
  2. Edited /bashrc and made entries for P4USER=ABC, P4PORT
  3. When I run the command p4 client it gives me error that user ABC doesn't exists

I wanted to know which Environment variables to be set. and why perforce guys messed it up with too much information? There must be an easy way for command line installation of p4 for RHEL. Thanks in advance.

Dhiraj

Posted 2014-04-09T11:32:22.757

Reputation: 1

Did you create the user ABC? – Nattgew – 2014-04-09T15:44:21.217

yes and I have saved environment variable also as shown above – Dhiraj – 2014-04-09T17:03:00.100

Did you do it with something like p4 user -f ABC? – Nattgew – 2014-04-09T17:17:12.120

hey I done that – Dhiraj – 2014-04-10T06:23:19.437

guys I got the solution. I will post it by the evening. – Dhiraj – 2014-04-14T06:06:11.183

Answers

0

Here are some steps which I followed
NOTE: I was logged in as normal user and not the root and it is recommended that you should not use root user for such task:

  1. Read the link carefully (it does help at the very end when I figure out the answer in my way) http://www.perforce.com/perforce/doc.current/manuals/p4guide/chapter.install.html There is a download link from where you can download appropriate version of p4 for your Linux. Make sure you put this downloaded p4-binary in system path like /usr/bin// or /usr/sbin/ etc. Make this binary executable by using chmod command.
  2. Run the command p4 it will then ask for p4 trust.Then run p4 trust and type yes to continue.
  3. On command line firstly edit the ~/.bashrc file and export the P4PORT and P4USER environment variables needed by p4.(You can find some other environment variables in above link but these two are mandatory).
  4. Check if entries done perfectly by running p4 set. If everything is fine then run the command p4 login -p, it will ask you to enter password for perforce and return a token as feedback. Just copy the token and make another export entry for P4TOKEN environment variable in ~/.bashrc.
  5. Run the command p4 client and edit the view as per requirement(as per depot access). (Escape + Shift+ ; + wq to save the changes).
  6. Run p4 sync and all files will be synced lovaly.

If any problem occurred comment here. Regards,

Dhiraj

Posted 2014-04-09T11:32:22.757

Reputation: 1