You are currently reading the 1.2 documentation. Switch to 2.2  2.1  2.0 

Installing

Currently it is possible to install Doctrine four different ways that are listed below:

  • SVN (subversion)
  • SVN externals
  • PEAR Installer
  • Download PEAR Package

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.

Sandbox

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.

SVN

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.

Installing

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

Updating Doctrine with SVN is just as easy as installing. Simply execute the following command from your terminal:

$ svn update

SVN Externals

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

PEAR Installer

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".

Download Pear Package

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

Questions and Feedback

If you find a problem with the documentation or have a suggestion, please register and open a ticket.

If you need support or have a technical question, you can post to the user mailing-list.