さくらインターネットのウェブサーバーがデフォルトでPHP5に対応してからずいぶん経った.
過去には自前でPHP5,Symfonyをインストールしたが,もっとスマートな環境を目指したい.ということで.
こちらを参考
http://ueblog.natural-wave.com/2008/06/15/sakura-symfony/
Portsをインストールしたところで、いざ、Symfony。
その前にPearからインストールしたいので、Pearをインストール。
sh-3.2# port
[Users/***] > install php5 +apache2 +mysql5 +pear
—> Fetching apr
—> Attempting to fetch apr-1.3.3.tar.bz2 from ftp://ftp.infoscience.co.jp/pub/net/apache/dist/apr
—> Verifying checksum(s) for apr
—> Extracting apr
—> Configuring apr
—> Building apr
—> Staging apr into destroot
—> Installing apr @1.3.3_1
—> Activating apr @1.3.3_1
—> Cleaning apr
—> Fetching db46
—> Attempting to fetch patch.4.6.21.1 from http://distfiles.macports.org/db4/4.6.21_5
—> Attempting to fetch patch.4.6.21.2 from http://distfiles.macports.org/db4/4.6.21_5
—> Attempting to fetch patch.4.6.21.3 from http://distfiles.macports.org/db4/4.6.21_5
—> Attempting to fetch db-4.6.21.tar.gz from http://distfiles.macports.org/db4/4.6.21_5
—> Verifying checksum(s) for db46
—> Extracting db46
—> Applying patches to db46
—> Configuring db46
—> Building db46
—> Staging db46 into destroot
—> Installing db46 @4.6.21_5
—> Activating db46 @4.6.21_5
—> Cleaning db46
—> Fetching expat
—> Attempting to fetch expat-2.0.1.tar.gz from http://nchc.dl.sourceforge.net/expat
—> Verifying checksum(s) for expat
—> Extracting expat
—> Configuring expat
—> Building expat
—> Staging expat into destroot
—> Installing expat @2.0.1_0
—> Activating expat @2.0.1_0
—> Cleaning expat
—> Fetching gperf
—> Attempting to fetch gperf-3.0.4.tar.gz from ftp://ftp.dti.ad.jp/pub/GNU/gperf
—> Attempting to fetch gperf-3.0.4.tar.gz from http://distfiles.macports.org/gperf
—> Verifying checksum(s) for gperf
—> Extracting gperf
—> Configuring gperf
—> Building gperf
—> Staging gperf into destroot
—> Installing gperf @3.0.4_0
—> Activating gperf @3.0.4_0
—> Cleaning gperf
—> Fetching libiconv
—> Attempting to fetch libiconv-1.12.tar.gz from ftp://ftp.dti.ad.jp/pub/GNU/libiconv
—> Attempting to fetch libiconv-1.12.tar.gz from http://distfiles.macports.org/libiconv
—> Verifying checksum(s) for libiconv
—> Extracting libiconv
—> Applying patches to libiconv
—> Configuring libiconv
—> Building libiconv
—> Staging libiconv into destroot
—> Installing libiconv @1.12_2
—> Activating libiconv @1.12_2
—> Cleaning libiconv
—> Fetching zlib
—> Attempting to fetch zlib-1.2.3.tar.bz2 from http://nchc.dl.sourceforge.net/libpng
—> Verifying checksum(s) for zlib
—> Extracting zlib
—> Applying patches to zlib
—> Configuring zlib
—> Building zlib
—> Staging zlib into destroot
—> Installing zlib @1.2.3_2
—> Activating zlib @1.2.3_2
—> Cleaning zlib
—> Fetching openssl
—> Attempting to fetch openssl-0.9.8k.tar.gz from http://distfiles.macports.org/openssl
—> Verifying checksum(s) for openssl
—> Extracting openssl
—> Applying patches to openssl
—> Configuring openssl
—> Building openssl
—> Staging openssl into destroot
—> Installing openssl @0.9.8k_0
—> Activating openssl @0.9.8k_0
—> Cleaning openssl
—> Fetching ncursesw
—> Attempting to fetch ncurses-5.7.tar.gz from ftp://ftp.dti.ad.jp/pub/GNU/ncurses
—> Attempting to fetch ncurses-5.7.tar.gz from http://distfiles.macports.org/ncurses
—> Verifying checksum(s) for ncursesw
—> Extracting ncursesw
—> Configuring ncursesw
—> Building ncursesw
—> Staging ncursesw into destroot
—> Installing ncursesw @5.7_0
—> Activating ncursesw @5.7_0
—> Cleaning ncursesw
—> Fetching ncurses
—> Verifying checksum(s) for ncurses
—> Extracting ncurses
—> Configuring ncurses
—> Building ncurses
—> Staging ncurses into destroot
—> Installing ncurses @5.7_0
—> Activating ncurses @5.7_0
—> Cleaning ncurses
—> Fetching readline
—> Attempting to fetch readline-6.0.tar.gz from ftp://ftp.dti.ad.jp/pub/GNU/readline
—> Attempting to fetch readline-6.0.tar.gz from http://distfiles.macports.org/readline
—> Verifying checksum(s) for readline
—> Extracting readline
—> Applying patches to readline
—> Configuring readline
—> Building readline
—> Staging readline into destroot
—> Installing readline @6.0.000_1
—> Activating readline @6.0.000_1
—> Cleaning readline
—> Fetching mysql5
—> Attempting to fetch mysql-5.0.81.tar.gz from http://mysql.he.net/Downloads/MySQL-5.0/
—> Verifying checksum(s) for mysql5
—> Extracting mysql5
—> Applying patches to mysql5
—> Configuring mysql5
—> Building mysql5
—> Staging mysql5 into destroot
—> Installing mysql5 @5.0.81_0
—> Activating mysql5 @5.0.81_0
—> Cleaning mysql5
—> Fetching sqlite3
—> Attempting to fetch sqlite-3.6.14.1.tar.gz from http://distfiles.macports.org/sqlite3/3.6.14.1
—> Verifying checksum(s) for sqlite3
—> Extracting sqlite3
—> Configuring sqlite3
—> Building sqlite3
—> Staging sqlite3 into destroot
—> Installing sqlite3 @3.6.14.1_0
—> Activating sqlite3 @3.6.14.1_0
—> Cleaning sqlite3
—> Fetching apr-util
—> Attempting to fetch apr-util-1.3.4.tar.bz2 from ftp://ftp.infoscience.co.jp/pub/net/apache/dist/apr
—> Verifying checksum(s) for apr-util
—> Extracting apr-util
—> Configuring apr-util
—> Building apr-util
—> Staging apr-util into destroot
—> Installing apr-util @1.3.4_1+mysql5
—> Activating apr-util @1.3.4_1+mysql5
—> Cleaning apr-util
—> Fetching bzip2
—> Attempting to fetch bzip2-1.0.5.tar.gz from http://distfiles.macports.org/bzip2
—> Verifying checksum(s) for bzip2
—> Extracting bzip2
—> Applying patches to bzip2
—> Configuring bzip2
—> Building bzip2
—> Staging bzip2 into destroot
—> Installing bzip2 @1.0.5_2
—> Activating bzip2 @1.0.5_2
—> Cleaning bzip2
—> Fetching pcre
—> Attempting to fetch pcre-7.9.tar.bz2 from http://nchc.dl.sourceforge.net/pcre
—> Verifying checksum(s) for pcre
—> Extracting pcre
—> Configuring pcre
—> Building pcre
—> Staging pcre into destroot
—> Installing pcre @7.9_0
—> Activating pcre @7.9_0
—> Cleaning pcre
—> Fetching apache2
—> Attempting to fetch httpd-2.2.11.tar.bz2 from ftp://ftp.infoscience.co.jp/pub/net/apache/dist/httpd
—> Verifying checksum(s) for apache2
—> Extracting apache2
—> Applying patches to apache2
—> Configuring apache2
—> Building apache2
—> Staging apache2 into destroot
—> Creating launchd control script
###########################################################
# A startup item has been generated that will aid in
# starting apache2 with launchd. It is disabled
# by default. Execute the following command to start it,
# and to cause it to launch at startup:
#
# sudo launchctl load -w /Library/LaunchDaemons/org.macports.apache2.plist
###########################################################
Warning: apache2 requests to install files outside the common directory structure!
—> Installing apache2 @2.2.11_0+darwin_9
—> Activating apache2 @2.2.11_0+darwin_9
—> Cleaning apache2
—> Fetching gettext
—> Attempting to fetch gettext-0.17.tar.gz from ftp://ftp.dti.ad.jp/pub/GNU/gettext
—> Attempting to fetch gettext-0.17.tar.gz from http://distfiles.macports.org/gettext
—> Verifying checksum(s) for gettext
—> Extracting gettext
—> Applying patches to gettext
—> Configuring gettext
—> Building gettext
—> Staging gettext into destroot
—> Installing gettext @0.17_4
—> Activating gettext @0.17_4
—> Cleaning gettext
—> Fetching gawk
—> Attempting to fetch gawk-3.1.6.tar.bz2 from ftp://ftp.dti.ad.jp/pub/GNU/gawk
—> Attempting to fetch gawk-3.1.6.tar.bz2 from http://distfiles.macports.org/gawk
—> Verifying checksum(s) for gawk
—> Extracting gawk
—> Configuring gawk
—> Building gawk
—> Staging gawk into destroot
—> Installing gawk @3.1.6_0
—> Activating gawk @3.1.6_0
—> Cleaning gawk
—> Fetching m4
—> Attempting to fetch m4-1.4.13.tar.bz2 from ftp://ftp.dti.ad.jp/pub/GNU/m4
—> Attempting to fetch m4-1.4.13.tar.bz2 from http://distfiles.macports.org/m4
—> Verifying checksum(s) for m4
—> Extracting m4
—> Applying patches to m4
—> Configuring m4
—> Building m4
—> Staging m4 into destroot
—> Installing m4 @1.4.13_0
—> Activating m4 @1.4.13_0
—> Cleaning m4
—> Fetching perl5.8
—> Attempting to fetch perl-5.8.9.tar.bz2 from http://distfiles.macports.org/perl5.8
—> Verifying checksum(s) for perl5.8
—> Extracting perl5.8
—> Applying patches to perl5.8
—> Configuring perl5.8
—> Building perl5.8
—> Staging perl5.8 into destroot
—> Installing perl5.8 @5.8.9_3
—> Activating perl5.8 @5.8.9_3
—> Cleaning perl5.8
—> Fetching perl5
—> Verifying checksum(s) for perl5
—> Extracting perl5
—> Configuring perl5
—> Building perl5
—> Staging perl5 into destroot
—> Installing perl5 @5.8.9_0
—> Activating perl5 @5.8.9_0
—> Cleaning perl5
—> Fetching autoconf213
—> Attempting to fetch autoconf-2.13.tar.gz from ftp://ftp.dti.ad.jp/pub/GNU/autoconf
—> Attempting to fetch autoconf-2.13.tar.gz from http://distfiles.macports.org/autoconf213
—> Verifying checksum(s) for autoconf213
—> Extracting autoconf213
—> Configuring autoconf213
—> Building autoconf213
—> Staging autoconf213 into destroot
—> Installing autoconf213 @2.13_1
—> Activating autoconf213 @2.13_1
—> Cleaning autoconf213
—> Fetching pkgconfig
—> Attempting to fetch pkg-config-0.23.tar.gz from http://distfiles.macports.org/pkgconfig
—> Verifying checksum(s) for pkgconfig
—> Extracting pkgconfig
—> Configuring pkgconfig
—> Building pkgconfig
—> Staging pkgconfig into destroot
—> Installing pkgconfig @0.23_1
—> Activating pkgconfig @0.23_1
—> Cleaning pkgconfig
—> Fetching curl
—> Attempting to fetch curl-7.19.5.tar.bz2 from http://distfiles.macports.org/curl
—> Verifying checksum(s) for curl
—> Extracting curl
—> Configuring curl
—> Building curl
—> Staging curl into destroot
—> Installing curl @7.19.5_0
—> Activating curl @7.19.5_0
—> Cleaning curl
—> Fetching freetype
—> Attempting to fetch freetype-2.3.9.tar.bz2 from http://nchc.dl.sourceforge.net/freetype
—> Attempting to fetch freetype-doc-2.3.9.tar.bz2 from http://nchc.dl.sourceforge.net/freetype
—> Verifying checksum(s) for freetype
—> Extracting freetype
—> Applying patches to freetype
—> Configuring freetype
—> Building freetype
—> Staging freetype into destroot
—> Installing freetype @2.3.9_0+macosx
—> Activating freetype @2.3.9_0+macosx
—> Cleaning freetype
—> Fetching gsed
—> Attempting to fetch sed-4.2.tar.gz from ftp://ftp.dti.ad.jp/pub/GNU/sed
—> Attempting to fetch sed-4.2.tar.gz from http://distfiles.macports.org/gsed
—> Verifying checksum(s) for gsed
—> Extracting gsed
—> Configuring gsed
—> Building gsed
—> Staging gsed into destroot
—> Installing gsed @4.2_0
—> Activating gsed @4.2_0
—> Cleaning gsed
—> Fetching jpeg
—> Attempting to fetch jpegsrc.v6b.tar.gz from http://distfiles.macports.org/jpeg
—> Attempting to fetch droppatch.tar.gz from http://distfiles.macports.org/jpeg
—> Verifying checksum(s) for jpeg
—> Extracting jpeg
—> Applying patches to jpeg
—> Configuring jpeg
—> Building jpeg
—> Staging jpeg into destroot
—> Installing jpeg @6b_3
—> Activating jpeg @6b_3
—> Cleaning jpeg
—> Fetching libmcrypt
—> Attempting to fetch libmcrypt-2.5.8.tar.bz2 from ftp://ftp.jp.FreeBSD.org/pub/FreeBSD/ports/distfiles/
—> Attempting to fetch libmcrypt-2.5.8.tar.bz2 from ftp://ftp.jp.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/
—> Attempting to fetch libmcrypt-2.5.8.tar.bz2 from ftp://ftp.tw.FreeBSD.org/pub/FreeBSD/ports/distfiles/
—> Attempting to fetch libmcrypt-2.5.8.tar.bz2 from ftp://ftp.tw.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/
—> Attempting to fetch libmcrypt-2.5.8.tar.bz2 from http://nchc.dl.sourceforge.net/mcrypt
—> Verifying checksum(s) for libmcrypt
—> Extracting libmcrypt
—> Configuring libmcrypt
—> Building libmcrypt
—> Staging libmcrypt into destroot
—> Installing libmcrypt @2.5.8_1
—> Activating libmcrypt @2.5.8_1
—> Cleaning libmcrypt
—> Fetching libpng
—> Attempting to fetch libpng-1.2.35.tar.bz2 from http://nchc.dl.sourceforge.net/libpng
—> Verifying checksum(s) for libpng
—> Extracting libpng
—> Configuring libpng
—> Building libpng
—> Staging libpng into destroot
—> Installing libpng @1.2.35_0
—> Activating libpng @1.2.35_0
—> Cleaning libpng
—> Fetching p5-locale-gettext
—> Attempting to fetch gettext-1.05.tar.gz from ftp://ftp.cpan.org/pub/CPAN/modules/by-module/Locale
—> Verifying checksum(s) for p5-locale-gettext
—> Extracting p5-locale-gettext
—> Applying patches to p5-locale-gettext
—> Configuring p5-locale-gettext
—> Building p5-locale-gettext
—> Staging p5-locale-gettext into destroot
—> Installing p5-locale-gettext @1.05_0
—> Activating p5-locale-gettext @1.05_0
—> Cleaning p5-locale-gettext
—> Fetching help2man
—> Attempting to fetch help2man-1.36.4.tar.gz from ftp://ftp.dti.ad.jp/pub/GNU/help2man
—> Attempting to fetch help2man-1.36.4.tar.gz from http://distfiles.macports.org/help2man
—> Verifying checksum(s) for help2man
—> Extracting help2man
—> Applying patches to help2man
—> Configuring help2man
—> Building help2man
—> Staging help2man into destroot
—> Installing help2man @1.36.4_1
—> Activating help2man @1.36.4_1
—> Cleaning help2man
—> Fetching autoconf
—> Attempting to fetch autoconf-2.63.tar.bz2 from ftp://ftp.dti.ad.jp/pub/GNU/autoconf
—> Attempting to fetch autoconf-2.63.tar.bz2 from http://distfiles.macports.org/autoconf
—> Verifying checksum(s) for autoconf
—> Extracting autoconf
—> Configuring autoconf
—> Building autoconf
—> Staging autoconf into destroot
—> Installing autoconf @2.63_0
—> Activating autoconf @2.63_0
—> Cleaning autoconf
—> Fetching automake
—> Attempting to fetch automake-1.11.tar.bz2 from ftp://ftp.dti.ad.jp/pub/GNU/automake
—> Attempting to fetch automake-1.11.tar.bz2 from http://distfiles.macports.org/automake
—> Verifying checksum(s) for automake
—> Extracting automake
—> Configuring automake
—> Building automake
—> Staging automake into destroot
—> Installing automake @1.11_0
—> Activating automake @1.11_0
—> Cleaning automake
—> Fetching libtool
—> Attempting to fetch libtool-2.2.6a.tar.gz from ftp://ftp.dti.ad.jp/pub/GNU/libtool
—> Attempting to fetch libtool-2.2.6a.tar.gz from http://distfiles.macports.org/libtool
—> Verifying checksum(s) for libtool
—> Extracting libtool
—> Configuring libtool
—> Building libtool
—> Staging libtool into destroot
—> Installing libtool @2.2.6a_0
—> Activating libtool @2.2.6a_0
—> Cleaning libtool
—> Fetching libxml2
—> Attempting to fetch libxml2-2.7.3.tar.gz from http://ftp.nara.wide.ad.jp/pub/X11/GNOME/sources/libxml2/2.7/
—> Attempting to fetch libxml2-2.7.3.tar.gz from ftp://ftp.nara.wide.ad.jp/pub/X11/GNOME/sources/libxml2/2.7/
—> Attempting to fetch libxml2-2.7.3.tar.gz from http://distfiles.macports.org/libxml2
—> Verifying checksum(s) for libxml2
—> Extracting libxml2
—> Configuring libxml2
—> Building libxml2
—> Staging libxml2 into destroot
—> Installing libxml2 @2.7.3_0
—> Activating libxml2 @2.7.3_0
—> Cleaning libxml2
—> Fetching libxslt
—> Attempting to fetch libxslt-1.1.24.tar.gz from http://distfiles.macports.org/libxslt
—> Verifying checksum(s) for libxslt
—> Extracting libxslt
—> Configuring libxslt
—> Building libxslt
—> Staging libxslt into destroot
—> Installing libxslt @1.1.24_2
—> Activating libxslt @1.1.24_2
—> Cleaning libxslt
—> Fetching mhash
—> Attempting to fetch mhash-0.9.9.9.tar.bz2 from http://nchc.dl.sourceforge.net/mhash
—> Verifying checksum(s) for mhash
—> Extracting mhash
—> Configuring mhash
—> Building mhash
—> Staging mhash into destroot
—> Installing mhash @0.9.9.9_0
—> Activating mhash @0.9.9.9_0
—> Cleaning mhash
—> Fetching tiff
—> Attempting to fetch tiff-3.8.2.tar.gz from ftp://ftp.jp.FreeBSD.org/pub/FreeBSD/ports/distfiles/
—> Verifying checksum(s) for tiff
—> Extracting tiff
—> Applying patches to tiff
—> Configuring tiff
—> Building tiff
—> Staging tiff into destroot
—> Installing tiff @3.8.2_3+macosx
—> Activating tiff @3.8.2_3+macosx
—> Cleaning tiff
—> Fetching php5
—> Attempting to fetch php-5.2.9.tar.bz2 from http://distfiles.macports.org/php5
—> Verifying checksum(s) for php5
—> Extracting php5
—> Applying patches to php5
—> Configuring php5
—> Building php5
—> Staging php5 into destroot
Warning: php5 requests to install files outside the common directory structure!
—> Installing php5 @5.2.9_2+apache2+macosx+mysql5+pear
—> Activating php5 @5.2.9_2+apache2+macosx+mysql5+pear
To customize php, copy
/opt/local/etc/php5/php.ini-dist (if this is a development server) or
/opt/local/etc/php5/php.ini-recommended (if this is a production server) to
/opt/local/etc/php5/php.ini and then make changes.If this is your first install, you need to activate PHP in your web server.
To enable PHP in Apache, run
cd /opt/local/apache2/modules
/opt/local/apache2/bin/apxs -a -e -n “php5″ libphp5.so
—> Cleaning php5
長々とコピペしたが今後の参考の為に・・・
Pearを最新に
sudo pear channel-update pear.php.net sudo pear list-upgrades sudo pear upgrade PEAR
おまじないが終わったらSymfonyのインストール.
sudo pear channel-discover pear.symfony-project.com sudo pear install symfony/symfony
…
sh-3.2# pear channel-discover pear.symfony-project.com
Adding Channel “pear.symfony-project.com” succeeded
Discovery of channel “pear.symfony-project.com” succeeded
sh-3.2# pear install symfony/symfony
downloading symfony-1.2.7.tgz …
Starting to download symfony-1.2.7.tgz (2,695,475 bytes)
…………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………….done: 2,695,475 bytes
install ok: channel://pear.symfony-project.com/symfony-1.2.7
バージョン確認
sh-3.2# symfony -V
symfony version 1.2.7 (/opt/local/lib/php/symfony)
Done.
はじめまして、こんにちは☆
今までブログなんて書かないやいと曰っていましたが、最近自分の記憶に自信がなくなり、備忘録を兼ねてブログを立ち上げました。
主にMacintoshやPHP開発が中心ですが、「こんなんやってみました」的な人柱報告もできたらしてみたいと思います。
またニッチな話題を取り扱っていきたいですね。






















































