review askeet Day 1

symfonyインストールは終了しているので省略。プロジェクトのセットアップから行います。

フォルダの作成

今回は/Users/shota/education/enomoto/askeet2/に作ります。

apacheの設定

順番は逆ですが、ブラウザ上でも確認しながらやりたいのでApacheの設定から始めます。
場所: /opt/local/apache2/conf/httpd.conf

NameVirtualHost 127.0.0.1

<VirtualHost 127.0.0.1>
  ServerName askeet.localhost
  DocumentRoot "/Users/shota/education/askeet/web"
  DirectoryIndex index.php
  Alias /sf /opt/local/lib/php/data/symfony/web/sf
  
  <Directory "/Users/shota/education/askeet/web">
    AllowOverride All
    Allow From All
  </Directory>
  <Directory "/opt/local/lib/php/data/symfony/web/sf">
    AllowOverride All
    Allow From All
  </Directory>
</VirtualHost>

<VirtualHost 127.0.0.1>
  ServerName review.askeet.localhost
  DocumentRoot "/Users/shota/education/enomoto/askeet2/web"
  DirectoryIndex index.php
  Alias /sf /opt/local/lib/php/data/symfony/web/sf

  <Directory "/Users/shota/education/enomoto/askeet2/web">
    AllowOverride All
    Allow From All
  </Directory>
  <Directory "/opt/local/lib/php/data/symfony/web/sf">
    AllowOverride All
    Allow From All
  </Directory>
</VirtualHost>
/etc/hostsの書換

忘れていたので早速修正。

127.0.0.1	askeet.localhost
127.0.0.1	review.askeet.localhost
ブラウザで確認。


よし、問題なく設定ができたぞ。

プロジェクトの作成

問題なくApacheの設定ができたみたいなのでsymfonyのプロジェクトの作成をする

symfony init-project askeet

これで基本となるものが入るわけですね。

.htaccessのせいか、表示が変わったぞ。
index.phpがないよという404メッセージになった。

フロントエンドアプリケーションを入れる。

index.phpがないなら入れればいい。
ということでfrontendを入れることに。

symfony init-app frontend


よし、できた。
ついでにfrontend_dev.php(開発環境)も確認。

これも、問題なし。

subversion(svn)の設定

まずはcacheとlogの中身を空にします。
rm -rf cache/*
rm -rf log/*
作業フォルダaskeet2をaddします。
svn add askeet2
次に、cacheとlogはsvnのコミット対象外にします。
svn propedit svn:ignore cache --editor-cmd emacs
svn propedit svn:ignore log --editor-cmd emacs
cacheとlogのフォルダのパーミッションを777にする。
chmod 777 log
chmod 777 cache

全部終わったら1日目終了

コミットします。

svn up // まずは最新にして
svn st // 対象を確認
svn ci -m "[review askeet Day 1] 終了" // ""内はコメント