<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>SystemGathering</title>
    <link rel="alternate" type="text/html" href="http://www.sysgathe.com/" />
    <link rel="self" type="application/atom+xml" href="http://www.sysgathe.com/atom.xml" />
    <id>tag:www.sysgathe.com,2008-12-28://1</id>
    <updated>2010-11-14T04:24:02Z</updated>
    <subtitle>せっかく調べたちょっとしたこと、忘れてしまわないための備忘録。</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.23-ja</generator>

<entry>
    <title>mac の開発環境構築 〜Apache ユーザーディレクトリ〜</title>
    <link rel="alternate" type="text/html" href="http://www.sysgathe.com/2010/11/mac-apache-1.html" />
    <id>tag:www.sysgathe.com,2010://1.92</id>

    <published>2010-11-14T04:18:47Z</published>
    <updated>2010-11-14T04:24:02Z</updated>

    <summary> 前回、Apacheをインストールしたときにユーザーディレク...</summary>
    <author>
        <name>dugong</name>
        <uri>http://www.sysgathe.com</uri>
    </author>
    
    
    <content type="html" xml:lang="ja" xml:base="http://www.sysgathe.com/">
        <![CDATA[ <p>前回、Apacheをインストールしたときにユーザーディレクトリを有効にしました。</p>
<p><a href="http://www.sysgathe.com/2010/10/mac-apache.html">mac の開発環境構築 〜Apache〜</a></p>
<p>今回はユーザーディレクトリ内の設定をします。</p>
<p>設定ファイル：/opt/local/apache2/conf/extra/httpd-userdir.conf を開いて以下の内容に修正するだけ。</p>
<pre>
$ sudo vi /opt/local/apache2/conf/extra/httpd-userdir.conf

&lt;Directory "/Users/*/Sites"&gt;
#    AllowOverride FileInfo AuthConfig Limit Indexes
#    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
AllowOverride All
Options All
</pre>
<p>開発環境だからすべてOKにしちゃいました。</p>
<p>apache再起動</p>
<pre>
$ sudo /opt/local/apache2/bin/apachectl restart
</pre>]]>
        
    </content>
</entry>

<entry>
    <title>mac の開発環境構築 〜MySQL 文字化け対応〜</title>
    <link rel="alternate" type="text/html" href="http://www.sysgathe.com/2010/11/mac-mysql-1.html" />
    <id>tag:www.sysgathe.com,2010://1.91</id>

    <published>2010-11-14T03:29:57Z</published>
    <updated>2010-11-14T04:25:39Z</updated>

    <summary> 以前、Mac OS X Leopardにmacportsで...</summary>
    <author>
        <name>dugong</name>
        <uri>http://www.sysgathe.com</uri>
    </author>
    
        <category term="MySQL" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="mac環境" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://www.sysgathe.com/">
        <![CDATA[ <p>以前、Mac OS X LeopardにmacportsでインストールにたMySQLでの文字化け対策は「<a href="http://www.sysgathe.com/2010/07/mysql.html">MySQL コマンドラインでインポート</a>」を参照してください。。</p>
<p>今回もまた文字化けが発生したので、同じ対処法を・・・とおもったけど、/opt/local/etc/mysql5/my.cnf がない！</p>
<p>そういえば、設定ファイルなにもしてなかったorz</p>
<p>参考サイト：<a href="http://blog.cheki.net/archives/349">PHPとMySQLの個人的まとめ</a></p>]]>
        <![CDATA[<p>とりあえず、今の文字コードを確認。</p>
<pre>
$ /opt/local/lib/mysql5/bin/mysql -u root -p
Enter password: 

mysql> use table_name;
mysql> SHOW VARIABLES LIKE 'char%';
+--------------------------+-----------------------------------------+
| Variable_name            | Value                                   |
+--------------------------+-----------------------------------------+
| character_set_client     | latin1                                  |
| character_set_connection | latin1                                  |
| character_set_database   | latin1                                  |
| character_set_filesystem | binary                                  |
| character_set_results    | latin1                                  |
| character_set_server     | latin1                                  |
| character_set_system     | utf8                                    |
| character_sets_dir       | /opt/local/share/mysql5/mysql/charsets/ |
+--------------------------+-----------------------------------------+
8 rows in set (0.00 sec)
</pre>
<p>みごとにlatin1 で設定されています。</p>
<p>「/opt/local/share/mysql5/mysql/my-medium.cnf」を「/opt/local/etc/mysql5/」の中にコピー</p>
<pre>
$ sudo cp /opt/local/share/mysql5/mysql/my-medium.cnf /opt/local/etc/mysql5/my.cnf</pre>
<p>これで設定ファイルが作成されたので、編集していきます。</p>
<pre>
$ sudo vi /opt/local/etc/mysql5/my.cnf
</pre>
<p>以下の内容を追加。</p>
<pre>
#[mysqld]
character-set-server = utf8
skip-character-set-client-handshake

#[mysqldump]
default-character-set = utf8

#[mysql]
default-character-set = utf8
</pre>
<p>再起動</p>
<pre>
$ sudo /opt/local/share/mysql5/mysql/mysql.server restart
</pre>
<p>改めて文字コード確認</p>
<pre>
$ /opt/local/lib/mysql5/bin/mysql -u root -p
Enter password: 

mysql> use table_name
Database changed
mysql> SHOW VARIABLES LIKE 'char%';
+--------------------------+-----------------------------------------+
| Variable_name            | Value                                   |
+--------------------------+-----------------------------------------+
| character_set_client     | utf8                                    |
| character_set_connection | utf8                                    |
| character_set_database   | latin1                                  |
| character_set_filesystem | binary                                  |
| character_set_results    | utf8                                    |
| character_set_server     | utf8                                    |
| character_set_system     | utf8                                    |
| character_sets_dir       | /opt/local/share/mysql5/mysql/charsets/ |
+--------------------------+-----------------------------------------+
8 rows in set (0.00 sec)
</pre>
<p>データファイルを指定してインポート</p>
<pre>
mysql> source /Users/myname/data.sql
</pre>
<p>無事、文字化け解消！</p>]]>
    </content>
</entry>

