<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>chibiegg日誌 &#187; OSX Server</title>
	<atom:link href="http://blog.chibiegg.net/tag/osx-server/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.chibiegg.net</link>
	<description>chibiegg’s Diary</description>
	<lastBuildDate>Mon, 16 Aug 2010 07:34:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Mac OS X Leopard Server で WordPress の自動アップデート</title>
		<link>http://blog.chibiegg.net/2010/01/11_12_462.htm</link>
		<comments>http://blog.chibiegg.net/2010/01/11_12_462.htm#comments</comments>
		<pubDate>Mon, 11 Jan 2010 03:09:52 +0000</pubDate>
		<dc:creator>chibiegg</dc:creator>
				<category><![CDATA[Webサーバー]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[OSX Server]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.chibiegg.net/?p=462</guid>
		<description><![CDATA[以前の記事で、WordPressでの自動アップデートを成功させるためには、FTP_BASEやFTP_CONTENT_DIRやFTP_PLUGIN_DIRを定義すればよいと記事に書きました。
が、その記事に書いた通りLin [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.chibiegg.net/2009/02/24_20_259.htm">以前の記事で</a>、WordPressでの自動アップデートを成功させるためには、FTP_BASEやFTP_CONTENT_DIRやFTP_PLUGIN_DIRを定義すればよいと記事に書きました。</p>
<p>が、その記事に書いた通りLinux(Debian)では正しく動作していたのにLeopard Serverにしてからうまく行かなくなっていました。</p>
<p>しかも「<strong>ディレクトリが見つかりません</strong>」というようなわかりやすいエラーではなく「<strong>ファイルをコピーできませんでした</strong>」というエラー&#8230;<br />
表示されるパスには間違いはないし、パーミッションも777にしてみても(すでになっている)駄目。</p>
<p>ちなみに「<strong>ファイルをコピーできませんでした</strong>」というエラーはPHPがセーフモードで動いている場合によく出るそうですが、今回はセーフモードで動かしてはいません。</p>
<p>で、諦めていたのですが、いっそのことFTP_BASEやFTP_CONTENT_DIRやFTP_PLUGIN_DIRの定義をコメントアウト(削除)してみるとなんとすんなり成功。</p>
<p><strong>（下部の追記参照）</strong></p>
<p>ということで、セーフモードでもないのに「<strong>ファイルをコピーできませんでした</strong>」と言われた時は一度FTPのディレクトリ設定を削除してみるのも手かもしれません。</p>
<p><strong><span style="color: #ff0000;">追記</span></strong></p>
<p>どうやらCodexのFTP_BASE等の説明には「インストールした WordPress のベースフォルダへのフルパス。」と書いてあるので&#8221;サーバー内でのフルパス&#8221;だと思っていたのですが、<span style="text-decoration: line-through;">少なくともOSXでは&#8221;FTPでアクセスした時のパス&#8221;が正しいようです。（OSの問題では無いようなな気もしますが）</span></p>
<p>Codexにも「FTPユーザとしてサーバ上にある各フォルダへのパスが分かっていれば&#8230;」とあるので&#8221;FTPでアクセスした時のパス&#8221;が正しいようです。</p>
<p>つまり「/Users/name/Sites/wp-content/」ではなくFTPから見た時のパスなので「/Sites/wp-content/」とするとFTP_BASE等を定義しても自動アップデートできました。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chibiegg.net/2010/01/11_12_462.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OSX Server 10.5.8 で PHP+GD</title>
		<link>http://blog.chibiegg.net/2009/11/13_22_432.htm</link>
		<comments>http://blog.chibiegg.net/2009/11/13_22_432.htm#comments</comments>
		<pubDate>Fri, 13 Nov 2009 13:41:19 +0000</pubDate>
		<dc:creator>chibiegg</dc:creator>
				<category><![CDATA[サーバー管理]]></category>
		<category><![CDATA[GD]]></category>
		<category><![CDATA[Leopard]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[OSX Server]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.chibiegg.net/?p=432</guid>
		<description><![CDATA[アップデートしたときにPHPのバージョンも変更(5.2.10)されていたことに気づかず、GDが入っていないPHPに置き換えられていたので再度PHPをGD付きでコンパイルしたのでメモ。
各ライブラリの今回利用したバージョン [...]]]></description>
			<content:encoded><![CDATA[<p>アップデートしたときにPHPのバージョンも変更(5.2.10)されていたことに気づかず、GDが入っていないPHPに置き換えられていたので再度PHPをGD付きでコンパイルしたのでメモ。</p>
<p>各ライブラリの今回利用したバージョンは以下の通り。</p>
<ul>
<li>libpng 1.2.40</li>
<li>libjpeg jpeg-7</li>
<li>gd 2.0.35</li>
<li>php 5.2.10</li>
</ul>
<p>PHPをMacでコンパイルするとlibiconv関係でリンク時にエラーが出る問題があるそうなのでext/iconv/iconv.cの196行目あたりを以下のように書き換えてからコンパイルに移ります。(<a href="http://bugs.php.net/bug.php?id=49267">参照:PHP Bugs: #49267: Linking fails for iconv: &#8220;Undefined symbols: _libiconv&#8221;</a>)<br />
Before</p>
<blockquote><p>#ifdef HAVE_LIBICONV<br />
#define iconv libiconv<br />
#endif</p></blockquote>
<p>After</p>
<blockquote><p>#ifdef HAVE_LIBICONV<br />
#define iconv iconv<br />
#endif</p></blockquote>
<p>実行した手順だけを載せます。</p>
<pre><code>
$ cd ~/Downloads/src/libpng-1.2.40
$ CFLAGS="-arch x86_64" CCFLAGS="-arch x86_64" CXXFLAGS="-arch x86_64" LDFLAGS="-arch x86_64" ./configure
$ make
$ sudo make install

$ cd ~/Downloads/src/gd-2.0.35
$ CFLAGS="-arch x86_64" ./configure
$ cp libtool ../jpeg-7/
$ cd ../jpeg-7/
$ MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS="-arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch x86_64 -g -Os -pipe" CXXFLAGS="-arch x86_64 -g -Os -pipe" LDFLAGS="-arch x86_64 -bind_at_load" ./configure --enable-shared
$ make
$ sudo make install

$ cd ~/Downloads/src/gd-2.0.35
$ MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS="-arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch x86_64 -g -Os -pipe" CXXFLAGS="-arch x86_64 -g -Os -pipe" LDFLAGS="-arch x86_64 -bind_at_load" ./configure --with-zlib-dir=/usr --with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/X11R6 --with-freetype-dir=/usr/X11R6 --with-xpm-dir=/usr/X11R6
$ make
$ sudo make install

$ cd ~/Downloads/src/php-5.2.10
$ MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS="-arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch x86_64 -g -Os -pipe" CXXFLAGS="-arch x86_64 -g -Os -pipe" LDFLAGS="-arch x86_64 -bind_at_load" ./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --disable-dependency-tracking --with-apxs2=/usr/sbin/apxs --with-ldap=/usr --with-kerberos=/usr --enable-cli --with-zlib-dir=/usr --enable-trans-sid --with-xml --enable-exif --enable-ftp --enable-mbstring --enable-mbregex --enable-dbx --enable-sockets --with-iodbc=/usr --with-curl=/usr --with-config-file-path=/etc --sysconfdir=/private/etc --with-mysql-sock=/var/mysql --with-mysqli=/usr/bin/mysql_config --with-mysql=/usr --with-openssl --with-xmlrpc --with-xsl=/usr --without-pear --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-freetype-dir=/usr/X11R6 --with-gd=/usr/local
$ make
$ make test
$ sudo make install
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.chibiegg.net/2009/11/13_22_432.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OSX Server 10.5.7 で PHP+GD</title>
		<link>http://blog.chibiegg.net/2009/07/06_21_372.htm</link>
		<comments>http://blog.chibiegg.net/2009/07/06_21_372.htm#comments</comments>
		<pubDate>Mon, 06 Jul 2009 12:27:26 +0000</pubDate>
		<dc:creator>chibiegg</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[サーバー管理]]></category>
		<category><![CDATA[Leopard]]></category>
		<category><![CDATA[OSX Server]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.chibiegg.net/?p=372</guid>
		<description><![CDATA[先日Mac OSX Server Leopard を更新してからWordPressでサムネイルが作成されなくなったなぁと思っていたのですが、アップデートの際に以前GDをServerにインストールしたときからPHPのバージ [...]]]></description>
			<content:encoded><![CDATA[<p>先日Mac OSX Server Leopard を更新してからWordPressでサムネイルが作成されなくなったなぁと思っていたのですが、アップデートの際に<a href="http://blog.chibiegg.net/2009/04/03_21_263.htm">以前GDをServerにインストールしたとき</a>からPHPのバージョンが5.2.8に変更されていたのでまたGDのついていないPHPのバイナリに交換されてしまったようです。ということで、<a href="http://blog.chibiegg.net/2009/04/03_21_263.htm">以前</a>と同様にGDをインストールしました。方法は以前の「<a href="http://blog.chibiegg.net/2009/04/03_21_263.htm">OSX Server 10.5 (64bit)でPHP+GD</a>」を参照していただくとして、今回利用した各ライブラリのバージョンは以下の通りです。それをメモするだけなので日記ということで、適当な更新です。</p>
<ul>
<li>PHP 5.2.8</li>
<li>libgd 2.0.35</li>
<li>libpng 1.2.37</li>
<li>libjpeg(jpeg v7)</li>
</ul>
<p>コンパイル時にはいくつか注意点が&#8230;</p>
<p><span id="more-372"></span></p>
<p>jpeg-6bではなくjpeg-7にディレクトリ名が変っていることに注意します。また、libjpegのconfigureの際に複数のアーキテクチャーの指定ができなくなったようなので以下のようにしました。</p>
<p>$ MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS=&#8221;-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp&#8221; CCFLAGS=&#8221;-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe&#8221; CXXFLAGS=&#8221;-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe&#8221; LDFLAGS=&#8221;-arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load&#8221; ./configure &#8211;enable-shared</p>
<p>それに伴いlibgdのconfigureでも複数のアーキテクチャーを指定できませんので以下のようにします。</p>
<p>$ MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS=&#8221;-arch x86_64 -g -Os -pipe -no-cpp-precomp&#8221; CCFLAGS=&#8221;-arch x86_64 -g -Os -pipe&#8221; CXXFLAGS=&#8221;-arch x86_64 -g -Os -pipe&#8221; LDFLAGS=&#8221;-arch x86_64 -bind_at_load&#8221; ./configure &#8211;with-zlib-dir=/usr &#8211;with-jpeg-dir=/usr/local/lib &#8211;with-png-dir=/usr/X11R6 &#8211;with-freetype-dir=/usr/X11R6 &#8211;with-xpm-dir=/usr/X11R6</p>
<p>phpのmake後にはmake testも実行しておきます。</p>
<p>これで無事GDが使えるようになりました。標準で組み込んでくれるといいのですが&#8230;</p>
<p>phpinfoで確認するとこのようになっています。</p>
<div class="mceTemp mceIEcenter">
<dl id="attachment_375" class="wp-caption aligncenter" style="width: 27px;">
<dt class="wp-caption-dt"><a href="http://blog.chibiegg.net/wp-content/uploads/2009/07/phpinfo.png"><img class="size-medium wp-image-375" title="phpinfo(PHP+GD)" src="http://blog.chibiegg.net/wp-content/uploads/2009/07/phpinfo-17x300.png" alt="phpinfo(PHP+GD)" width="17" height="300" /></a></dt>
</dl>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.chibiegg.net/2009/07/06_21_372.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ImageMagicのインストール</title>
		<link>http://blog.chibiegg.net/2009/04/04_10_271.htm</link>
		<comments>http://blog.chibiegg.net/2009/04/04_10_271.htm#comments</comments>
		<pubDate>Sat, 04 Apr 2009 01:43:36 +0000</pubDate>
		<dc:creator>chibiegg</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[サーバー管理]]></category>
		<category><![CDATA[OSX Server]]></category>

		<guid isPermaLink="false">http://blog.chibiegg.net/?p=271</guid>
		<description><![CDATA[MediaWikiでサムネイルを作成するためにImageMagic(convertコマンド)が必要だったのでインストールします。環境はOSX Server 10.5.6 x86(64bit)です。
ImageMagicの [...]]]></description>
			<content:encoded><![CDATA[<p>MediaWikiでサムネイルを作成するためにImageMagic(convertコマンド)が必要だったのでインストールします。環境はOSX Server 10.5.6 x86(64bit)です。</p>
<p>ImageMagicのページにはMacOSX用のバイナリも用意されているのですが、インストールの方法がまずかったのか利用できなかったのでソースからコンパイルします。</p>
<p>利用できなかった理由は<br />
<code>$ convert -list format</code><br />
で対応フォーマットが表示できるのですが、一つもありませんでした。</p>
<p>一つ前の記事でlibjpegとlibpngがインストールされていることが必要です。<br />
適当な場所にソースをダウンロードして解凍しておきます。この記事では「ImageMagick-6.5.1-0.tar.gz」を利用しました。i386でもいいのですが、せっかくコンパイルするので64bitにしてみます。</p>
<p>ではコンパイルしていきます。x86_64でなくi386であればconfigureのオプションは全て外してください。<br />
<code>$ cd ImageMagick-6.5.1-0<br />
$ CFLAGS="-arch x86_64" CCFLAGS="-arch x86_64" CXXFLAGS="-arch x86_64" LDFLAGS="-arch x86_64" ./configure<br />
$ make<br />
$ sudo make install</code><br />
これで終了です。<br />
<code>$ convert -list format</code><br />
を実行するとずらずらと対応フォーマット一覧が出てきたので成功です。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chibiegg.net/2009/04/04_10_271.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OSX Server 10.5 (64bit)でPHP+GD</title>
		<link>http://blog.chibiegg.net/2009/04/03_21_263.htm</link>
		<comments>http://blog.chibiegg.net/2009/04/03_21_263.htm#comments</comments>
		<pubDate>Fri, 03 Apr 2009 12:16:42 +0000</pubDate>
		<dc:creator>chibiegg</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[サーバー管理]]></category>
		<category><![CDATA[OSX Server]]></category>

		<guid isPermaLink="false">http://blog.chibiegg.net/?p=263</guid>
		<description><![CDATA[OSX Server 10.5を導入したのですが、PHPにGDが入ってないのでlibpng,libjpeg,libgdをコンパイルし、phpを再コンパイルします。
が、apacheが64bitで動いていたので少し難儀した [...]]]></description>
			<content:encoded><![CDATA[<p>OSX Server 10.5を導入したのですが、PHPにGDが入ってないのでlibpng,libjpeg,libgdをコンパイルし、phpを再コンパイルします。<br />
が、apacheが64bitで動いていたので少し難儀したのでメモを。</p>
<p>基本的には<a href="http://y2web.net/blog/computer/sysadmin/osxserver-php-gd-715/">こちら</a>のサイトに従うのですが、アーキテクチャーの指定は<a href="http://log.metatype.jp/?cat=10">こちら</a>のサイトを参考に進めていきます。<br />
ただし、失敗しても良いように既存の「/usr/libexec/apache2/libphp5.so」はバックアップしておいてください。<br />
<span id="more-263"></span><br />
ソースの準備<br />
PHP 5.2.6(既にインストールされているものと同一)<br />
gd 2.0.35<br />
libpng 1.2.35<br />
jpeg-6b<br />
以上を~/srcにでもダウンロードし、全て解凍しておきます。</p>
<p><strong>まずはlibpngのコンパイル</strong><br />
<code>$ cd libpng-1.2.35<br />
$ CFLAGS="-arch x86_64" CCFLAGS="-arch x86_64" CXXFLAGS="-arch x86_64" LDFLAGS="-arch x86_64" ./configure<br />
$ make<br />
$ sudo make install</code></p>
<p><strong>次にlibjpegのコンパイル</strong><br />
<code>$ cd ../gd-2.0.35<br />
$ CFLAGS="-arch x86_64" ./configure<br />
$ cp libtool ../jpeg-6b/.<br />
$ cd ../jpeg-6b<br />
$ MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe" CXXFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe" LDFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load" ./configure --enable-shared<br />
$ make<br />
$ sudo make install</code></p>
<p><strong>次にlibgdのコンパイル</strong><br />
<code>$ cd ../gd-2.0.35<br />
$ sudo ln -s /usr/X11R6/include/fontconfig /usr/local/include<br />
$ MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe" CXXFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe" LDFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load" ./configure --with-zlib-dir=/usr --with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/X11R6 --with-freetype-dir=/usr/X11R6 --with-xpm-dir=/usr/X11R6<br />
$ make<br />
$ sudo make install</code></p>
<p><strong>最後にPHPのコンパイル</strong><br />
<code>$ cd ../php-5.2.6<br />
$ MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS="-arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch x86_64 -g -Os -pipe" CXXFLAGS="-arch x86_64 -g -Os -pipe" LDFLAGS="-arch x86_64 -bind_at_load" ./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --disable-dependency-tracking --with-apxs2=/usr/sbin/apxs --with-ldap=/usr --with-kerberos=/usr --enable-cli --with-zlib-dir=/usr --enable-trans-sid --with-xml --enable-exif --enable-ftp --enable-mbstring --enable-mbregex --enable-dbx --enable-sockets --with-iodbc=/usr --with-curl=/usr --with-config-file-path=/etc --sysconfdir=/private/etc --with-mysql-sock=/var/mysql --with-mysqli=/usr/bin/mysql_config --with-mysql=/usr --with-openssl --with-xmlrpc --with-xsl=/usr --without-pear --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-freetype-dir=/usr/X11R6 --with-gd=/usr/local<br />
$ make<br />
$ sudo make install</code></p>
<p>サーバー管理からWebサーバーの再起動ができれば問題ありません。phpinfoでgdが有効になっていることを確認できれば成功です。<br />
もしもアーキテクチャーが間違っているとwrong architectureなどとログに記録され起動できません。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chibiegg.net/2009/04/03_21_263.htm/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
