Start up the shared server
Make a subdirectory in which to start up the server and client.
When started, the server creates a large number of database files; it’s best not to clutter your working directory with these files, so we will start up the server and client in a designated directory.
On Unix and OS X
$ mkdir /Users/bruno/server
$ mkdir C:\Users\bruno\server
Start up the shared server.
Start up the shared server, using the
-r diroption to specify the directory created in the previous step and the
-p portoption to set the hostname:port number to
localhost:1666, the required setting for running the shared server and the client on same computer.
On UNIX and OS X
$ p4d -r /Users/bruno/server -p localhost:1666
$ p4d -r C:\Users\bruno\server -p localhost:1666
This produces the following output:
Perforce db files in 'server' will be created if missing... Perforce Server starting...
Because the shared server runs in the foreground, you must open a new terminal window in which to run subsequent commands.