Perforce – Centos start investigation and install

The Perforce service and applications are available from the Downloads page on the Perforce web site: http://www.perforce.com/downloads/complete_list

THIS is not a JOKE!

dovakin_p4.jpg

Installation:

Do not worked for me:

Official

From here: http://www.perforce.com/perforce/doc.current/manuals/p4sag/chapter.install.html#install.unix

Although you can install p4 and p4d in any directory, on UNIX, the Perforce applications typically reside in /usr/local/bin, and the Perforce service is usually located either in /usr/local/bin or in its own server root directory. You can install Perforce applications on any machine that has TCP/IP access to the p4d host.

To limit access to the Perforce service’s files, ensure that the p4d executable is owned and run by a Perforce user account that has been created for the purpose of running the Perforce service.

To start using Perforce:

  1. Download the p4 and p4d applications for your platform from the Perforce web site.
  2. Make the downloaded p4 and p4d files executable.
  3. Create a server root directory to hold the Perforce database and versioned files.
  4. Tell the Perforce service what port to listen to by specifying a TCP/IP port to p4d.
  5. Start the Perforce service (p4d).
  6. Set the p4d port and address for Perforce applications by setting the P4PORT environment variable.

Then move file to recommended dir:

bug_p4.jpg

Also do not work:

Perforce visual

From here: http://www.perforce.com/documentation/tenminute-test-drive-linuxunix

Make a directory to use for your demo installation, and set up your environment:

(I have made /usr/perforce)

For bash:

Go to our Downloads page and download the Perforce Server executable (p4d), P4V (p4v.tgz), and the Perforce Command-Line Client (P4) for your platform. Put the programs in your /perforce directory.

Make the server executable, then start it (root permission not required):

Unzip and untar p4v.tgz:

Finally, launch P4V:

dog_p4.jpg

Procedures above looks not complex, I cannot run P4 by them.

Will try another:

Third way

From: https://ssteiner.wordpress.com/2008/04/23/installing-perforce-on-red-hat-linux-the-gory-details/

Also can help: http://sudomakeinstall.com/linux-systems/perforce-p4d-init-d-script-centos

1. Download the ‘daemon’ utility. This utility allows ‘p4d’ to be run by the ‘perforce’ user instead of ‘root’. I use /usr/local/src for the source of anything I install on the server so here’s what I did. If you’re not logged in as root, put a ‘sudo’ ahead of each of the commands below or ‘su’ in first.

2. Download the PerForce daemon file ‘p4d’ and client ‘p4’ files directly into /usr/local/bin. These files are for Linux installs using the 2.6 kernel version, adjust if you’re still running a 2.4.x kernel:

3. Make the ‘p4d’ and ‘p4’ files executable.

4. Create a group for perforce files and a user for admin work:
(I really do not now why is this important because I want to run it as is – root)
<ignoring>

5. Use ‘visudo’ to give the perforce user account the ability to use ‘sudo’. Add the following line at the end o f the file. NOTE: visudo on Red Hat doesn’t actually use ‘vi’ to do the work, it uses pico so don’t expect ‘vi’ commands to work. Stupid Red Hat. Stupid pico.

6. Log off your default user account.
7. Log in using the ‘perforce’ account.
8. Create a directory to hold the repository. I based mine in /var/www.

<ignoring>

9. Create a directory to hold Perforce log files under /var/log.

A. Add the following lines to the end of /etc/profile. These settings will be used by local client programs run on the Linux server – not by the Perforce server.

B. Load the Perforce settings.

Does not work now:

Setup Perforce As Bootup Service

1. Change to the initialization control directory.

cd /etc/init.d

2. Create the Perforce control script using ‘sudo vi perforce’.

3. Goto your home directory then use the control script to start the Perforce server.

4. Make sure it actually started

I get:

14. Create a Perforce group to limit resource usage using:

sudo p4 group developers

This, on Red Hat, opens ‘pico’ where you’re editing a text file to set the following values. See the Perforce site for more information.

To which perforce responds:

5. Use the control script to restart the Perforce server.

Another way don’t work:

This guide can help partually

From: http://www.donaldsimpson.co.uk/2011/10/25/setting-up-perforce-on-a-linux-server-and-a-windows-client/

Set root_dir

Try run: (without nohup )

 

Nope, did not work:

Reboot and check everything, and still can’t start:

 

 

 

 

fu_p4.jpg

Doesn’t work:

FINALLY

It’s worked:

p4_works_centos.PNGProbably there is no output after ./p4d runs, but server is up and listen

 

Useful commands:

p4 info   — This should show if you can access the perforce server at all
p4 counters — This should give you a list of all counters
p4 counter change — This should give you the value of the change list counter, which is probably also requested by the hudson server.

trianglesis

About trianglesis

Александр Брюндтзвельт - гений, филантроп, 100 гривен в кармане. Этот блог - "сток" моих мыслей и заметок. Достаточно одного взгляда на него, чтобы понять, что такой же бардак творится у меня в голове. Если вам этот бардак интересен - милости прошу.
Bookmark the permalink.