Shortcuts to configuring the server

You can also configure an edge or commit server using the -c option to the p4 server command. When you specify this option, the DistributedConfig field of the server spec is mostly filled in for the commands that need to be run to configure the server. The workflow is as follows:

  1. Open a server spec using syntax like the following

    $ p4 server [-c edge-server|commit-server] serverId

    For example,

    $ p4 server -c edge-server mynewedge
  2. Complete the DistributedConfig field by specifying the settings you want to configure the server. When invoked with the -c option, the field looks like the code shown below.

    Specified values are set appropriately for the type of server you specified in the p4 server command. Values marked <unset> must be set. Values marked #optional can be set if desired.

    db.replication=readonly
    lbr.replication=readonly
    lbr.autocompress=1
    rpl.compress=4
    startup.1=pull -i 1
    startup.2=pull -u -i 1
    startup.3=pull -u -i 1
    P4TARGET=<unset>
    serviceUser=<unset>
    monitor=1 # optional
    journalPrefix=<unset> # optional
    P4TICKETS=<unset> #optional
    P4LOG=<unset> # optional
  3. After you have saved changes, you can execute a command like the following to see the settings for the DistributedConfig field:

    $ p4 server -o mynewedge
    DistributedConfig:
        db.replication=readonly
        lbr.replication=readonly
        startup.1=pull -i 1
        startup.2=pull -u -i 1
        startup.3=pull -u -i 1
        P4TARGET=localhost:20161
        serviceUser=service