Perforce 2004.2 User's Guide | ||
<< Previous Chapter Reporting and Data Mining |
Table of Contents Index Perforce on the Web |
Next Chapter >> Environment Variables |
This appendix is mainly intended for people installing an evaluation copy of Perforce for trial use; if you're installing Perforce for production use, or are planning on extensive testing of your evaluation server, we strongly encourage you to read the detailed information in the Perforce System Administrator's Guide.
The server and client executables are available from the Downloads page on the Perforce web site:
Go to the web page, select the files for your platform, and save the files to disk.
To limit access to the Perforce server 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 server.
To specify a server root, set the environment variable P4ROOT to point to the server root, or use the -r root_dir flag when invoking p4d. Perforce client programs never use the P4ROOT directory or environment variable; the p4d server is the only process that uses the P4ROOT variable.
A Perforce server requires no privileged access; there is no need to run p4d as root or any other privileged user. See the System Administrator's Guide for details.
The server root can be located anywhere, but the account that runs p4d must have read, write, and execute permissions on the server root and all directories beneath it. For security purposes, set the umask(1) file creation-mode mask of the account that runs p4d to a value that denies other users access to the server root directory.
If p4d is to listen on a different port, specify that port with the -p port_num flag when starting p4d (as in, p4d -p 1818), or set the port with the P4PORT environment or registry variable before starting p4d.
Unlike P4ROOT, the environment variable P4PORT is used by both the Perforce server and Perforce client programs, and must be set on both Perforce server machines and Perforce client workstations.
p4d &
Although the example shown is sufficient to run p4d, other flags that control such things as error logging, checkpointing, and journaling, can be provided. These flags (and others) are discussed in the Perforce System Administrator's Guide.
p4 admin stop
to gracefully shut down the Perforce server. Only a Perforce superuser can use p4 admin stop.
If you are running a release of Perforce from prior to 99.2, you must find the process ID of the p4d server and kill the process manually from the UNIX shell. Use kill -15 (SIGTERM) instead of kill -9 (SIGKILL), as p4d might leave the database in an inconsistent state if p4d is in the middle of updating a file when a SIGKILL signal is received.
The Perforce installer allows you to:
On UNIX systems, there is only one Perforce "server" program (p4d) responsible for this back-end task. On Windows, however, the back-end program can be started either as a Windows service (p4s.exe) process that runs at boot time, or as a server (p4d.exe) process that must be invoked from a command prompt.
The Perforce service (p4s.exe) and the Perforce server (p4d.exe) executables are copies of each other; they are identical apart from their filenames. When run, the executables use the first three characters of the name with which they were invoked (either p4s or p4d) to determine their behavior. (For example, invoking copies of p4d.exe named p4smyservice.exe or p4dmyserver.exe invoke a service and a server, respectively.)
In most cases, it is preferable to install Perforce as a service, not a server. For a more detailed discussion of the distinction between services and servers, see the Perforce System Administrator's Guide.
If you install Perforce as a server under Windows, invoke p4d.exe from a command prompt. The flags for p4d under Windows are the same as those used under UNIX.
To stop a Perforce service (or server) at Release 99.2 or above, use the command:
p4 admin stop
Only a Perforce superuser can use p4 admin stop.
For older revisions of Perforce, shut down services manually by using the Services applet in the Control Panel. Shut down servers running in command prompt windows by typing CTRL-C in the window or by clicking on the icon to Close the command prompt window.
Although these manual shutdown options work with Release 99.2 and earlier versions of Perforce, they are not necessarily "clean", in the sense that the server or service is shut down abruptly. With the availability of the p4 admin stop command in 99.2, the manual shutdown options are obsolete.
Perforce 2004.2 User's Guide | ||
<< Previous Chapter Reporting and Data Mining |
Table of Contents Index Perforce on the Web |
Next Chapter >> Environment Variables |