If you want to participate in the Mapbender3 development or for some other reasons want to use the Git repositories from Mapbender3, follow this guide instead of the normal download. This guide is based on Ubuntu 12.04. For other distributions, you may need to adapt, especially package names like sphinx-common.
First check the System Requirements.
For the Git-based installations you also need:
Get the code from the git repository. Cloning is easy, just issue the following command in your shell:
git clone https://github.com/mapbender/mapbender-starter.git mapbender3 cd mapbender3
If you have granted secure access you can use the SSH-URL: email@example.com:mapbender/mapbender-starter
Therefore you can checkout different versions of Mapbender:
If you want to use the current version, check out the master-branch, like described above.
If you want to have a specific version, clone the repository and checkout a tag, for example 126.96.36.199:
git tag -l git checkout v188.8.131.52
If you want to checkout the current 3.0.5 code, which will lead to the next 3.0.5.x version, clone the release/3.0.5 branch directly with -b
git clone https://github.com/mapbender/mapbender-starter.git -b release/3.0.5 mapbender3
The starter application does not include the Mapbender3 bundles, these are kept in a repository of their own and are included as a submodule of the starter repository. To fetch them, issue the following command at the root directory of your cloned repository:
git submodule update --init --recursive
Mapbender3 requires additional libraries for runtime, like for example Symfony and Doctrine. Therefore Composer has to be configured and called (more information at http://getcomposer.org/download/):
cd application curl -sS https://getcomposer.org/installer | php
Create a configuration file called parameters.yml. Copy the file application/app/config/parameters.yml.dist.
cp app/config/parameters.yml.dist app/config/parameters.yml
Please read the chapter Adapting the configuration file for details about the adjustments in the parameters.yml file.
And afterwards get the runtime dependencies like Symfony and Doctrine:
You can either run composer install or composer update.
Composer install uses the composer.lock file, that we ship out in the repository, and downloads fixed versions of the several packages.
Composer update uses the composer.update file and downloads each current version-branch of the packages, as we defined it in the composer.json file.”
Now follow the steps that are described in Installation:
Notice: Please note that the git based code has an additional directory application (mapbender3/application/...).
The Symfony Console Component makes it possible to create command-line commands. Doctrine for example comes with a couple of command-line commands you can use.
Read more in the Symfony documentation about Console Commands.
Here are some commands to help to find information:
app/console - lists all assets app/console help - displays help app/console help list - displays help for a special command app/console doctrine - lists all functions from Doctrine app/console mapbender - lists all functions from mapbender app/console help assets:install - help for a special command
Learn how to generate Mapbender elements with app/console mapbender:generate:element at How to create your own Element?.
As development goes on you want to stay up-to-date with the code on github.
There are following steps you have to do to stay up-to-date
cd mapbender-starter git pull git submodule update --init --recursive cd application ./composer.phar update --dev app/console doctrine:schema:update
Sphinx is used to build the documentation you are reading right now. On Debian- based systems, you can use apt to install Sphinx:
sudo apt-get install python-sphinx
You find the Mapbender3 documentation at github at mapbender-documentation. Get the clone like this:
git clone git://github.com/mapbender/mapbender-documentation
Developers granted secure access to the code must use the SSH-URL of the repository: firstname.lastname@example.org:mapbender/mapbender-documentation
Read more about How to write Mapbender3 Documentation?.
ApiGen is our API documentation generator of choice. It can also be installed using Pear (php-pear), so use the following command:
sudo pear install pear.apigen.org/apigen
Read more about How to write Mapbender3 API Documentation?.
sudo apt-get install php-pear
We then tell Pear where to autodiscover it’s repositories and for good measure, update Pear:
sudo pear config-set auto_discover 1 sudo pear upgrade-all Enable full APC compatibility [yes] : yes Enable internal debugging in APCu [no] : yes
Then let’s get Phing:
sudo pear channel-discover pear.phing.info sudo pear install phing/phing
Check the Phing version with: