PHPフレームワークのSymfonyとCakePHPを導入してみました。
久しぶりに自宅サーバを触ってみようと思い、CakePHPとSymfonyを導入してみました。
導入といってもCakePHPは以下の場所からファイル一式をダウンロード
<URL>
Symfonyは、Sandboxバージョンとpearバージョンを両方セットアップしてみました。
詳しくは、以下の感じです。
debian:/path/to/symfony# tar -xvf sf_sandbox.tgz
sf_sandbox/
sf_sandbox/LICENSE
sf_sandbox/log/
sf_sandbox/log/.sf
sf_sandbox/web/
sf_sandbox/web/index.php
sf_sandbox/web/sf/
sf_sandbox/web/sf/calendar/
sf_sandbox/web/sf/calendar/calendar-system.css
sf_sandbox/web/sf/calendar/lang/
sf_sandbox/web/sf/calendar/lang/calendar-pt_BR.js
<中略>
sf_sandbox/data/symfony/generator/
sf_sandbox/data/symfony/generator/sfPropelAdmin/
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/skeleton/
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/skeleton/actions/
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/skeleton/actions/actions.class.php
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/skeleton/validate/
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/skeleton/validate/.sf
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/skeleton/templates/
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/skeleton/templates/.sf
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/skeleton/config/
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/skeleton/config/generator.yml
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/template/
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/template/actions/
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/template/actions/actions.class.php
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/template/templates/
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/template/templates/_list_messages.php
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/template/templates/_edit_form.php
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/template/templates/_edit_header.php
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/template/templates/_list_td_stacked.php
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/template/templates/_filters.php
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/template/templates/_list_actions.php
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/template/templates/_list_td_actions.php
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/template/templates/_edit_actions.php
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/template/templates/_edit_messages.php
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/template/templates/_list_td_tabular.php
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/template/templates/_list_th_tabular.php
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/template/templates/_list.php
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/template/templates/listSuccess.php
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/template/templates/_list_header.php
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/template/templates/_list_th_stacked.php
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/template/templates/_edit_footer.php
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/template/templates/_list_footer.php
sf_sandbox/data/symfony/generator/sfPropelAdmin/default/template/templates/editSuccess.php
sf_sandbox/data/symfony/generator/sfPropelCrud/
sf_sandbox/data/symfony/generator/sfPropelCrud/default/
sf_sandbox/data/symfony/generator/sfPropelCrud/default/skeleton/
sf_sandbox/data/symfony/generator/sfPropelCrud/default/skeleton/actions/
sf_sandbox/data/symfony/generator/sfPropelCrud/default/skeleton/actions/actions.class.php
sf_sandbox/data/symfony/generator/sfPropelCrud/default/skeleton/lib/
sf_sandbox/data/symfony/generator/sfPropelCrud/default/skeleton/lib/.sf
sf_sandbox/data/symfony/generator/sfPropelCrud/default/skeleton/validate/
sf_sandbox/data/symfony/generator/sfPropelCrud/default/skeleton/validate/.sf
sf_sandbox/data/symfony/generator/sfPropelCrud/default/skeleton/templates/
sf_sandbox/data/symfony/generator/sfPropelCrud/default/skeleton/templates/.sf
sf_sandbox/data/symfony/generator/sfPropelCrud/default/skeleton/config/
sf_sandbox/data/symfony/generator/sfPropelCrud/default/skeleton/config/generator.yml
sf_sandbox/data/symfony/generator/sfPropelCrud/default/template/
sf_sandbox/data/symfony/generator/sfPropelCrud/default/template/actions/
sf_sandbox/data/symfony/generator/sfPropelCrud/default/template/actions/actions.class.php
sf_sandbox/data/symfony/generator/sfPropelCrud/default/template/templates/
sf_sandbox/data/symfony/generator/sfPropelCrud/default/template/templates/showSuccess.php
sf_sandbox/data/symfony/generator/sfPropelCrud/default/template/templates/listSuccess.php
sf_sandbox/data/symfony/generator/sfPropelCrud/default/template/templates/editSuccess.php
sf_sandbox/data/symfony/data/
sf_sandbox/data/symfony/data/mime_types.dat
sf_sandbox/data/symfony/data/exception.php
sf_sandbox/data/symfony/data/exception.txt
sf_sandbox/data/symfony/data/SANDBOX_README
sf_sandbox/data/symfony/data/mime_types.php
sf_sandbox/data/symfony/data/error_messages.yml
sf_sandbox/data/sandbox.db
sf_sandbox/data/sql/
sf_sandbox/data/sql/.sf######################
#ここからPearを使ってのSymfonyインストール
######################debian:/path/to/symfony# pear upgrade PEAR
downloading PEAR-1.6.2.tgz …
Starting to download PEAR-1.6.2.tgz (297,794 bytes)
…………………………………………………….done: 297,794 bytes
upgrade ok: channel://pear.php.net/PEAR-1.6.2
PEAR: Optional feature webinstaller available (PEAR’s web-based installer)
PEAR: Optional feature gtkinstaller available (PEAR’s PHP-GTK-based installer)
PEAR: Optional feature gtk2installer available (PEAR’s PHP-GTK2-based installer)
PEAR: To install optional features use “pear install pear/PEAR#featurename”
debian:/path/to/symfony# pear channel-discover pear.symfony-project.com
Adding Channel “pear.symfony-project.com” succeeded
Discovery of channel “pear.symfony-project.com” succeeded
debian:/path/to/symfony# pear remote-list -c symfony
Channel symfony Available packages:
===================================
Package Version
pake??? 1.1.4
sfEzpdo -n/a-
symfony 1.0.8
debian:/path/to/symfony# pear install symfony/symfony
downloading symfony-1.0.8.tgz …
Starting to download symfony-1.0.8.tgz (1,908,095 bytes)
………………………………done: 1,908,095 bytes
install ok: channel://pear.symfony-project.com/symfony-1.0.8
debian:/path/to/symfony# pear install http://phing.info/pear/phing-current.tgz
downloading phing-current.tgz …
Starting to download phing-current.tgz (361,527 bytes)
……………………………………………………………….done: 361,527 bytes
Did not download dependencies: pear/VersionControl_SVN, pear/PhpDocumentor, pecl/Xdebug, pear/PEAR_PackageFileManager, use –alldeps or –onlyreqdeps to download automatically
pear/phing can optionally use package “pear/VersionControl_SVN” (version >= 0.3.0alpha1)
pear/phing can optionally use package “pear/PhpDocumentor” (version >= 1.3.0RC3)
pear/phing can optionally use package “pear/Xdebug” (version >= 2.0.0beta2)
pear/phing can optionally use package “pear/PEAR_PackageFileManager” (version >= 1.5.2)
install ok: channel://pear.php.net/phing-2.1.1
debian:/path/to/symfony####################
#コマンドラインツールによって直接呼び出せる全てのタスクを一見する
###################debian:/path/to/symfony# symfony -T
available pake tasks:
? clear-cache??????????????? > clear cached information
? clear-controllers????????? > clear controllers
? disable??????????????????? > disables an application in a given environment
? downgrade????????????????? > downgrade to a previous symfony release
? enable???????????????????? > enables an application in a given environment
? fix-perms????????????????? > fix directories permissions
? freeze???????????????????? > freeze symfony libraries
? init-app?????????????????? > initialize a new symfony application
? init-batch???????????????? > initialize a new symfony batch script
? init-controller??????????? > initialize a new symfony controller script
? init-module??????????????? > initialize a new symfony module
? init-project?????????????? > initialize a new symfony project
? log-purge????????????????? > purges an applications log files
? log-rotate???????????????? > rotates an applications log files
? plugin-install???????????? > install a new plugin
? plugin-list??????????????? > list installed plugins
? plugin-uninstall?????????? > uninstall a plugin
? plugin-upgrade???????????? > upgrade a plugin
? propel-build-all?????????? > generate propel model and sql and initialize database
? propel-build-all-load????? > generate propel model and sql and initialize database, and load data
? propel-build-db??????????? > create database for current model
? propel-build-model???????? > create classes for current model
? propel-build-schema??????? > create schema.xml from existing database
? propel-build-sql?????????? > create sql for current model
? propel-convert-xml-schema? > create schema.yml from schema.xml
? propel-convert-yml-schema? > create schema.xml from schema.yml
? propel-dump-data?????????? > dump data to fixtures directory
? propel-generate-crud?????? > generate a new propel CRUD module
? propel-init-admin????????? > initialize a new propel admin module
? propel-init-crud?????????? > initialize a new propel CRUD module
? propel-insert-sql????????? > insert sql for current model
? propel-load-data?????????? > load data from fixtures directory
? sync?????????????????????? > synchronise project with another machine
? test-all?????????????????? > launch all tests
? test-functional??????????? > launch functional tests for an application
? test-unit????????????????? > launch unit tests
? unfreeze?????????????????? > unfreeze symfony libraries
? upgrade??????????????????? > upgrade to a new symfony releasetask aliases:
? app??????????????????????? = pake init-app
? batch????????????????????? = pake init-batch
? cc???????????????????????? = pake clear-cache
? controller???????????????? = pake init-controller
? module???????????????????? = pake init-module
? new??????????????????????? = pake init-project
debian:/path/to/symfony##############################################
#symfony ライブラリは次の場所にインストールされています。
#
#$php_dir/symfony/????? メインライブラリ
#$data_dir/symfony/???? アプリケーションのスケルトンとデフォルトモジュールと設定
#$doc_dir/symfony/????? ドキュメント
#$test_dir/symfony/???? 単体テスト
#_dir 変数はPEARの設定の一部です。これらの変数を見たい場合は
############################################
debian:/path/to/symfony# pear config-show
Configuration (channel pear.php.net):
=====================================
Auto-discover new Channels???? auto_discover??? <not set>
Default Channel??????????????? default_channel? pear.php.net
HTTP Proxy Server Address????? http_proxy?????? <not set>
PEAR server [DEPRECATED]?????? master_server??? pear.php.net
Default Channel Mirror???????? preferred_mirror pear.php.net
Remote Configuration File????? remote_config??? <not set>
PEAR executables directory???? bin_dir????????? /usr/bin
PEAR documentation directory?? doc_dir????????? /usr/share/php/docs???***
PHP extension directory??????? ext_dir????????? /usr/lib/php5/20060613+lfs
PEAR directory???????????????? php_dir????????? /usr/share/php????***
PEAR Installer cache directory cache_dir??????? /tmp/pear/cache
PEAR data directory??????????? data_dir???????? /usr/share/php/data???***
PEAR Installer download??????? download_dir???? /tmp/pear/download
directory
PHP CLI/CGI binary???????????? php_bin????????? /usr/bin/php
php.ini location?????????????? php_ini????????? <not set>
PEAR Installer temp directory? temp_dir???????? /tmp/pear/temp
PEAR test directory??????????? test_dir???????? /usr/share/php/tests??***
Cache TimeToLive?????????????? cache_ttl??????? 3600
Preferred Package State??????? preferred_state? stable
Unix file mask???????????????? umask??????????? 22
Debug Log Level??????????????? verbose????????? 1
PEAR password (for???????????? password???????? <not set>
maintainers)
Signature Handling Program???? sig_bin????????? /usr/bin/gpg
Signature Key Directory??????? sig_keydir?????? /usr/etc/pearkeys
Signature Key Id?????????????? sig_keyid??????? <not set>
Package Signature Type???????? sig_type???????? gpg
PEAR username (for???????????? username???????? <not set>
maintainers)
User Configuration File??????? Filename???????? /root/.pearrc
System Configuration File????? Filename???????? /usr/etc/pear.conf
こんな感じです