<entry>
    <title>mac の開発環境構築 〜PHP バージョン変更〜</title>
    <link rel="alternate" type="text/html" href="http://www.sysgathe.com/2010/11/mac-php-2.html" />
    <id>tag:www.sysgathe.com,2010://1.90</id>

    <published>2010-11-13T14:02:06Z</published>
    <updated>2010-11-13T14:16:54Z</updated>

    <summary> 前回インストールしたPHP5.3.3では、cakePHPや...</summary>
    <author>
        <name>dugong</name>
        <uri>http://www.sysgathe.com</uri>
    </author>
    
        <category term="mac環境" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://www.sysgathe.com/">
        <![CDATA[ <p>前回インストールしたPHP5.3.3では、cakePHPやCMSなどまだまだ対応できていないものが多く、開発には何かと不便。</p>
<p>と、いうことで、PHP5.2系を入れ直すことに。</p>
<p>まずは、前回インストールしたPHP5.3.3をアンインストール。</p>
<p>それからPHP5.2系をインストールしていきます。</p>

<p>参考サイト：<a href="http://d.hatena.ne.jp/tamakiii/20100810/1281464669">MacPortsでphp5-mysqlがインストールできない問題の解決方法</a></p>
<p>参考サイト：<a href="http://blog.satorun.org/archives/217">MacPortsでPHP5.2+apache2+mysql5環境構築</a></p>]]>
        <![CDATA[<h3>まずは、前回インストールしたPHP5.3.3をアンインストール。</h3>
<p>既にインストールされているPHPを確認。</p>
<pre>
$ port installed php5
The following ports are currently installed:
  php5 @5.3.3_2+apache2+pear (active)
</pre>
<p>関連するpackageも同時にuninstall</p>
<pre>
$ sudo port uninstall -f php5
Password:
--->  Unable to uninstall/deactivate php5 @5.3.3_2+apache2+pear, the following ports depend on it:
--->  	php5-curl @5.3.3_0
--->  	php5-gd @5.3.3_0
--->  	php5-mbstring @5.3.3_0
--->  	php5-mcrypt @5.3.3_0
--->  	php5-mysql @5.3.3_0+mysqlnd
--->  	php5-sqlite @5.3.3_0
--->  	php5-tidy @5.3.3_0
--->  	php5-zip @5.3.3_0
Warning: Uninstall/deactivate forced.  Proceeding despite dependencies.
--->  Deactivating php5 @5.3.3_2+apache2+pear
--->  Unable to uninstall/deactivate php5 @5.3.3_2+apache2+pear, the following ports depend on it:
--->  	php5-curl @5.3.3_0
--->  	php5-gd @5.3.3_0
--->  	php5-mbstring @5.3.3_0
--->  	php5-mcrypt @5.3.3_0
--->  	php5-mysql @5.3.3_0+mysqlnd
--->  	php5-sqlite @5.3.3_0
--->  	php5-tidy @5.3.3_0
--->  	php5-zip @5.3.3_0
Warning: Uninstall/deactivate forced.  Proceeding despite dependencies.
--->  Cleaning php5
--->  Uninstalling php5 @5.3.3_2+apache2+pear
--->  Cleaning php5
</pre>
<p>Warningエラーがでてるけど、uninstallされたみたい。</p>
<p>念のため、clean</p>
<pre>
$ sudo port clean php5
--->  Cleaning php5
</pre>
<h3>次にPHP5.2系をインストールしていきます。</h3>
<p>まずは、macportのupdate</p>
<pre>
$ sudo port -d selfupdate
$ sudo port -d sync
</pre>
<p>PHP5.2を検索</p>
<pre>
$ port search php5
php5 @5.3.3 (lang, php, www)
    PHP: Hypertext Preprocessor
・・・
php52 @5.2.14 (lang, php, www)
    PHP: Hypertext Preprocessor
・・・
</pre>
<p>variants を確認</p>
<pre>
$ port variants php52
php52 has the variants:
   apache: Add Apache 1 web server module
     * conflicts with apache2 no_web
[+]apache2: Add Apache 2.2 web server module
     * conflicts with apache no_web
   dbase: Add dBase file format support
   debug: Enable debug support (useful to analyze a PHP-related core dump)
   fastcgi: Add FastCGI web server binary
     * conflicts with no_web
   gmp: Add GNU MP multiprocessing functions
   imap: Add IMAP protocol support
   ipc: Add semaphore, shared memory and IPC functions
   macports_snmp: Add SNMP support using MacPorts SNMP
     * conflicts with snmp
   mssql: Add MS-SQL server support
   mysql4: Add MySQL 4 support
     * conflicts with mysql5
   mysql5: Add MySQL 5 support
     * conflicts with mysql4
   no_web: Don't include any web server support
     * conflicts with apache apache2 fastcgi
   oracle: Add Oracle oci8 database functions with the Oracle Instant Client
   pcntl: Add process control functions
   pear: Add PEAR
   postgresql82: Add PostgreSQL 8.2 support
     * conflicts with postgresql83 postgresql84
   postgresql83: Add PostgreSQL 8.3 support
     * conflicts with postgresql82 postgresql84
   postgresql84: Add PostgreSQL 8.4 support
     * conflicts with postgresql82 postgresql83
   pspell: Add pspell spell-checking functions
   readline: Add GNU readline functions
   snmp: Add SNMP support using Apple SNMP
     * conflicts with macports_snmp
   sockets: Add socket communication functions
   sqlite: Add SQLite support
   suhosin: Add Suhosin patch
   t1lib: Add PostScript Type 1 font support with t1lib
   tidy: Add Tidy support
   universal: Build for multiple architectures
</pre>
<p>5.3系では「Obsolete」になっていたものも5.2系ではいけるみたい。</p>
<pre>
$ sudo port install php52 +apache2 +pear +mysql5 +sqlite +tidy
--->  Computing dependencies for mysql5
--->  Fetching mysql5
--->  Attempting to fetch mysql-5.1.52.tar.gz from http://mirror.facebook.net/mysql/Downloads/MySQL-5.1/
--->  Verifying checksum(s) for mysql5
--->  Extracting mysql5
--->  Applying patches to mysql5
--->  Configuring mysql5
--->  Building mysql5
--->  Staging mysql5 into destroot
--->  Computing dependencies for mysql5
--->  Installing mysql5 @5.1.52_0
--->  Deactivating mysql5 @5.1.51_0
--->  Cleaning mysql5
--->  Activating mysql5 @5.1.52_0
--->  Cleaning mysql5
--->  Computing dependencies for php52
Error: Unable to execute port: Can't install php52 because conflicting ports are installed: php5-gd php5-mbstring php5-sqlite
To report a bug, see &lt;http://guide.macports.org/#project.tickets&gt;
</pre>
<p>わぁ。エラーでちゃった。PHP5.3.3のとき、あとから入れたモジュールが邪魔してるみたい。</p>
<p>「-f」オプションをつけてもこれらはuninstallされないのね。一個ずつ削除します。。</p>
<p>おまけにmysql5がインストールされているみたい。</p>
<p>そいえば、「mysql5-server」はいれたけど「mysql5」は入れなかったなぁ。</p>
<pre>
$ sudo port uninstall -f php5-sqlite
Password:
--->  Deactivating php5-sqlite @5.3.3_0
--->  Cleaning php5-sqlite
--->  Uninstalling php5-sqlite @5.3.3_0
--->  Cleaning php5-sqlite
</pre>
<pre>
$ sudo port uninstall -f php5-mysql
--->  Unable to uninstall/deactivate php5-mysql @5.3.3_0+mysqlnd, the following ports depend on it:
--->  	phpmyadmin @3.3.5.1_0
Warning: Uninstall/deactivate forced.  Proceeding despite dependencies.
--->  Deactivating php5-mysql @5.3.3_0+mysqlnd
--->  Unable to uninstall/deactivate php5-mysql @5.3.3_0+mysqlnd, the following ports depend on it:
--->  	phpmyadmin @3.3.5.1_0
Warning: Uninstall/deactivate forced.  Proceeding despite dependencies.
--->  Cleaning php5-mysql
--->  Uninstalling php5-mysql @5.3.3_0+mysqlnd
--->  Cleaning php5-mysql
</pre>
<pre>
$ sudo port uninstall -f php5-mbstring
--->  Unable to uninstall/deactivate php5-mbstring @5.3.3_0, the following ports depend on it:
--->  	phpmyadmin @3.3.5.1_0
Warning: Uninstall/deactivate forced.  Proceeding despite dependencies.
--->  Deactivating php5-mbstring @5.3.3_0
--->  Unable to uninstall/deactivate php5-mbstring @5.3.3_0, the following ports depend on it:
--->  	phpmyadmin @3.3.5.1_0
Warning: Uninstall/deactivate forced.  Proceeding despite dependencies.
--->  Cleaning php5-mbstring
--->  Uninstalling php5-mbstring @5.3.3_0
--->  Cleaning php5-mbstring
</pre>
<pre>
$ sudo port uninstall -f php5-curl
--->  Deactivating php5-curl @5.3.3_0
--->  Cleaning php5-curl
--->  Uninstalling php5-curl @5.3.3_0
--->  Cleaning php5-curl
</pre>
<pre>
$ sudo port uninstall -f php5-gd
--->  Unable to uninstall/deactivate php5-gd @5.3.3_0, the following ports depend on it:
--->  	phpmyadmin @3.3.5.1_0
Warning: Uninstall/deactivate forced.  Proceeding despite dependencies.
--->  Deactivating php5-gd @5.3.3_0
--->  Unable to uninstall/deactivate php5-gd @5.3.3_0, the following ports depend on it:
--->  	phpmyadmin @3.3.5.1_0
Warning: Uninstall/deactivate forced.  Proceeding despite dependencies.
--->  Cleaning php5-gd
--->  Uninstalling php5-gd @5.3.3_0
--->  Cleaning php5-gd
</pre>
<pre>
$ sudo port uninstall -f php5-tidy
--->  Deactivating php5-tidy @5.3.3_0
--->  Cleaning php5-tidy
--->  Uninstalling php5-tidy @5.3.3_0
--->  Cleaning php5-tidy
</pre>
<pre>
$ sudo port uninstall -f php5-mcrypt
--->  Unable to uninstall/deactivate php5-mcrypt @5.3.3_0, the following ports depend on it:
--->  	phpmyadmin @3.3.5.1_0
Warning: Uninstall/deactivate forced.  Proceeding despite dependencies.
--->  Deactivating php5-mcrypt @5.3.3_0
--->  Unable to uninstall/deactivate php5-mcrypt @5.3.3_0, the following ports depend on it:
--->  	phpmyadmin @3.3.5.1_0
Warning: Uninstall/deactivate forced.  Proceeding despite dependencies.
--->  Cleaning php5-mcrypt
--->  Uninstalling php5-mcrypt @5.3.3_0
--->  Cleaning php5-mcrypt
</pre>
<pre>
$ sudo port uninstall -f php5-zip
--->  Unable to uninstall/deactivate php5-zip @5.3.3_0, the following ports depend on it:
--->  	phpmyadmin @3.3.5.1_0
Warning: Uninstall/deactivate forced.  Proceeding despite dependencies.
--->  Deactivating php5-zip @5.3.3_0
--->  Unable to uninstall/deactivate php5-zip @5.3.3_0, the following ports depend on it:
--->  	phpmyadmin @3.3.5.1_0
Warning: Uninstall/deactivate forced.  Proceeding despite dependencies.
--->  Cleaning php5-zip
--->  Uninstalling php5-zip @5.3.3_0
--->  Cleaning php5-zip
</pre>
<p>ログをちゃんととってると、こんなとき楽だね。</p>
<p>あいかわらず、Warningは出てるけど、小さなことは気にしない！</p>
<p>では、もいちどinstall</p>
<pre>
$ sudo port install php52 +apache2 +pear +mysql5 +sqlite +tidy
--->  Computing dependencies for php52
--->  Dependencies to be installed: libxslt tiff
--->  Fetching libxslt
--->  Attempting to fetch libxslt-1.1.26.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.26_0
--->  Activating libxslt @1.1.26_0
--->  Cleaning libxslt
--->  Fetching tiff
--->  Attempting to fetch tiff-3.9.4.tar.gz from ftp://ftp.jp.FreeBSD.org/pub/FreeBSD/ports/distfiles/
--->  Verifying checksum(s) for tiff
--->  Extracting tiff
--->  Configuring tiff
--->  Building tiff
--->  Staging tiff into destroot
--->  Installing tiff @3.9.4_0
--->  Activating tiff @3.9.4_0
--->  Cleaning tiff
--->  Fetching php52
--->  Attempting to fetch php-5.2.14.tar.bz2 from http://distfiles.macports.org/php5
--->  Verifying checksum(s) for php52
--->  Extracting php52
--->  Applying patches to php52
--->  Configuring php52
--->  Building php52
--->  Staging php52 into destroot
Error: Target org.macports.destroot returned: shell command failed (see log for details)
Log for php52 is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_php52/main.log
Error: Status 1 encountered during processing.
To report a bug, see &lt;http://guide.macports.org/#project.tickets&gt;
</pre>
<p>またエラーが・・・。</p>
<p>だめだ。。。バグチケットを投げてね。っていわれるんだけど、英語だし...</p>
<p>とりあえず、5.3.3系をも一度入れ直しておくことに。</p>
<pre>
$ sudo port install php5 +apache2 +pear
--->  Computing dependencies for php5
--->  Fetching php5
--->  Verifying checksum(s) for php5
--->  Extracting php5
--->  Applying patches to php5
--->  Configuring php5
--->  Building php5
--->  Staging php5 into destroot
Note: php5 installs files outside the common directory structure.
--->  Installing php5 @5.3.3_2+apache2+pear
--->  Activating php5 @5.3.3_2+apache2+pear
You may need to update your php.ini for any changes that have been made
in this version of php. Compare /opt/local/etc/php5/php.ini with
/opt/local/etc/php5/php.ini-development (if this is a development server) or
/opt/local/etc/php5/php.ini-production (if this is a production server).

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
</pre>]]>
    </content>
</entry>

