Start up the shared server

  1. 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 macOS

    mkdir /Users/bruno/server

    On Windows

    mkdir C:\Users\bruno\server
  2. Start up the shared server.

    Start up the shared server, using the -r dir option to specify the directory created in the previous step and the -p port option 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 macOS

    p4d -r /Users/bruno/server -p localhost:1666

    On Windows

    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.