Currently it is possible to install Doctrine four different ways that are listed below:
It is recommended to download Doctrine via SVN (subversion), because in this case updating is easy. If your project is already under version control with SVN, you should choose SVN externals.
If you wish to just try out Doctrine in under 5 minutes, the sandbox package is recommended. We will discuss the sandbox package in the next section.
Doctrine also provides a special package which is a zero configuration Doctrine implementation for you to test Doctrine without writing one line of code. You can download it from the download page.
The sandbox implementation is not a recommend implementation for a production application. It's only purpose is for exploring Doctrine and running small tests.
It is highly recommended that you use Doctrine via SVN and the externals option. This option is the best as you will receive the latest bug fixes from SVN to ensure the best experience using Doctrine.
To install Doctrine via SVN is very easy. You can download any version of Doctrine from the SVN server: http://svn.doctrine-project.org
To check out a specific version you can use the following command from your terminal:
svn co http://svn.doctrine-project.org/branches/1.2 .
If you do not have a SVN client, chose one from the list below. Find the Checkout option and enter http://svn.doctrine-project.org/branches/1.2 in the path or repository url parameter. There is no need for a username or password to check out Doctrine.
Updating Doctrine with SVN is just as easy as installing. Simply execute the following command from your terminal:
$ svn update
If your project is already under version control with SVN, then it is recommended that you use SVN externals to install Doctrine.
You can start by navigating to your checked out project in your terminal:
$ cd /var/www/my_project
Now that you are under your checked out project, you can execute the following command from your terminal and setup Doctrine as an SVN external:
$ svn propedit svn:externals lib/vendor
The above command will open your editor and you need to place the following text inside and save:
doctrine http://svn.doctrine-project.org/branches/1.2/lib
Now you can install Doctrine by doing an svn update:
$ svn update
It will download and install Doctrine at the following path: /var/www/my_project/lib/vendor/doctrine
Don't forget to commit your change to the SVN externals.
$ svn commit
Doctrine also provides a PEAR server for installing and updating Doctrine on your servers. You can easily install Doctrine with the following command:
$ pear install pear.doctrine-project.org/Doctrine-1.2.x
Replace the above 1.2.x with the version you wish to install. For example "1.2.1".
If you do not wish to install via PEAR or do not have PEAR installed, you can always just manually download the package from the website. Once you download the package to your server you can extract it using the following command under linux.
$ tar xzf Doctrine-1.2.1.tgz