<entry>
    <title>mac の開発環境構築 〜Eclipse〜</title>
    <link rel="alternate" type="text/html" href="http://www.sysgathe.com/2010/11/mac-eclipse.html" />
    <id>tag:www.sysgathe.com,2010://1.89</id>

    <published>2010-11-06T17:46:18Z</published>
    <updated>2010-11-07T08:24:25Z</updated>

    <summary> 言語環境はだいぶ整ってきましたので、次はIDEをインストー...</summary>
    <author>
        <name>dugong</name>
        <uri>http://www.sysgathe.com</uri>
    </author>
    
        <category term="mac環境" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://www.sysgathe.com/">
        <![CDATA[ <p>言語環境はだいぶ整ってきましたので、次はIDEをインストール。</p>
<p>Eclipseのsubversionでプロジェクトのバージョン管理をすることが前提。</p>
<p>あと、PHP、rubyなどのweb開発をするので、それらのプラグインをインストール予定。</p>

<h3>まずはEclipse本体のインストールから。</h3>
<p><a href="http://www.eclipse.org/downloads/">http://www.eclipse.org/downloads/</a></p>
<p>上記Eclipseダウンロードサイトから、cocoa版Eclipse IDE for Java EE Developersをダウンロード。</p>
<p><img alt="Eclipse Downloads.png" src="http://www.sysgathe.com/2010/11/07/Eclipse%20Downloads.png" width="728" height="370" class="mt-image-none" style="" /></p>
<p>解凍したeclipseフォルダをアプリケーションフォルダに移動させて、本体のインストール完了。</p>
<p>eclipse.appをダブルクリックして起動してみる。（workspaceはサイトフォルダの中に入れておくと実行確認のときに便利。）→OK</p>
<p>参考サイト：<a href="http://tonby.sakura.ne.jp/?p=62">Mac OS X LeopardでEclipse(javaとPHP)開発環境を整える</a>（basic認証がかかっていますが、キャンセルで閲覧可能→アクセス制限をかけたいのか、単なる設定ミスかは不明。アクセス制限をかけたい場合はご連絡いただけますとリンク削除します。）</p>
]]>
        <![CDATA[<h3>続いて日本語化。</h3>
<p><a href="http://mergedoc.sourceforge.jp/index.html#/pleiades.html">http://mergedoc.sourceforge.jp/index.html#/pleiades.html</a></p>
<p>上記サイトから Pleiades 本体の最新版をダウンロード。</p>
<p><img alt="Pleiades - Eclipse プラグイン日本語化プラグイン.png" src="http://www.sysgathe.com/2010/11/07/Pleiades%20-%20Eclipse%20%E3%83%97%E3%83%A9%E3%82%B0%E3%82%A4%E3%83%B3%E6%97%A5%E6%9C%AC%E8%AA%9E%E5%8C%96%E3%83%97%E3%83%A9%E3%82%B0%E3%82%A4%E3%83%B3.png" width="523" height="499" class="mt-image-none" style="" /></p>
<p><img alt="Pleiades - Eclipse プラグイン日本語化プラグイン２.png" src="http://www.sysgathe.com/2010/11/07/Pleiades%20-%20Eclipse%20%E3%83%97%E3%83%A9%E3%82%B0%E3%82%A4%E3%83%B3%E6%97%A5%E6%9C%AC%E8%AA%9E%E5%8C%96%E3%83%97%E3%83%A9%E3%82%B0%E3%82%A4%E3%83%B3%EF%BC%92.png" width="579" height="299" class="mt-image-none" style="" /></p>
<p>ダウンロードしたフォルダを解凍したらreadmeフォルダがあるので、readmeを参照しながら設定。</p>
<pre>
 1. pleiades_x.x.x.zip を解凍し、plugins、features ディレクトリーを &lt;ECLIPSE_HOME&gt; ディレクトリーにコピー。

  2. eclipse.ini の最終行に以下の記述を追加。
     -javaagent:plugins/jp.sourceforge.mergedoc.pleiades/pleiades.jar
    （Windows 以外の場合は後述の Eclipse 起動オプション参照）

     (Eclipse 3.3 以降)
  3. Pleiades スプラッシュ画像を使う場合は
     eclipse.ini の 1、2 行目の -showsplash org.eclipse.platform を削除。
</pre>
<p>eclipse.ini ファイルが見つからなかったので、参考サイトに従い、ターミナルから編集</p>
<pre>
$ vi /Applications/eclipse/Eclipse.app/Contents/MacOS/eclipse.ini

#最終行に追加
-javaagent:/Applications/eclipse/plugins/jp.sourceforge.mergedoc.pleiades/pleiades.jar
</pre>
<p>Eclipseを起動して日本語化されていることを確認。</p>
<h3>PDTプラグインをインストール</h3>
<p><a href="http://wiki.eclipse.org/PDT/Installation#Eclipse_3.6_.2F_Helios_.2F_PDT_2.2">http://wiki.eclipse.org/PDT/Installation#Eclipse_3.6_.2F_Helios_.2F_PDT_2.2</a></p>
<p>上記サイトを参考にプラグインをインストール</p>
<ol>
<li><p>「ヘルプ」＞「新規ソフトウェアのインストール」</p></li>
<li><p>「http://download.eclipse.org/releases/helios/」を入力</p>
<p><img alt="スクリーンショット（新規ソフトウェアのインストール）.png" src="http://www.sysgathe.com/2010/11/07/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88%EF%BC%882010-11-07%2014.04.55%EF%BC%89.png" width="924" height="588" class="mt-image-none" style="" /></p>
</li>
<li><p>出力一覧から「プログラミング言語」＞「PHP開発ツール（PDT）SDKフィーチャー」をチェック</p></li>
<li><p>「次へ」を２回。ライセンス規約に同意したら、インストール開始。</p></li>
<li><p>インストールが終了したら再起動を促されるので、そのまま再起動。</p></li>
<li><p>再起動したら右上の「パースペクティブを開く」をクリック。</p>
<p><img alt="スクリーンショット（パースペクティブを開く）.png" src="http://www.sysgathe.com/2010/11/07/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88%EF%BC%882010-11-07%2014.14.12%EF%BC%89.png" width="240" height="115" class="mt-image-none" style="" /></p>
</li>
<li><p>「その他」を選択</p></li>
<li><p>PHPを選択</p>
<p><img alt="スクリーンショット（PHPを選択）.png" src="http://www.sysgathe.com/2010/11/07/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88%EF%BC%882010-11-07%2014.14.50%EF%BC%89.png" width="344" height="371" class="mt-image-none" style="" /></p>
</li>
<li><p>右上にPHPが追加されました。</p>
<p><img alt="スクリーンショット（PHP追加）.png" src="http://www.sysgathe.com/2010/11/07/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88%EF%BC%882010-11-07%2014.16.48%EF%BC%89.png" width="152" height="102" class="mt-image-none" style="" /></p>
</li>
</ol>
<h3>Subversionプラグインをインストール</h3>
<ol>
<li><p>「ヘルプ」＞「新規ソフトウェアのインストール」</p></li>
<li><p>作業対象：「Helios - http://download.eclipse.org/releases/helios」を選択</p></li>
<li><p>フィルター入力：「subversive」と入力</p></li>
<li>
<ul><p>以下の２項目を選択</p>
<li>Subversive SVN JDT 無視拡張 (オプション)(インキュベーション)</li>
<li>Subversive SVN チーム・プロバイダー (インキュベーション)</li>
</ul>
<p><img alt="スクリーンショット（subversiveの選択）.png" src="http://www.sysgathe.com/2010/11/07/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88%EF%BC%882010-11-07%2015.35.53%EF%BC%89.png" width="918" height="426" class="mt-image-none" style="" /></p></li>
<li><p>「次へ」を２回。ライセンス規約に同意したら、インストール開始。</p></li>
<li><p>インストールが終了したら再起動を促されるので、そのまま再起動。</p></li>
<li><p>再起動されたら「ようこそ」画面にSubversiveの概要が出現。『SVN の作業には SVN コネクターのインストールが必要であることに注意してください。』ですって。</p>
<p><img alt="スクリーンショット（Subversiveの概要）.png" src="http://www.sysgathe.com/2010/11/07/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88%EF%BC%882010-11-07%2015.50.14%EF%BC%89.png" width="671" height="500" class="mt-image-none" style="" /></p></li>
<li><p>「ヘルプ」＞「Subversive」＞「プロジェクトおよび設定をマイグレーション」をクリック</p></li>
<li><p>「SVN Kit 1.3.2」を選択して完了をクリック。</p>
<p><img alt="スクリーンショット（SVN Kitの選択）.png" src="http://www.sysgathe.com/2010/11/07/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88%EF%BC%882010-11-07%2015.58.42%EF%BC%89.png" width="576" height="744" class="mt-image-none" style="" /></p></li>
<li><p>インストール画面が現れる。「次へ」を２回。ライセンス規約に同意したら、インストール開始。途中セキュリティ警告が現れるがOKしてインストール。</p>
<p><img alt="スクリーンショット（インストール画面）.png" src="http://www.sysgathe.com/2010/11/07/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88%EF%BC%882010-11-07%2016.01.00%EF%BC%89.png" width="701" height="456" class="mt-image-none" style="" /></p></li>
<li><p>インストールが終了したら再起動を促されるので、そのまま再起動。</p></li>
</ol>
<p>既存のsvnプロジェクトをチェックアウトしてみた。→何度か失敗を繰り返し再起動させていたら使えるようになった。設定は変更してないんだけど。。</p>
<p>参考サイト：<a href="http://walbrix.net/blog/2010/07/helios-subversive.html">Eclipse 3.6(Helios)に Subversionプラグイン Subversiveを導入する</a></p>]]>
    </content>
</entry>

<entry>
    <title>mac の開発環境構築 〜Git〜</title>
    <link rel="alternate" type="text/html" href="http://www.sysgathe.com/2010/11/mac-git.html" />
    <id>tag:www.sysgathe.com,2010://1.88</id>

    <published>2010-11-06T15:57:43Z</published>
    <updated>2010-11-06T10:41:52Z</updated>

    <summary> macports での最後のインストールになります。 バー...</summary>
    <author>
        <name>dugong</name>
        <uri>http://www.sysgathe.com</uri>
    </author>
    
        <category term="mac環境" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://www.sysgathe.com/">
        <![CDATA[ <p>macports での最後のインストールになります。</p>
<p>バージョン管理システム「Git」。subversionも最初に入れたけど、これからはgitも使えるようになんなきゃね。ってことでインストールしてみることに。</p>
<p>デフォルトではgitは入っていないので、portsの確認から。</p>
<pre>
$ port search git
・・・
git-core @1.7.3.2 (devel)
    A fast version control system

git-flow @0.4 (devel)
    Git extensions for Vincent Driessen branching.

GitX @0.7.1 (devel)
    GitX is a git GUI specifically for Mac OS X
・・・
</pre>
<p>git-coreをインストールしたらいいのかな？</p>
<p>こんなときはgoogle先生に。</p>
<p>cogitoとgit-coreらしい。しかし、cogitoなるものは引っかかってこなかった。。とりあえず、git-coreのオプション確認。</p>
<pre>
$ port variants git-core
git-core has the variants:
   bash_completion: Completion support for bash
[+]doc: Install HTML and plaintext documentation
   gitweb: Install gitweb.cgi
   svn: Bi-directional subversion repository support
</pre>
<p>gitweb と svn を追加してインストール</p>
<pre>
$ sudo port install git-core +gitweb +svn
</pre>
<p>無事インストールされたみたい。</p>
<pre>
$ git --version
git version 1.7.3.2
</pre>
<p>参考サイト：<a href="http://d.hatena.ne.jp/from_kyushu/20080414/git_on_mac">MacPortsを使ってgitをインストールしてみた</a></p>
<p>そのうちGitXもインストールしようかな。。</p>
]]>
        <![CDATA[<p>インストールログ</p>
<pre>
$ port variants git-core
git-core has the variants:
   bash_completion: Completion support for bash
[+]doc: Install HTML and plaintext documentation
   gitweb: Install gitweb.cgi
   svn: Bi-directional subversion repository support
macmini:~ macmini$ sudo port install git-core +gitweb +svn
Password:
--->  Computing dependencies for git-core
--->  Dependencies to be installed: p5-libwww-perl p5-compress-raw-zlib p5-crypt-ssleay p5-html-parser p5-html-tagset p5-io-compress p5-compress-raw-bzip2 p5-uri p5-svn-simple subversion-perlbindings p5-term-readkey
--->  Fetching p5-compress-raw-zlib
--->  Attempting to fetch Compress-Raw-Zlib-2.027.tar.gz from ftp://ftp.cpan.org/pub/CPAN/modules/by-module/Compress
--->  Verifying checksum(s) for p5-compress-raw-zlib
--->  Extracting p5-compress-raw-zlib
--->  Configuring p5-compress-raw-zlib
--->  Building p5-compress-raw-zlib
--->  Staging p5-compress-raw-zlib into destroot
--->  Installing p5-compress-raw-zlib @2.027_0
--->  Activating p5-compress-raw-zlib @2.027_0
--->  Cleaning p5-compress-raw-zlib
--->  Fetching p5-crypt-ssleay
--->  Attempting to fetch Crypt-SSLeay-0.57.tar.gz from ftp://ftp.cpan.org/pub/CPAN/modules/by-module/Crypt
--->  Verifying checksum(s) for p5-crypt-ssleay
--->  Extracting p5-crypt-ssleay
--->  Configuring p5-crypt-ssleay
--->  Building p5-crypt-ssleay
--->  Staging p5-crypt-ssleay into destroot
--->  Installing p5-crypt-ssleay @0.57_1
--->  Activating p5-crypt-ssleay @0.57_1
--->  Cleaning p5-crypt-ssleay
--->  Fetching p5-html-tagset
--->  Attempting to fetch HTML-Tagset-3.20.tar.gz from ftp://ftp.cpan.org/pub/CPAN/modules/by-module/HTML
--->  Verifying checksum(s) for p5-html-tagset
--->  Extracting p5-html-tagset
--->  Configuring p5-html-tagset
--->  Building p5-html-tagset
--->  Staging p5-html-tagset into destroot
--->  Installing p5-html-tagset @3.20_0
--->  Activating p5-html-tagset @3.20_0
--->  Cleaning p5-html-tagset
--->  Fetching p5-html-parser
--->  Attempting to fetch HTML-Parser-3.65.tar.gz from ftp://ftp.cpan.org/pub/CPAN/modules/by-module/HTML
--->  Verifying checksum(s) for p5-html-parser
--->  Extracting p5-html-parser
--->  Configuring p5-html-parser
--->  Building p5-html-parser
--->  Staging p5-html-parser into destroot
--->  Installing p5-html-parser @3.65_0
--->  Activating p5-html-parser @3.65_0
--->  Cleaning p5-html-parser
--->  Fetching p5-compress-raw-bzip2
--->  Attempting to fetch Compress-Raw-Bzip2-2.031.tar.gz from ftp://ftp.cpan.org/pub/CPAN/modules/by-module/Compress
--->  Verifying checksum(s) for p5-compress-raw-bzip2
--->  Extracting p5-compress-raw-bzip2
--->  Configuring p5-compress-raw-bzip2
--->  Building p5-compress-raw-bzip2
--->  Staging p5-compress-raw-bzip2 into destroot
--->  Installing p5-compress-raw-bzip2 @2.031_0
--->  Activating p5-compress-raw-bzip2 @2.031_0
--->  Cleaning p5-compress-raw-bzip2
--->  Fetching p5-io-compress
--->  Attempting to fetch IO-Compress-2.027.tar.gz from ftp://ftp.cpan.org/pub/CPAN/modules/by-module/IO
--->  Verifying checksum(s) for p5-io-compress
--->  Extracting p5-io-compress
--->  Configuring p5-io-compress
--->  Building p5-io-compress
--->  Staging p5-io-compress into destroot
--->  Installing p5-io-compress @2.027_0
--->  Activating p5-io-compress @2.027_0
--->  Cleaning p5-io-compress
--->  Fetching p5-uri
--->  Attempting to fetch URI-1.54.tar.gz from ftp://ftp.cpan.org/pub/CPAN/modules/by-module/URI
--->  Verifying checksum(s) for p5-uri
--->  Extracting p5-uri
--->  Configuring p5-uri
--->  Building p5-uri
--->  Staging p5-uri into destroot
--->  Installing p5-uri @1.54_0
--->  Activating p5-uri @1.54_0
--->  Cleaning p5-uri
--->  Fetching p5-libwww-perl
--->  Attempting to fetch libwww-perl-5.837.tar.gz from ftp://ftp.cpan.org/pub/CPAN/modules/by-module/../by-authors/id/G/GA/GAAS
--->  Verifying checksum(s) for p5-libwww-perl
--->  Extracting p5-libwww-perl
--->  Applying patches to p5-libwww-perl
--->  Configuring p5-libwww-perl
--->  Building p5-libwww-perl
--->  Staging p5-libwww-perl into destroot
--->  Installing p5-libwww-perl @5.837_0
--->  Activating p5-libwww-perl @5.837_0
--->  Cleaning p5-libwww-perl
--->  Fetching subversion-perlbindings
--->  Verifying checksum(s) for subversion-perlbindings
--->  Extracting subversion-perlbindings
--->  Configuring subversion-perlbindings
--->  Building subversion-perlbindings
--->  Staging subversion-perlbindings into destroot
--->  Installing subversion-perlbindings @1.6.13_0
--->  Activating subversion-perlbindings @1.6.13_0
--->  Cleaning subversion-perlbindings
--->  Fetching p5-svn-simple
--->  Attempting to fetch SVN-Simple-0.28.tar.gz from http://distfiles.macports.org/perl5
--->  Verifying checksum(s) for p5-svn-simple
--->  Extracting p5-svn-simple
--->  Configuring p5-svn-simple
--->  Building p5-svn-simple
--->  Staging p5-svn-simple into destroot
--->  Installing p5-svn-simple @0.28_0
--->  Activating p5-svn-simple @0.28_0
--->  Cleaning p5-svn-simple
--->  Fetching p5-term-readkey
--->  Attempting to fetch TermReadKey-2.30.tar.gz from ftp://ftp.cpan.org/pub/CPAN/modules/by-module/Term
--->  Verifying checksum(s) for p5-term-readkey
--->  Extracting p5-term-readkey
--->  Configuring p5-term-readkey
--->  Building p5-term-readkey
--->  Staging p5-term-readkey into destroot
--->  Installing p5-term-readkey @2.30_0
--->  Activating p5-term-readkey @2.30_0
--->  Cleaning p5-term-readkey
--->  Fetching git-core
--->  Verifying checksum(s) for git-core
--->  Extracting git-core
--->  Applying patches to git-core
--->  Configuring git-core
--->  Building git-core
--->  Staging git-core into destroot
--->  Installing git-core @1.7.3.2_0+doc+gitweb+svn
--->  Activating git-core @1.7.3.2_0+doc+gitweb+svn
--->  Cleaning git-core
</pre>]]>
    </content>
