Symfony を使ってみた (1)

1. まずは「Symfony」をセットアップ。


PEARでインストールする方法でした。

> pear channel-discover pear.symfony-project.com
> pear install symfony/symfony

で完了。

2. symfony開発の場所とアプリケーション作成


ディレクトリを作成し、作ったディレクトリ上で、symfonyなんちゃらと打っていきます。

> mkdir myproject
> cd myproject

> symfony init-project myproject
> symfony init-app myapp

つらつらと作成されたファイルがリスト表示されて完了。

3. つぎは、バーチャルホストの設定


symfonyのプロジェクト用にバーチャルホストを設定します。
別に設定することもないかもしれませんが。。。
調べてると頻繁に出てくるので。。。


edit httpd.conf

Listen 8080

NameVirtualHost *:8080


DocumentRoot "/myproject/web"
DirectoryIndex index.php
Alias /sf "/PHP/PEAR/data/symfony/web/sf"

AllowOverride All
Allow from All



したら Apache を再起動でOK.

4. で確認


http://localhost:8080/

Congratulations!
If you see this page, it means that the creation of your symfony project on this system was successful.

You can now create your model and customize default templates.

                                                                                                                                                              • -

2004-2005 symfony project


こう表示されればOK.