Wednesday 9 December 2009

Configure Symfony project on MAMP

I try to learn symfony framework and figure out, the easiest to install it on my Mac would be to use MAMP, the current MAMP version I use is 1.8.2
  1. The symfony package is already installed as I used it when practising the jobeet demo. so in order to create a new project first we want to create a new folder. As we run the symfony commands from the shell we need to open terminal. Then using the mkdir command we create a new folder for our project.
  2. We need to be within the project folder, using cd command and we run the symfony command php /usr/bin/symfony generate:project [project name] in this case I created a symbolic link from the installation of symfony to /usr/bin this is necessary only first time after the creation of the project will have a shortcut to symfony from the project folder.
  3. To create new domain for your web development project, you need to update the following files: /etc/hosts and conf/apache/httpd.conf (in your MAMP folder) .
  4. After changing the server name you need to restart the MAMP service.
The next step is configuring a repository to store data for the web application. I use mySQL that comes with the MAMP, by defaults the port is 8889 and you need to remember that when coming to configure the database in symfony. I'll talk about it including how to use Doctrine in my next post.

No comments:

Post a Comment