</entry>

<entry>
    <title>mac の開発環境構築 〜Django〜</title>
    <link rel="alternate" type="text/html" href="http://www.sysgathe.com/2010/11/mac-django.html" />
    <id>tag:www.sysgathe.com,2010://1.87</id>

    <published>2010-11-06T15:48:57Z</published>
    <updated>2010-11-06T09:54:45Z</updated>

    <summary> pythonフレームワークのDjangoをインストール。 ...</summary>
    <author>
        <name>dugong</name>
        <uri>http://www.sysgathe.com</uri>
    </author>
    
        <category term="mac環境" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://www.sysgathe.com/">
        <![CDATA[ <p>pythonフレームワークのDjangoをインストール。</p>
<p>portsの確認</p>
<pre>
$ port search django
・・・
py27-django @1.2.3 (python, www)
    Django is a high-level Python Web framework
</pre>
<p>インストール</p>
<pre>
$ sudo port install py27-django
</pre>
<p>問題なくインストールできました。</p>
<p>参考サイト：<a href="http://akisute.com/2009/04/macportspython.html">MacPortsを使って、Pythonの開発環境を整えてみた</a></p>]]>
        <![CDATA[<p>インストールログ</p>
<pre>
$ sudo port install py27-django
Password:
--->  Computing dependencies for py27-django
--->  Dependencies to be installed: py27-distribute
--->  Fetching py27-distribute
--->  Attempting to fetch distribute-0.6.14.tar.gz from http://distfiles.macports.org/python
--->  Verifying checksum(s) for py27-distribute
--->  Extracting py27-distribute
--->  Configuring py27-distribute
--->  Building py27-distribute
--->  Staging py27-distribute into destroot
--->  Installing py27-distribute @0.6.14_0
--->  Activating py27-distribute @0.6.14_0
--->  Cleaning py27-distribute
--->  Fetching py27-django
--->  Attempting to fetch Django-1.2.3.tar.gz from http://distfiles.macports.org/python
--->  Verifying checksum(s) for py27-django
--->  Extracting py27-django
--->  Configuring py27-django
--->  Building py27-django
--->  Staging py27-django into destroot
--->  Installing py27-django @1.2.3_0
--->  Activating py27-django @1.2.3_0
--->  Cleaning py27-django
</pre>]]>
    </content>
</entry>

