#+Title: Basic Perforce Server Setup for Indie Developers
Perforce has long been a popular SCM system among game
developers. Since Perforce is free for up to 20 users
(http://www.perforce.com/downloads/p4d), it became a popular
choice among indie game developers too.
When you work alone or in a small team time suddenly became a
scarce commodity. So how do you setup Perforce quickly and start
developing? Here is a quick recipe to get you started.
* Assembla
To kick start a project with minimal fuss, you cannot go wrong
with a hosted solution.
Perforce partnered with Assembla to provide free to
enterprise-grade Perforce service in the cloud:
https://www.assembla.com/repositories/perforce?ref=PerforceWebsite-cloud
Read on if you prefer to host your Perforce service within your
premises for maximum flexibility.
* WINDOWS
For Windows developers there is no reason not to take advantage
of our Windows installer available. Simply download it from our
website (http://www.perforce.com/downloads/p4d) and you will be
up and running in no time.
* Linux and other UNIX-like platforms
For other platforms there are a lot more options available but
here is a how one could get started quickly:
* Create a dedicated, regular user on your machine to run the
Perforce server (Perforce does not require root to
function). For this example let's name this user as
"perforce".
* Download the Perforce server (P4D) and the command-line client
(P4) from our website:
http://www.perforce.com/downloads/p4d
http://www.perforce.com/downloads/p4
* Made both binaries world executable:
chmod +x p4d p4
* Install "p4" to /usr/local/bin and "p4d" to the Perforce root
directory. For this example we'll use /p4.
(Avoid putting P4D in your shell search path to avoid running
it accidentally or running the wrong P4D version if you have
multiple versions installed.)
* Configure P4D to start on system boot. This can be done with a
init script or via the user crontab. For example, login as
user "perforce" and run the following:
echo '@reboot /p4/p4d -r /p4 -p 1666 -d -L /p4/log'|crontab -
(There is a "-" sign at the end.)
Note that you should shutdown Perforce before system shutdown
to avoid any database inconsistency.
If you ever wondered why Perforce does not have a "p4 admin
start" command, we have an answer:
http://answers.perforce.com/articles/KB_Article/Why-Is-There-No-p4-admin-start-Command/
* Installing a Perforce Client
To submit files to the Perforce service, download one of the many
clients available from our website. P4V is a fine graphical
client for new users:
http://www.perforce.com/downloads/p4v
If you use an integrated development environment, be sure to
check and see if there is a Perforce integration available:
http://www.perforce.com/product/components/perforce-clients-tools
http://www.perforce.com/product/components/third-party-integrations#ide-integrations
* Backup
A good installation should also include a regular backup and this
involves creating a checkpoint of the metadata database and a
backup of the checkpoint plus the associated archive files.
For more information, please see:
http://www.perforce.com/perforce/doc.current/manuals/p4sag/chapter.backup.html#DB5-74301
* Further Information and Support
New to Perforce? Do checkout our resources page from our website:
http://www.perforce.com/resources
Have a specific question? Our knowledge base is just a search away:
http://answers.perforce.com/
Join our community for community support, news and more:
http://www.perforce.com/community
For product support, please contact support@perforce.com.