« Previous -
Version 25/26
(diff) -
Next » -
Current version
Adrien Gallou, 05/19/2012 01:54 am
PrepareDevWorkstation¶
Some requirements¶
- php
- apache-mod_php
- php-cli
- php-pdo_mysql
- mysql
- wget
Clone the repository¶
If you don't have commit rights on the project (ie we never added you SSH key), you can have a read-only clone :
git clone git://gitorious.org/mageia-app-db/mageia-app-db.git
Else :
git clone git@gitorious.org:mageia-app-db/mageia-app-db.git
Check configuration¶
curl https://raw.github.com/vjousse/symfony-1.3---1.4/master/data/bin/check_configuration.php | php
Install missing requirements if needed. A php accelerator is not required but not forbidden either.
Database¶
Create a new empty MySQL database.
init submodules/fill database¶
Our repository has submodules so git requires us to initialize them.
cd mageia-app-db sh init
On the first run of init you will be prompted for connection information for your database.
Set up permissions in project root¶
mkdir cache ./symfony project:permissions
Remember that the apache (or www-data) user (=apache on mageia/mandriva) must have read access to the directory where you cloned the project.
Madb configuration file¶
The init task copies the default configuration to config/madbconfg.yml.
For development, default values should be ok, but feel free to change the configuration to fit your needs.
Test data¶
If you want to insert test data, just add --insert-test-data to the init task :
./symfony madb:init --insert-test-data
It will download test data for mageia then insert them in your database.
Apache configuration¶
Set a virtualhost or alias.
Basic example :
NameVirtualHost *
<VirtualHost *>
ServerName mageia-app-db.localhost
ServerAlias mageia-app-db.adrien-lap.zone-ttp.com
ServerAdmin webmaster@localhost
DocumentRoot /home/ttp/mageia-app-db/web
Alias /sf /home/ttp/mageia-app-db/lib/vendor/symfony/data/web/sf
DirectoryIndex index.php
<Directory "/home/ttp/mageia-app-db/web">
AllowOverride All
Allow from All
</Directory>
<Directory "/home/ttp/mageia-app-db/lib/vendor/symfony/data/web/sf">
AllowOverride all
Allow from all
</Directory>
</VirtualHost>
with this setup, you can access madb at http://localhost/
for better vhost setup, see : http://www.symfony-project.org/getting-started/1_4/en/05-Web-Server-Configuration