<entry>
    <title>mac の開発環境構築 〜python〜</title>
    <link rel="alternate" type="text/html" href="http://www.sysgathe.com/2010/11/mac-python.html" />
    <id>tag:www.sysgathe.com,2010://1.86</id>

    <published>2010-11-06T15:04:25Z</published>
    <updated>2010-11-06T09:47:16Z</updated>

    <summary> お次はpython。ってpython使ったことないんだけど...</summary>
    <author>
        <name>dugong</name>
        <uri>http://www.sysgathe.com</uri>
    </author>
    
        <category term="mac環境" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://www.sysgathe.com/">
        <![CDATA[ <p>お次はpython。ってpython使ったことないんだけどね。。</p>
<p>これを機に使いたいねって思って。まずはデフォルトのバージョン確認</p>
<pre>
$ python
Python 2.6.1 (r261:67515, Dec 17 2009, 00:59:15) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
</pre>
<p>pythonを終了させるには「exit()」コマンドをタイプすればOK。</p>
<p>portsの確認</p>
<pre>
$ port search python
・・・
python24 @2.4.6 (lang)
    An interpreted, object-oriented programming language

python24-doc @2.4.4 (lang)
    HTML documentation for Python 2.4

python25 @2.5.5 (lang)
    An interpreted, object-oriented programming language

python25-doc @2.5.2 (lang)
    HTML documentation for Python 2.5

python26 @2.6.6 (lang)
    An interpreted, object-oriented programming language

python26-doc @2.6.4 (lang)
    HTML documentation for Python 2.6

python27 @2.7 (lang)
    An interpreted, object-oriented programming language

python31 @3.1.2 (lang)
    An interpreted, object-oriented programming language

python32 @3.2a3 (lang)
    An interpreted, object-oriented programming language

python_select @0.3 (sysutils)
    Switch the default python interpreter
・・・
</pre>
<p>いっぱいあるね〜。</p>
<p>とりあえず3.2系をインストールしてpython_selectで切り替えられるようにしておけば何とかなるかな？ってことで、インストール</p>
<pre>
$ sudo port install python32
Password:
・・・
--->  Fetching python26
--->  Attempting to fetch Python-2.6.6.tar.bz2 from http://distfiles.macports.org/python26
--->  Verifying checksum(s) for python26
--->  Extracting python26
--->  Applying patches to python26
--->  Configuring python26
--->  Building python26
--->  Staging python26 into destroot
--->  Installing python26 @2.6.6_0+no_tkinter
--->  Activating python26 @2.6.6_0+no_tkinter

To fully complete your installation and make python 2.6 the default,  please
run:
 	sudo port install python_select
 	sudo python_select python26
・・・
--->  Fetching python32
--->  Attempting to fetch Python-3.2a3.tar.bz2 from http://distfiles.macports.org/python32
--->  Verifying checksum(s) for python32
--->  Extracting python32
--->  Applying patches to python32
--->  Configuring python32
--->  Building python32
Error: Target org.macports.build returned: shell command failed
Log for python32 is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python32/main.log
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>
</pre>
<p>なんかたくさんインストールされた。。2.6系もインストールされたっぽい。</p>
<p>そしてpython_selectをインストールせよと。</p>
<p>最後の最後でpython32ビルドできなかったって(T_T)</p>
<p>インストールされたものを確認。</p>
<pre>
$ port installed
・・・
python26 @2.6.6_0+no_tkinter (active)
・・・
</pre>
<p>とりあえず、python_selectをインストールしてみることに。</p>
<pre>
$ sudo port install python_select
</pre>
<p>よくよく考えてみると、3.2系はまだdjangoがない。ということで、2.7系をインストールしてみる。</p>
<pre>
$ sudo port install python27
</pre>
<p>今度は無事インストールされたみたい＾＾</p>
<p>python_select で２．７系に変更</p>
<pre>
$ sudo python_select python27
Selecting version "python27" for python
</pre>
<p>ターミナルを再起動してバージョン確認。</p>
<pre>
$ python
Python 2.7 (r27:82500, Nov  6 2010, 18:41:20) 
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
</pre>
<p>参考サイト：<a href="http://akisute.com/2009/04/macportspython.html">MacPortsを使って、Pythonの開発環境を整えてみた</a></p>
]]>
        <![CDATA[<p>python32インストールログ</p>
<pre>
$ sudo port install python32
Password:
--->  Computing dependencies for python32
--->  Dependencies to be installed: gdbm tk Xft2 fontconfig xrender xorg-libX11 xorg-bigreqsproto xorg-inputproto xorg-kbproto xorg-libXau xorg-xproto xorg-libXdmcp xorg-libxcb python26 xorg-libpthread-stubs xorg-xcb-proto xorg-util-macros xorg-xcmiscproto xorg-xextproto xorg-xf86bigfontproto xorg-xtrans xorg-renderproto tcl xorg-libXScrnSaver xorg-libXext xorg-scrnsaverproto
--->  Fetching gdbm
--->  Attempting to fetch gdbm-1.8.3.tar.gz from ftp://ftp.dti.ad.jp/pub/GNU/gdbm
--->  Verifying checksum(s) for gdbm
--->  Extracting gdbm
--->  Configuring gdbm
--->  Building gdbm
--->  Staging gdbm into destroot
--->  Installing gdbm @1.8.3_2
--->  Activating gdbm @1.8.3_2
--->  Cleaning gdbm
--->  Fetching fontconfig
--->  Attempting to fetch fontconfig-2.8.0.tar.gz from http://distfiles.macports.org/fontconfig
--->  Verifying checksum(s) for fontconfig
--->  Extracting fontconfig
--->  Applying patches to fontconfig
--->  Configuring fontconfig
--->  Building fontconfig
--->  Staging fontconfig into destroot
--->  Installing fontconfig @2.8.0_0
--->  Activating fontconfig @2.8.0_0
--->  Cleaning fontconfig
--->  Fetching xorg-bigreqsproto
--->  Attempting to fetch bigreqsproto-1.1.1.tar.bz2 from http://distfiles.macports.org/xorg-bigreqsproto
--->  Verifying checksum(s) for xorg-bigreqsproto
--->  Extracting xorg-bigreqsproto
--->  Configuring xorg-bigreqsproto
--->  Building xorg-bigreqsproto
--->  Staging xorg-bigreqsproto into destroot
--->  Installing xorg-bigreqsproto @1.1.1_0
--->  Activating xorg-bigreqsproto @1.1.1_0
--->  Cleaning xorg-bigreqsproto
--->  Fetching xorg-inputproto
--->  Attempting to fetch inputproto-2.0.tar.bz2 from http://distfiles.macports.org/xorg-inputproto
--->  Verifying checksum(s) for xorg-inputproto
--->  Extracting xorg-inputproto
--->  Configuring xorg-inputproto
--->  Building xorg-inputproto
--->  Staging xorg-inputproto into destroot
--->  Installing xorg-inputproto @2.0_0
--->  Activating xorg-inputproto @2.0_0
--->  Cleaning xorg-inputproto
--->  Fetching xorg-kbproto
--->  Attempting to fetch kbproto-1.0.5.tar.bz2 from http://distfiles.macports.org/xorg-kbproto
--->  Verifying checksum(s) for xorg-kbproto
--->  Extracting xorg-kbproto
--->  Configuring xorg-kbproto
--->  Building xorg-kbproto
--->  Staging xorg-kbproto into destroot
--->  Installing xorg-kbproto @1.0.5_0
--->  Activating xorg-kbproto @1.0.5_0
--->  Cleaning xorg-kbproto
--->  Fetching xorg-xproto
--->  Attempting to fetch xproto-7.0.19.tar.bz2 from http://distfiles.macports.org/xorg-xproto
--->  Verifying checksum(s) for xorg-xproto
--->  Extracting xorg-xproto
--->  Configuring xorg-xproto
--->  Building xorg-xproto
--->  Staging xorg-xproto into destroot
--->  Installing xorg-xproto @7.0.19_0
--->  Activating xorg-xproto @7.0.19_0
--->  Cleaning xorg-xproto
--->  Fetching xorg-libXau
--->  Attempting to fetch libXau-1.0.6.tar.bz2 from http://distfiles.macports.org/xorg-libXau
--->  Verifying checksum(s) for xorg-libXau
--->  Extracting xorg-libXau
--->  Configuring xorg-libXau
--->  Building xorg-libXau
--->  Staging xorg-libXau into destroot
--->  Installing xorg-libXau @1.0.6_0
--->  Activating xorg-libXau @1.0.6_0
--->  Cleaning xorg-libXau
--->  Fetching xorg-libXdmcp
--->  Attempting to fetch libXdmcp-1.1.0.tar.bz2 from http://distfiles.macports.org/xorg-libXdmcp
--->  Verifying checksum(s) for xorg-libXdmcp
--->  Extracting xorg-libXdmcp
--->  Configuring xorg-libXdmcp
--->  Building xorg-libXdmcp
--->  Staging xorg-libXdmcp into destroot
--->  Installing xorg-libXdmcp @1.1.0_0
--->  Activating xorg-libXdmcp @1.1.0_0
--->  Cleaning xorg-libXdmcp
--->  Fetching python26
--->  Attempting to fetch Python-2.6.6.tar.bz2 from http://distfiles.macports.org/python26
--->  Verifying checksum(s) for python26
--->  Extracting python26
--->  Applying patches to python26
--->  Configuring python26
--->  Building python26
--->  Staging python26 into destroot
--->  Installing python26 @2.6.6_0+no_tkinter
--->  Activating python26 @2.6.6_0+no_tkinter

To fully complete your installation and make python 2.6 the default,  please
run:
 	sudo port install python_select
 	sudo python_select python26

--->  Cleaning python26
--->  Fetching xorg-libpthread-stubs
--->  Attempting to fetch libpthread-stubs-0.3.tar.bz2 from http://distfiles.macports.org/xorg-libpthread-stubs
--->  Verifying checksum(s) for xorg-libpthread-stubs
--->  Extracting xorg-libpthread-stubs
--->  Configuring xorg-libpthread-stubs
--->  Building xorg-libpthread-stubs
--->  Staging xorg-libpthread-stubs into destroot
--->  Installing xorg-libpthread-stubs @0.3_0
--->  Activating xorg-libpthread-stubs @0.3_0
--->  Cleaning xorg-libpthread-stubs
--->  Fetching xorg-xcb-proto
--->  Attempting to fetch xcb-proto-1.6.tar.bz2 from http://distfiles.macports.org/xorg-xcb-proto
--->  Verifying checksum(s) for xorg-xcb-proto
--->  Extracting xorg-xcb-proto
--->  Configuring xorg-xcb-proto
--->  Building xorg-xcb-proto
--->  Staging xorg-xcb-proto into destroot
--->  Installing xorg-xcb-proto @1.6_0+python26
--->  Activating xorg-xcb-proto @1.6_0+python26
--->  Cleaning xorg-xcb-proto
--->  Fetching xorg-libxcb
--->  Attempting to fetch libxcb-1.7.tar.bz2 from http://distfiles.macports.org/xorg-libxcb
--->  Verifying checksum(s) for xorg-libxcb
--->  Extracting xorg-libxcb
--->  Configuring xorg-libxcb
--->  Building xorg-libxcb
--->  Staging xorg-libxcb into destroot
--->  Installing xorg-libxcb @1.7_0+python26
--->  Activating xorg-libxcb @1.7_0+python26
--->  Cleaning xorg-libxcb
--->  Fetching xorg-util-macros
--->  Attempting to fetch util-macros-1.11.0.tar.bz2 from http://distfiles.macports.org/xorg-util-macros
--->  Verifying checksum(s) for xorg-util-macros
--->  Extracting xorg-util-macros
--->  Configuring xorg-util-macros
--->  Building xorg-util-macros
--->  Staging xorg-util-macros into destroot
--->  Installing xorg-util-macros @1.11.0_0
--->  Activating xorg-util-macros @1.11.0_0
--->  Cleaning xorg-util-macros
--->  Fetching xorg-xcmiscproto
--->  Attempting to fetch xcmiscproto-1.2.1.tar.bz2 from http://distfiles.macports.org/xorg-xcmiscproto
--->  Verifying checksum(s) for xorg-xcmiscproto
--->  Extracting xorg-xcmiscproto
--->  Configuring xorg-xcmiscproto
--->  Building xorg-xcmiscproto
--->  Staging xorg-xcmiscproto into destroot
--->  Installing xorg-xcmiscproto @1.2.1_0
--->  Activating xorg-xcmiscproto @1.2.1_0
--->  Cleaning xorg-xcmiscproto
--->  Fetching xorg-xextproto
--->  Attempting to fetch xextproto-7.1.2.tar.bz2 from http://distfiles.macports.org/xorg-xextproto
--->  Verifying checksum(s) for xorg-xextproto
--->  Extracting xorg-xextproto
--->  Configuring xorg-xextproto
--->  Building xorg-xextproto
--->  Staging xorg-xextproto into destroot
--->  Installing xorg-xextproto @7.1.2_0
--->  Activating xorg-xextproto @7.1.2_0
--->  Cleaning xorg-xextproto
--->  Fetching xorg-xf86bigfontproto
--->  Attempting to fetch xf86bigfontproto-1.2.0.tar.bz2 from http://distfiles.macports.org/xorg-xf86bigfontproto
--->  Verifying checksum(s) for xorg-xf86bigfontproto
--->  Extracting xorg-xf86bigfontproto
--->  Configuring xorg-xf86bigfontproto
--->  Building xorg-xf86bigfontproto
--->  Staging xorg-xf86bigfontproto into destroot
--->  Installing xorg-xf86bigfontproto @1.2.0_0
--->  Activating xorg-xf86bigfontproto @1.2.0_0
--->  Cleaning xorg-xf86bigfontproto
--->  Fetching xorg-xtrans
--->  Attempting to fetch xtrans-1.2.5.tar.bz2 from http://distfiles.macports.org/xorg-xtrans
--->  Verifying checksum(s) for xorg-xtrans
--->  Extracting xorg-xtrans
--->  Configuring xorg-xtrans
--->  Building xorg-xtrans
--->  Staging xorg-xtrans into destroot
--->  Installing xorg-xtrans @1.2.5_0
--->  Activating xorg-xtrans @1.2.5_0
--->  Cleaning xorg-xtrans
--->  Fetching xorg-libX11
--->  Attempting to fetch libX11-1.3.6.tar.bz2 from http://distfiles.macports.org/xorg-libX11
--->  Verifying checksum(s) for xorg-libX11
--->  Extracting xorg-libX11
--->  Applying patches to xorg-libX11
--->  Configuring xorg-libX11
--->  Building xorg-libX11
--->  Staging xorg-libX11 into destroot
--->  Installing xorg-libX11 @1.3.6_1
--->  Activating xorg-libX11 @1.3.6_1
--->  Cleaning xorg-libX11
--->  Fetching xorg-renderproto
--->  Attempting to fetch renderproto-0.11.1.tar.bz2 from http://distfiles.macports.org/xorg-renderproto
--->  Verifying checksum(s) for xorg-renderproto
--->  Extracting xorg-renderproto
--->  Configuring xorg-renderproto
--->  Building xorg-renderproto
--->  Staging xorg-renderproto into destroot
--->  Installing xorg-renderproto @0.11.1_0
--->  Activating xorg-renderproto @0.11.1_0
--->  Cleaning xorg-renderproto
--->  Fetching xrender
--->  Attempting to fetch libXrender-0.9.6.tar.bz2 from http://distfiles.macports.org/xrender
--->  Verifying checksum(s) for xrender
--->  Extracting xrender
--->  Configuring xrender
--->  Building xrender
--->  Staging xrender into destroot
--->  Installing xrender @0.9.6_0
--->  Activating xrender @0.9.6_0
--->  Cleaning xrender
--->  Fetching Xft2
--->  Attempting to fetch libXft-2.2.0.tar.bz2 from http://distfiles.macports.org/Xft2
--->  Verifying checksum(s) for Xft2
--->  Extracting Xft2
--->  Configuring Xft2
--->  Building Xft2
--->  Staging Xft2 into destroot
--->  Installing Xft2 @2.2.0_0
--->  Activating Xft2 @2.2.0_0
--->  Cleaning Xft2
--->  Fetching tcl
--->  Attempting to fetch tcl8.5.9-src.tar.gz from http://jaist.dl.sourceforge.net/tcl
--->  Verifying checksum(s) for tcl
--->  Extracting tcl
--->  Configuring tcl
--->  Building tcl
--->  Staging tcl into destroot
--->  Installing tcl @8.5.9_0
--->  Activating tcl @8.5.9_0
--->  Cleaning tcl
--->  Fetching xorg-libXext
--->  Attempting to fetch libXext-1.2.0.tar.bz2 from http://distfiles.macports.org/xorg-libXext
--->  Verifying checksum(s) for xorg-libXext
--->  Extracting xorg-libXext
--->  Configuring xorg-libXext
--->  Building xorg-libXext
--->  Staging xorg-libXext into destroot
--->  Installing xorg-libXext @1.2.0_0
--->  Activating xorg-libXext @1.2.0_0
--->  Cleaning xorg-libXext
--->  Fetching xorg-scrnsaverproto
--->  Attempting to fetch scrnsaverproto-1.2.1.tar.bz2 from http://distfiles.macports.org/xorg-scrnsaverproto
--->  Verifying checksum(s) for xorg-scrnsaverproto
--->  Extracting xorg-scrnsaverproto
--->  Configuring xorg-scrnsaverproto
--->  Building xorg-scrnsaverproto
--->  Staging xorg-scrnsaverproto into destroot
--->  Installing xorg-scrnsaverproto @1.2.1_0
--->  Activating xorg-scrnsaverproto @1.2.1_0
--->  Cleaning xorg-scrnsaverproto
--->  Fetching xorg-libXScrnSaver
--->  Attempting to fetch libXScrnSaver-1.2.1.tar.bz2 from http://distfiles.macports.org/xorg-libXScrnSaver
--->  Verifying checksum(s) for xorg-libXScrnSaver
--->  Extracting xorg-libXScrnSaver
--->  Configuring xorg-libXScrnSaver
--->  Building xorg-libXScrnSaver
--->  Staging xorg-libXScrnSaver into destroot
--->  Installing xorg-libXScrnSaver @1.2.1_0
--->  Activating xorg-libXScrnSaver @1.2.1_0
--->  Cleaning xorg-libXScrnSaver
--->  Fetching tk
--->  Attempting to fetch tk8.5.9-src.tar.gz from http://jaist.dl.sourceforge.net/tcl
--->  Verifying checksum(s) for tk
--->  Extracting tk
--->  Configuring tk
--->  Building tk
--->  Staging tk into destroot
--->  Installing tk @8.5.9_0
--->  Activating tk @8.5.9_0
--->  Cleaning tk
--->  Fetching python32
--->  Attempting to fetch Python-3.2a3.tar.bz2 from http://distfiles.macports.org/python32
--->  Verifying checksum(s) for python32
--->  Extracting python32
--->  Applying patches to python32
--->  Configuring python32
--->  Building python32
Error: Target org.macports.build returned: shell command failed
Log for python32 is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python32/main.log
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>
</pre>
<p>python_select インストールログ</p>
<pre>
$ sudo port install python_select
Password:
--->  Computing dependencies for python_select
--->  Fetching python_select
--->  Attempting to fetch select-0.3.tar.gz from http://svn.macports.org/repository/macports/contrib/select/
--->  Verifying checksum(s) for python_select
--->  Extracting python_select
--->  Configuring python_select
--->  Building python_select
--->  Staging python_select into destroot
--->  Installing python_select @0.3_0
--->  Activating python_select @0.3_0
--->  Cleaning python_select
</pre>
<p>python27 インストールログ</p>
<pre>
$ sudo port install python27
--->  Computing dependencies for python27
--->  Fetching python27
--->  Attempting to fetch Python-2.7.tar.bz2 from http://distfiles.macports.org/python27
--->  Verifying checksum(s) for python27
--->  Extracting python27
--->  Applying patches to python27
--->  Configuring python27
--->  Building python27
--->  Staging python27 into destroot
--->  Installing python27 @2.7_1
--->  Activating python27 @2.7_1

To fully complete your installation and make python 2.7 the default,  please
run:
 	sudo port install python_select
 	sudo python_select python27

--->  Cleaning python27
</pre>]]>
    </content>
