Setting up two Plastic SCM installations on the same machineA single machine can host multiple Plastic SCM installations -- that is, multiple instances of a repository server process, each with its own set of repositories. In this post, I'll address a specific case:
- You have already installed Plastic SCM on a Windows machine. Now, you want to create a second Plastic SCM installation on that machine.
- To provide a home for the second repository server process, "clone" the server subdirectory within the Plastic SCM installation directory. For example, you can use Windows Explorer to Copy the server directory, then Paste it in the same location. Rename the new "clone" to server2.
- You need to reconfigure the repository server process to listen on a different IP port (say, 8085). In the server2 directory, run the configureserver program to make this change.
- You might need to reconfigure Plastic SCM's connection to its database back-end, so that the second installation uses a different set of database files. Still in the server2 directory, see whether file db.conf exists. If so, add a <DatabaseSuffix> subelement to this XML-format file. For example:
<DbConfig> ... <DatabaseSuffix>_s2</DatabaseSuffix> ...</DbConfig>
If no db.conf file exists, the repository server is using the default database back-end, Firebird, which is embedded in the repository server and requires no configuration file.
- You need to create a new Windows service for the second instance of the repository server process. Open a command prompt window in the server2 directory, and run this command:
plasticd --installservice --servicename=PlasticServer2
Alternative: use the Windows command-line tool sc ("service control"). Be sure to enter the entire command on a single line, and to leave a SPACE after each "=" character. For example:
sc create PlasticServer2 binPath= "C:\Program Files\PlasticSCM"\server2\plasticd.exe DisplayName= "Plastic Server 2" start= auto
- Start the second repository server process:
net start PlasticServer2
- Use Plastic SCM client software to remove the "cloned" repositories from the second Plastic SCM installation. (This is necessary only if you're using Firebird embedded or SQLite and your databases are in the server's directory!!) For example, using the CLI's command for removing a repository:
cm rmrep myoldrepo@mymachine:8085