Installation

Install a new project with a command line interface

Install symfony

First, you should make sure that your server matches the requirements.

Then you will need to download symfony 1.4 & install it.

Note about symfony version
Diem runs on both symfony 1.3 & symfony 1.4.
The 1.4 version is an LTS version and will be supported for 3 years.

Extract Diem

Diem must NOT be unpacked into the project plugins directory.

Instead, you should extract the freshly downloaded Diem version somewhere on your disk, like for symfony.

The best practice is to put both symfony & Diem outside the project directory, so they can be reused by several projects.
Alternatively, symfony and Diem can go to the lib/vendor project directory.

Valid installation example
Installation folders

Create the project

A Diem project is a symfony project, so we will use the symfony installer.

Let's assume that you have extracted symfony into /path/to/symfony and Diem into /path/to/diem.

We can now create the project directory:

$ mkdir myProject  
$ cd myProject  

and launch the symfony command line installer. Don't forget to replace /path/to/symfony and /path/to/diem.

$ php /path/to/symfony/data/bin/symfony generate:project --installer=/path/to/diem/dmCorePlugin/config/installer.php myProject  

Configure the project

Server check

The installer will check that your server matches the requirements.
Please note that the PHP CLI can use a different php.ini file than the one used with your web server.
You will be able to run the server check from your browser, after the installation is complete : http://mysite.com/dm_check.php

Configuration questions

You will be given the possibility to configure the project through some simple questions.

Main language

The language is a two chars identifier like "en", "fr", "es".
If your project uses more than one language, enter the first, most important one. Defaults to "en".

Web directory name

This is the name of the public directory exposed via the web interface.
Each server has its own configuration. It is generally web, html or even public_html.

Database host

The hostname of the database. It's generally localhost.

Database name

By default, the project name will be used. Note that the database name can not contain a "-".

Database password

The password to read and write the database. It will be used as the default website admin password.

Setup the project

When the installer has completed, you will need to setup the project :

$ php symfony dm:setup  

This task does several things :

  • Build the models, forms and filters
  • Load some basic data such as home page, users, permissions and translations
  • Create symlinks in your web dir
  • Create administration modules
  • Clear the cache

You will use the dm:setup task each time your model configuration has changed. It can be run several times without side effects.

Login to administration

Your project is now ready for web access.

Two applications have been created:

  • front is the public interface of your website
  • admin is the secured backoffice

You can login right now to the admin application with the url
http://www.myproject.com.localhost/admin_dev.php

Your login is "admin" and your password is the database password you chose during installation.

Configure the web server
symfony provides help on how to configure your web server
The "secure way" is highly recommended even in dev environments.

If you experience problems during installation, please report them to the Diem google group

What's next ?

You may want to start the tutorial to build a first website.

Questions and Feedback

If you need support or have a technical question, you can

  • Post to the google group
  • Come and chat on the #diem IRC channel on freenode