</entry>

<entry>
    <title>mac の開発環境構築 〜rails〜</title>
    <link rel="alternate" type="text/html" href="http://www.sysgathe.com/2010/11/mac-rails.html" />
    <id>tag:www.sysgathe.com,2010://1.85</id>

    <published>2010-11-06T14:36:42Z</published>
    <updated>2010-11-06T08:53:04Z</updated>

    <summary> rubyのフレームワークrailsをgemsからインストー...</summary>
    <author>
        <name>dugong</name>
        <uri>http://www.sysgathe.com</uri>
    </author>
    
        <category term="mac環境" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://www.sysgathe.com/">
        <![CDATA[ <p>rubyのフレームワークrailsをgemsからインストールします。</p>
<pre>
$ sudo gem install rails
Password:
・・・
24 gems installed
Installing ri documentation for activesupport-3.0.1...
Installing ri documentation for builder-2.1.2...
ERROR:  While generating documentation for builder-2.1.2
... MESSAGE:   Unhandled special: Special: type=17, text="<!-- HI -->"
... RDOC args: --ri --op /opt/local/lib/ruby/gems/1.8/doc/builder-2.1.2/ri --title Builder -- Easy XML Building --main README --line-numbers --quiet lib CHANGES Rakefile README doc/releases/builder-1.2.4.rdoc doc/releases/builder-2.0.0.rdoc doc/releases/builder-2.1.1.rdoc --title builder-2.1.2 Documentation
・・・
File not found: lib
</pre>
<p>なんだかエラーがでましたね。。</p>
<p>とりあえず、インストールされたものたちを確認してみることに</p>
<pre>
$ gem search

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (3.0.1)
actionpack (3.0.1)
activemodel (3.0.1)
activerecord (3.0.1)
activeresource (3.0.1)
activesupport (3.0.1)
arel (1.0.1)
builder (2.1.2)
bundler (1.0.3)
erubis (2.6.6)
i18n (0.4.2)
mail (2.2.9)
mime-types (1.16)
polyglot (0.3.1)
rack (1.2.1)
rack-mount (0.6.13)
rack-test (0.5.6)
rails (3.0.1)
railties (3.0.1)
rake (0.8.7)
thor (0.14.4)
treetop (1.4.8)
tzinfo (0.3.23)
</pre>
<p>rails3.0.1がインストールされています。</p>
<p>documentationがインストールできなかっただけのようですので、ま、いっか。</p>
<p>rails の確認</p>
<pre>
$ rails -v
Rails 3.0.1
</pre>]]>
        <![CDATA[<p>インストールログ</p>
<pre>
$ sudo gem install rails
Password:
Successfully installed activesupport-3.0.1
Successfully installed builder-2.1.2
Successfully installed i18n-0.4.2
Successfully installed activemodel-3.0.1
Successfully installed rack-1.2.1
Successfully installed rack-test-0.5.6
Successfully installed rack-mount-0.6.13
Successfully installed tzinfo-0.3.23
Successfully installed abstract-1.0.0
Successfully installed erubis-2.6.6
Successfully installed actionpack-3.0.1
Successfully installed arel-1.0.1
Successfully installed activerecord-3.0.1
Successfully installed activeresource-3.0.1
Successfully installed mime-types-1.16
Successfully installed polyglot-0.3.1
Successfully installed treetop-1.4.8
Successfully installed mail-2.2.9
Successfully installed actionmailer-3.0.1
Successfully installed rake-0.8.7
Successfully installed thor-0.14.4
Successfully installed railties-3.0.1
Successfully installed bundler-1.0.3
Successfully installed rails-3.0.1
24 gems installed
Installing ri documentation for activesupport-3.0.1...
Installing ri documentation for builder-2.1.2...
ERROR:  While generating documentation for builder-2.1.2
... MESSAGE:   Unhandled special: Special: type=17, text="<!-- HI -->"
... RDOC args: --ri --op /opt/local/lib/ruby/gems/1.8/doc/builder-2.1.2/ri --title Builder -- Easy XML Building --main README --line-numbers --quiet lib CHANGES Rakefile README doc/releases/builder-1.2.4.rdoc doc/releases/builder-2.0.0.rdoc doc/releases/builder-2.1.1.rdoc --title builder-2.1.2 Documentation
(continuing with the rest of the installation)
Installing ri documentation for i18n-0.4.2...
Installing ri documentation for activemodel-3.0.1...
Installing ri documentation for rack-1.2.1...
Installing ri documentation for rack-test-0.5.6...
Installing ri documentation for rack-mount-0.6.13...
Installing ri documentation for tzinfo-0.3.23...
Installing ri documentation for abstract-1.0.0...
Installing ri documentation for erubis-2.6.6...
Installing ri documentation for actionpack-3.0.1...
Installing ri documentation for arel-1.0.1...
Installing ri documentation for activerecord-3.0.1...
Installing ri documentation for activeresource-3.0.1...
Installing ri documentation for mime-types-1.16...
Installing ri documentation for polyglot-0.3.1...
Installing ri documentation for treetop-1.4.8...
Installing ri documentation for mail-2.2.9...
Installing ri documentation for actionmailer-3.0.1...
Installing ri documentation for rake-0.8.7...
Installing ri documentation for thor-0.14.4...
Installing ri documentation for railties-3.0.1...
Installing ri documentation for bundler-1.0.3...
Installing ri documentation for rails-3.0.1...
File not found: lib
</pre>]]>
    </content>
</entry>

<entry>
    <title>mac の開発環境構築 〜RubyGems〜</title>
    <link rel="alternate" type="text/html" href="http://www.sysgathe.com/2010/11/mac-rubygems.html" />
    <id>tag:www.sysgathe.com,2010://1.84</id>

    <published>2010-11-06T14:19:30Z</published>
    <updated>2010-11-06T08:31:26Z</updated>

    <summary> RubyGemsは、Ruby の標準パッケージ管理システム...</summary>
    <author>
        <name>dugong</name>
        <uri>http://www.sysgathe.com</uri>
    </author>
    
        <category term="mac環境" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://www.sysgathe.com/">
        <![CDATA[ <p>RubyGemsは、Ruby の標準パッケージ管理システムになります。</p>
<p>RubyのライブラリはRubyGemsでインストールしますので、macportsではRubyGemsをインストールします。</p>
<p>まずはデフォルトのgemバージョンの確認</p>
<pre>
$ gem -v
1.3.5
</pre>
<p>portsの確認</p>
<pre>
$ port search gems
・・・
rb-rubygems @1.3.7 (ruby, devel)
    a package management framework for Ruby
</pre>
<p>インストール</p>
<pre>
$ sudo port install rb-rubygems
</pre>
<p>ターミナルを再起動してバージョン確認</p>
<pre>
$ gem -v
1.3.7
</pre>]]>
        <![CDATA[<p>インストールログ</p>
<pre>
$ sudo port install rb-rubygems
Password:
--->  Computing dependencies for rb-rubygems
--->  Fetching rb-rubygems
--->  Attempting to fetch rubygems-1.3.7.tgz from http://distfiles.macports.org/ruby
--->  Verifying checksum(s) for rb-rubygems
--->  Extracting rb-rubygems
--->  Applying patches to rb-rubygems
--->  Configuring rb-rubygems
--->  Building rb-rubygems
--->  Staging rb-rubygems into destroot
--->  Installing rb-rubygems @1.3.7_0+ruby
--->  Activating rb-rubygems @1.3.7_0+ruby
--->  Cleaning rb-rubygems
</pre>]]>
    </content>
</entry>

<entry>
    <title>mac の開発環境構築 〜ruby〜</title>
    <link rel="alternate" type="text/html" href="http://www.sysgathe.com/2010/11/mac-ruby.html" />
    <id>tag:www.sysgathe.com,2010://1.83</id>

    <published>2010-11-06T13:56:40Z</published>
    <updated>2010-11-06T08:17:17Z</updated>

    <summary> お次はruby。  いつものようにデフォルトバージョン確認...</summary>
    <author>
        <name>dugong</name>
        <uri>http://www.sysgathe.com</uri>
    </author>
    
        <category term="mac環境" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://www.sysgathe.com/">
        <![CDATA[ <p>お次はruby。</p>
 <p>いつものようにデフォルトバージョン確認。</p>
<pre>
$ ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
</pre>
<p>portsの確認</p>
<pre>
$ port search ruby
・・・
ruby @1.8.7-p302 (lang, ruby)
    Powerful and clean object-oriented scripting language

ruby186 @1.8.6-p399 (lang, ruby)
    Powerful and clean object-oriented scripting language

ruby19 @1.9.2-p0 (lang, ruby)
    Powerful and clean object-oriented scripting language
・・・
</pre>
<p>今回は1.8.7系をインストールしたい。（デフォルトで入ってたのと同じバージョン）でもmacportsで管理したいから、あえてインストールすることに。</p>
<p>関連モジュールはと。</p>
<pre>
$ port variants ruby
ruby has the variants:
   mactk: enable MacTk (Tk.framework without X11) support
     * conflicts with tk
   no_doc: do not install rdoc documents
[+]thread_hooks: apply Apple's thread_hooks patch
   tk: enable tk support
     * conflicts with mactk
   universal: Build for multiple architectures
</pre>
<p>特にいらないね。</p>
<p>では。インストール。</p>
<pre>
$ sudo port install ruby
</pre>
<p>ターミナルを再起動してバージョン確認。</p>
<pre>
$ ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-darwin10]
</pre>
<p>当然バージョンは一緒なんだけど、patchlevelが最新版にかわってますね＾＾</p>
]]>
        <![CDATA[<p>インストールログ</p>
<pre>
$ sudo port install ruby
Password:
--->  Computing dependencies for ruby
--->  Fetching ruby
--->  Attempting to fetch ruby-1.8.7-p302.tar.bz2 from ftp://ftp.iij.ad.jp/pub/lang/ruby/1.8
--->  Verifying checksum(s) for ruby
--->  Extracting ruby
--->  Applying patches to ruby
--->  Configuring ruby
--->  Building ruby
--->  Staging ruby into destroot
--->  Installing ruby @1.8.7-p302_0+thread_hooks
--->  Activating ruby @1.8.7-p302_0+thread_hooks
--->  Cleaning ruby
</pre>]]>
    </content>
</entry>

<entry>
    <title>mac の開発環境構築 〜perl〜</title>
    <link rel="alternate" type="text/html" href="http://www.sysgathe.com/2010/11/mac-perl-1.html" />
    <id>tag:www.sysgathe.com,2010://1.82</id>

    <published>2010-11-06T12:06:39Z</published>
    <updated>2010-11-06T07:43:26Z</updated>

    <summary> お次はperlをインストールします。  まずはデフォルトバ...</summary>
    <author>
        <name>dugong</name>
        <uri>http://www.sysgathe.com</uri>
    </author>
    
        <category term="mac環境" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://www.sysgathe.com/">
        <![CDATA[ <p>お次はperlをインストールします。</p>
 <p>まずはデフォルトバージョンの確認</p>
<pre>
$ perl -v

This is perl, v5.8.9 built for darwin-2level
</pre>
<p>続いてmacportsの確認</p>
<pre>
$ port search perl
・・・
perl5 @5.8.9 (lang)
    Wrapper port for perl 5.x

perl5.10 @5.10.1 (lang)
    Perl 5.10.x - Practical Extraction and Report Language

perl5.12 @5.12.2 (lang)
    Perl 5.12.x - Practical Extraction and Report Language

perl5.8 @5.8.9 (lang)
    Perl 5.8.x - Practical Extraction and Report Language
・・・
</pre>
<p>とりあえず最新バージョンをインストールすることに。</p>
<p>関連モジュールの検索</p>
<pre>
$ port variants perl5.12
perl5.12 has the variants:
   dtrace: Build with DTrace probes
   mangle_names: mangle the installed names by appending -5.12 to avoid
                 conflicting with perl5.8 and perl5.10
   shared: Build shared perl library
   threads: Build with thread support
   universal: Build for multiple architectures
</pre>
<p>特にこれが必要！てのは無さそうなので、単体でインストールすることに。</p>
<pre>
$ sudo port install perl5.12
・・・
Error: Target org.macports.activate returned: Image error: /opt/local/bin/a2p is being used by the active perl5.8 port.  Please deactivate this port first, or use 'port -f activate perl5.12' to force the activation.
Log for perl5.12 is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_perl5.12/main.log
Error: Status 1 encountered during processing.
To report a bug, see &lt;http://guide.macports.org/#project.tickets&gt;
</pre>
<p>なんかエラーでた。</p>
<p>perl5.8 が　port を使用中なので、そいつを停止させるか perl5.12 が使うように指示を出してください（？）</p>
<p>!!! そういえば、phpをインストールしたときにperlも一緒にインストールされていたような・・・。</p>
<p><a href="http://www.sysgathe.com/2010/10/mac-php.html">mac の開発環境構築 〜PHP〜</a></p>
<p>やっぱり。。</p>
<p>念のため、今までにインストールされたパッケージを確認。</p>
<pre>
$ port installed
The following ports are currently installed:
  apache-ant @1.8.1_0 (active)
  apache2 @2.2.16_0+preforkmpm
  apache2 @2.2.17_0+preforkmpm (active)
  apr @1.4.2_1 (active)
  apr-util @1.3.9_2 (active)
  autoconf @2.68_0 (active)
  autoconf213 @2.13_1 (active)
  automake @1.11.1_0 (active)
  bzip2 @1.0.6_0 (active)
  curl @7.21.2_1+ssl (active)
  curl-ca-bundle @7.21.2_0 (active)
  cyrus-sasl2 @2.1.23_3+kerberos (active)
  db46 @4.6.21_6 (active)
  expat @2.0.1_1 (active)
  freetype @2.4.3_0 (active)
  gawk @3.1.8_0 (active)
  gettext @0.18.1.1_2 (active)
  gperf @3.0.4_0 (active)
  gsed @4.2.1_0 (active)
  help2man @1.38.2_0 (active)
  jpeg @8b_0 (active)
  libiconv @1.13.1_0 (active)
  libidn @1.19_0 (active)
  libmcrypt @2.5.8_1 (active)
  libpng @1.2.44_0 (active)
  libtool @2.4_0 (active)
  libxml2 @2.7.7_0 (active)
  m4 @1.4.15_0 (active)
  mhash @0.9.9.9_0 (active)
  mysql5 @5.1.51_0 (active)
  mysql5-server @5.1.51_0 (active)
  ncurses @5.7_1 (active)
  ncursesw @5.7_1 (active)
  neon @0.29.5_0 (active)
  openssl @1.0.0a_0
  openssl @1.0.0a_1 (active)
  p5-locale-gettext @1.05_3 (active)
  pcre @8.10_0 (active)
  perl5 @5.8.9_0 (active)
  perl5.12 @5.12.2_0
  perl5.8 @5.8.9_3 (active)
  php5 @5.3.3_2+apache2+pear (active)
  php5-curl @5.3.3_0 (active)
  php5-gd @5.3.3_0 (active)
  php5-mbstring @5.3.3_0 (active)
  php5-mcrypt @5.3.3_0 (active)
  php5-mysql @5.3.3_0+mysqlnd (active)
  php5-sqlite @5.3.3_0 (active)
  php5-tidy @5.3.3_0 (active)
  php5-zip @5.3.3_0 (active)
  phpmyadmin @3.3.5.1_0 (active)
  pkgconfig @0.25_1 (active)
  readline @6.1.002_0 (active)
  serf @0.7.0_0 (active)
  sqlite3 @3.7.3_0 (active)
  subversion @1.6.13_0 (active)
  tidy @20090325_0 (active)
  zlib @1.2.5_0 (active)
</pre>
<p>perl5.12もちゃんとインストールされたけどactiveじゃないよ。ってことだね。</p>
<p>とりあえずOKにしておきましょう。5.12が必要になったらそのときにactiveにすればヨシ。</p>
<p>参考サイト：<a href="http://ash.roova.jp/perl-to-the-people/install-perl-macports.html">PerlをMacPortsからインストールする</a></p>]]>
        <![CDATA[<p>インストールログ</p>
<pre>
$ sudo port install perl5.12
Password:
--->  Computing dependencies for perl5.12
--->  Fetching perl5.12
--->  Attempting to fetch perl-5.12.2.tar.bz2 from http://distfiles.macports.org/perl5.12
--->  Verifying checksum(s) for perl5.12
--->  Extracting perl5.12
--->  Applying patches to perl5.12
--->  Configuring perl5.12
--->  Building perl5.12
--->  Staging perl5.12 into destroot
--->  Installing perl5.12 @5.12.2_0
--->  Activating perl5.12 @5.12.2_0
Error: Target org.macports.activate returned: Image error: /opt/local/bin/a2p is being used by the active perl5.8 port.  Please deactivate this port first, or use 'port -f activate perl5.12' to force the activation.
Log for perl5.12 is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_perl5.12/main.log
Error: Status 1 encountered during processing.
To report a bug, see  &lt;http://guide.macports.org/#project.tickets&gt;
</pre>]]>
    </content>
</entry>

<entry>
    <title>mac の開発環境構築 〜起動コマンドのエイリアス〜</title>
    <link rel="alternate" type="text/html" href="http://www.sysgathe.com/2010/11/mac-1.html" />
    <id>tag:www.sysgathe.com,2010://1.80</id>

    <published>2010-11-03T17:25:39Z</published>
    <updated>2010-11-03T10:17:22Z</updated>

    <summary> いちいち長ったらしいパスから起動するのは面倒なので、エイリ...</summary>
    <author>
        <name>dugong</name>
        <uri>http://www.sysgathe.com</uri>
    </author>
    
        <category term="mac環境" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://www.sysgathe.com/">
        <![CDATA[ <p>いちいち長ったらしいパスから起動するのは面倒なので、エイリアスの設定をしておきましょう。</p>
<pre>
$  vi ~/.bash_profile

alias apache_start="sudo /opt/local/apache2/bin/apachectl start"
alias apache_stop="sudo /opt/local/apache2/bin/apachectl stop"
alias apache_restart="sudo /opt/local/apache2/bin/apachectl restart"
</pre>
<p>参考サイト：<a href="http://creazy.net/2010/01/install_macports_snow_leopard.html">Snow LeopardなMacBookにMacPortsで開発環境入れ直し（Apache2/PHP5/MySQL5/PostgreSQL8.3）</a></p>
]]>
        
    </content>
</entry>

<entry>
    <title>mac の開発環境構築 〜phpmyadmin〜</title>
    <link rel="alternate" type="text/html" href="http://www.sysgathe.com/2010/11/mac-phpmyadmin.html" />
    <id>tag:www.sysgathe.com,2010://1.79</id>

    <published>2010-11-03T16:47:20Z</published>
    <updated>2010-11-03T10:17:01Z</updated>

    <summary> 続いてphpmyadminをインストール $ port s...</summary>
    <author>
        <name>dugong</name>
        <uri>http://www.sysgathe.com</uri>
    </author>
    
        <category term="mac環境" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://www.sysgathe.com/">
        <![CDATA[ <p>続いてphpmyadminをインストール</p>
<pre>
$ port search phpmyadmin
phpmyadmin @3.3.5.1 (www, php, databases)
    A tool written in PHP intended to handle the administration of MySQL over
    the Web.
</pre>
<p>macportsの扱いにもそろそろ慣れてきましたね。</p>
<pre>
$ sudo port install phpmyadmin
・・・
A new configuration file has been created at /opt/local/www/phpmyadmin/config.inc.php.
Please refer to the phpMyAdmin documentation when editing this file,
an online version of which can be found at http://www.phpmyadmin.netdocumentation/Documentation.html#config
・・・
</pre>
<p>設定ファイルが作成されたので編集してください。と</p>
<p>デフォルトの設定ファイルをバックアップ</p>
<pre>
$ sudo cp /opt/local/www/phpmyadmin/config.inc.php /opt/local/www/phpmyadmin/config.inc.php.bak
</pre>
<p>設定ファイルを編集</p>
<pre>
$ sudo vi /opt/local/www/phpmyadmin/config.inc.php

// conneatタイプをsocketに変更
$cfg['Servers'][$i]['connect_type'] = 'socket';
// socket接続先を追加
$cfg['Servers'][$i]['socket'] = '/opt/local/var/run/mysql5/mysqld.sock';
</pre>

<p>Apacheに接続先を追加</p>
<pre>
&lt;Directory /opt/local/www/phpmyadmin&gt;
    Options FollowSymLinks
    AllowOverride All
    Order deny,allow
    Deny from all
    Allow from all
&lt;/Directory&gt;
Alias /phpMyAdmin /opt/local/www/phpmyadmin
</pre>
<p>apacheを再起動</p>
<pre>
$ sudo /opt/local/apache2/bin/apachectl restart
</pre>
<p>http://localhost/phpMyAdmin/ に接続。MySQLのID、passでログイン。OK＾＾v</p>
<p>参考サイト：<a href="http://tech.caph.jp/2009/11/10/macports%E3%81%A7phpmyadmin%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB/">MacPortsでphpMyAdminをインストール</a></p>]]>
        <![CDATA[<p>インストールログ</p>
<pre>
$ sudo port install phpmyadmin
--->  Computing dependencies for phpmyadmin
--->  Fetching phpmyadmin
--->  Attempting to fetch phpMyAdmin-3.3.5.1-all-languages.tar.bz2 from http://jaist.dl.sourceforge.net/phpmyadmin
--->  Verifying checksum(s) for phpmyadmin
--->  Extracting phpmyadmin
--->  Configuring phpmyadmin
--->  Building phpmyadmin
--->  Staging phpmyadmin into destroot
--->  Installing phpmyadmin @3.3.5.1_0
--->  Activating phpmyadmin @3.3.5.1_0
A new configuration file has been created at /opt/local/www/phpmyadmin/config.inc.php.
Please refer to the phpMyAdmin documentation when editing this file,
an online version of which can be found at http://www.phpmyadmin.netdocumentation/Documentation.html#config

--->  Cleaning phpmyadmin
</pre>]]>
    </content>
</entry>

<entry>
    <title>mac の開発環境構築 〜php5-mysql〜</title>
    <link rel="alternate" type="text/html" href="http://www.sysgathe.com/2010/11/mac-php5-mysql.html" />
    <id>tag:www.sysgathe.com,2010://1.78</id>

    <published>2010-11-03T14:26:16Z</published>
    <updated>2010-11-03T10:16:34Z</updated>

    <summary> PHPから使えるようにphp5-mysqlをインストール ...</summary>
    <author>
        <name>dugong</name>
        <uri>http://www.sysgathe.com</uri>
    </author>
    
        <category term="mac環境" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://www.sysgathe.com/">
        <![CDATA[ <p>PHPから使えるようにphp5-mysqlをインストール</p>
<pre>
$ sudo port install php5-mysql
・・・
###########################################################
# 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 port load apache2
###########################################################
Note: apache2 installs files outside the common directory structure.
・・・
</pre>
<p>apache2をloadしてくださいとのこと。</p>
<pre>
$ sudo port load apache2
Password:
Error: Target org.macports.load returned: org.macports.apache2: Already loaded
Log for apache2 is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_apache2/main.log
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>
</pre>
<p>またまたエラー。もう入ってます。ですって。</p>
<p>php.iniのdefault_socketを設定します。</p>
<pre>
$ sudo vi /opt/local/etc/php5/php.ini

pdo_mysql.default_socket=/opt/local/var/run/mysql5/mysqld.sock
mysql.default_socket =/opt/local/var/run/mysql5/mysqld.sock
mysqli.default_socket =/opt/local/var/run/mysql5/mysqld.sock
</pre>
<p>apacheを再起動してphpinfoで確認。OK！</p>
<p>参考サイト：<a href="http://d.hatena.ne.jp/gin0606/20100817/1282058561">macportsでMac Snow LeopardにApache2 + PHP5 + MySQL5 を入れる</a></p>
]]>
        <![CDATA[<p>インストールログ</p>
<pre>
$ sudo port install php5-mysql

--->  Computing dependencies for openssl
--->  Fetching openssl
--->  Verifying checksum(s) for openssl
--->  Extracting openssl
--->  Applying patches to openssl
--->  Configuring openssl
--->  Building openssl
--->  Staging openssl into destroot
--->  Computing dependencies for openssl
--->  Installing openssl @1.0.0a_1
--->  Deactivating openssl @1.0.0a_0
--->  Cleaning openssl
--->  Activating openssl @1.0.0a_1
--->  Cleaning openssl
--->  Computing dependencies for apache2
--->  Fetching apache2
--->  Attempting to fetch httpd-2.2.17.tar.bz2 from ftp://ftp.infoscience.co.jp/pub/net/apache/dist/httpd
--->  Attempting to fetch httpd-2.2.17.tar.bz2 from http://distfiles.macports.org/apache2
--->  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 port load apache2
###########################################################
Note: apache2 installs files outside the common directory structure.
--->  Computing dependencies for apache2
--->  Installing apache2 @2.2.17_0+preforkmpm
--->  Deactivating apache2 @2.2.16_0+preforkmpm
--->  Cleaning apache2
--->  Activating apache2 @2.2.17_0+preforkmpm
--->  Cleaning apache2
--->  Computing dependencies for php5-mysql
--->  Cleaning php5-mysql
</pre>]]>
    </content>
</entry>

<entry>
    <title>mac の開発環境構築 〜MySQL〜</title>
    <link rel="alternate" type="text/html" href="http://www.sysgathe.com/2010/11/mac-mysql.html" />
    <id>tag:www.sysgathe.com,2010://1.77</id>

    <published>2010-11-03T12:16:36Z</published>
    <updated>2010-11-03T10:15:53Z</updated>

    <summary> 続いてMySQLをインストール。 まずはデフォルトのMyS...</summary>
    <author>
        <name>dugong</name>
        <uri>http://www.sysgathe.com</uri>
    </author>
    
        <category term="mac環境" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://www.sysgathe.com/">
        <![CDATA[ <p>続いてMySQLをインストール。</p>
<p>まずはデフォルトのMySQLの確認</p>
<pre>
$ mysql -v
-bash: mysql: command not found
$ ps ax | grep mysql
</pre>
<p>あれ？デフォルトでMySQLは入ってなかったかな？？</p>
<p>ではMacPortsでインストールできるMySQLバージョンの確認</p>
<pre>
$ port search mysql
・・・
mysql4 @4.1.22 (databases)
    Multithreaded SQL database server

mysql5 @5.1.51 (databases)
    Multithreaded SQL database server

mysql5-devel @5.5.2-m2 (databases)
    Multithreaded SQL database server

mysql5-server @5.1.51 (databases)
    Multithreaded SQL database server

mysql5-server-devel @5.5.2-m2 (databases)
    Multithreaded SQL database server
・・・
</pre>
<p>インストール時に指定できる variants を確認</p>
<pre>
$ port variants mysql5-server
mysql5-server has no variants
</pre>
<p>mysql5-serverをインストール</p>
<pre>
$ sudo port install mysql5-server
・・・
###########################################################
# A startup item has been generated that will aid in
# starting mysql5-server with launchd. It is disabled
# by default. Execute the following command to start it,
# and to cause it to launch at startup:
#
# sudo port load mysql5-server
###########################################################
--->  Installing mysql5-server @5.1.51_0
******************************************************
* In order to setup the database, you might want to run
* sudo -u _mysql mysql_install_db5
* if this is a new install
******************************************************
・・・
</pre>
<p>mysql5-serverをloadしてください。といわれるので、いわれるまま叩いてみる。</p>
<pre>
$ sudo port load mysql5-server
</pre>
<p>お次もいわれるがまま</p>
<pre>
$ sudo -u _mysql mysql_install_db5
Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/opt/local/lib/mysql5/bin/mysqladmin -u root password 'new-password'
/opt/local/lib/mysql5/bin/mysqladmin -u root -h macmini.local password 'new-password'

Alternatively you can run:
/opt/local/lib/mysql5/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /opt/local ; /opt/local/lib/mysql5/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /opt/local/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /opt/local/lib/mysql5/bin/mysqlbug script!
</pre>
<p>パスワードを設定してください。とのことです。</p>
<pre>
$ sudo /opt/local/lib/mysql5/bin/mysqladmin -u root password 'new-password'
/opt/local/lib/mysql5/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/opt/local/var/run/mysql5/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/opt/local/var/run/mysql5/mysqld.sock' exists!
</pre>
<p>おっと？connectがつながらないですって！</p>
<p>とりあえず起動してみることに</p>
<pre>
$ sudo /opt/local/share/mysql5/mysql/mysql.server start
Password:
Starting MySQL
. SUCCESS! 
</pre>
<p>もいちどトライ</p>
<pre>
$ sudo /opt/local/lib/mysql5/bin/mysqladmin -u root password 'new-password'
</pre>
<p>今度はうまく通ったみたい。</p>
<p>ログインしてみる</p>
<pre>
$ /opt/local/lib/mysql5/bin/mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.1.51 Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> 
</pre>
<p>「mysql5」コマンドで操作できるみたい。</p>]]>
        <![CDATA[<p>インストールログ</p>
<pre>
$ sudo port install mysql5-server
Password:
--->  Computing dependencies for mysql5-server
--->  Dependencies to be installed: mysql5
--->  Fetching mysql5
--->  Attempting to fetch mysql-5.1.51.tar.gz from http://distfiles.macports.org/mysql5
--->  Verifying checksum(s) for mysql5
--->  Extracting mysql5
--->  Applying patches to mysql5
--->  Configuring mysql5
--->  Building mysql5
--->  Staging mysql5 into destroot
--->  Installing mysql5 @5.1.51_0
The MySQL client has been installed.
If you also want a MySQL server, install the mysql5-server port.
--->  Activating mysql5 @5.1.51_0
--->  Cleaning mysql5
--->  Fetching mysql5-server
--->  Verifying checksum(s) for mysql5-server
--->  Extracting mysql5-server
--->  Configuring mysql5-server
--->  Building mysql5-server
--->  Staging mysql5-server into destroot
--->  Creating launchd control script
###########################################################
# A startup item has been generated that will aid in
# starting mysql5-server with launchd. It is disabled
# by default. Execute the following command to start it,
# and to cause it to launch at startup:
#
# sudo port load mysql5-server
###########################################################
--->  Installing mysql5-server @5.1.51_0
******************************************************
* In order to setup the database, you might want to run
* sudo -u _mysql mysql_install_db5
* if this is a new install
******************************************************
--->  Activating mysql5-server @5.1.51_0
--->  Cleaning mysql5-server
</pre>]]>
    </content>
</entry>

</feed>

