2008年1月アーカイブ

開発中に別sessionでテストしたい時など有効

/Applications/Firefox.app/Contents/MacOS/firefox-bin -ProfireManager

でプロファイルマネージャーが起動する。

cpコマンドでパーミッションを保持したい場合、-pオプションをつける。
cp -p hoge.txt

tarコマンドでパーミッションを保持したい場合は、pオプションをつける
tar jxvfp hoge.tar.bz2

tarは作成する時ではなく、解凍する時に、パーミッションが変わる(umask)
という事ですね。

postgresqlを使いたいため、オプションをつける。

$sudo port install php5 +postgresql +apache2 +pear
でインストール

$sudo cp /opt/local/apache2/conf/httpd.conf.sample /opt/local/apache2/conf/httpd.conf
$ sudo cd /opt/local/apache2/modules
$ /opt/local/apache2/bin/apxs -a -e -n "php5" libphp5.so
$ sudo cp /opt/local/etc/php.ini-dist /opt/local/etc/php.ini

/opt/local/apache2/conf/extras-confにmod_phpの設定がある。

$ sudo emacs /opt/local/apache2/conf/httpd.conf
で、
Include conf/extras-conf/mod_php.conf

を追加し、

$sudo /opt/local/apache2/bin/apachectl restart

再起動

$ sudo port install apache2

で可能。

ただ、失敗などしていると、sqlite3の時点で既にエラーで止まる時があった。

その場合、
$ sudo port clean --all sqlite3

自動起動はインストール結果に表示される

sudo launchctl load -w /Library/LaunchDaemons/org.macports.apache2.plist

で良さそう。

$sudo cp /opt/local/apache2/conf/httpd.conf.sample /opt/local/apache2/conf/httpd.conf
で、httpd.confをコピーし、

$sudo /opt/local/apache2/bin/apachectl restart

でスタート

pear upgrade PEAR
を実行すると、
HTTP error, got response: HTTP/1.1 404 Not Found
Didn't receive 200 OK from remote server. (HTTP/1.1 404 Not Found)

とエラーが出される。

調べてみると、どうやらpearに変更があったらしい。

[January 3, 2008]
As promised, XML-RPC has been disabled at pear.php.net. Information is now served via REST files at pear.php.net/rest. If you are using a PEAR version earlier than 1.4.0, you will need to manually upgrade PEAR using direct URLs. To upgrade to the latest PEAR, you can either use go-pear (http://pear.php.net/go-pear) or upgrade using direct URLs:

pear upgrade --force http://pear.php.net/get/Archive_Tar http://pear.php.net/get/XML_Parser http://pear.php.net/get/Console_Getopt
pear upgrade --force http://pear.php.net/get/PEAR-1.4.3.tar
pear upgrade PEAR

解決する為には、上記では駄目で、バージョン依存のエラーが出ました。

下記で、OKでした。色々アップデートして準備しないと駄目なんですね。

# pear upgrade --force http://pear.php.net/get/XML_RPC-1.4.0.tar
# pear upgrade --force http://pear.php.net/get/Archive_Tar
# pear upgrade --force http://pear.php.net/get/PEAR-1.4.0.tar
# pear upgrade --force http://pear.php.net/get/XML_Parser http://pear.php.net/get/Console_Getopt

$ sudo port install postgresql82
$ sudo port install postgresql82-server

自動起動
$ sudo launchctl load -w /Library/LaunchDaemons/org.macports.postgresql82-server.plist

DB作成
To create a database instance, after install do
sudo mkdir -p /opt/local/var/db/postgresql82/defaultdb
sudo chown postgres:postgres /opt/local/var/db/postgresql82/defaultdb
sudo su postgres -c '/opt/local/lib/postgresql82/bin/initdb -D /opt/local/var/db/postgresql82/defaultdb'

To tweak your DBMS, consider increasing kern.sysv.shmmax by adding an increased kern.sysv.shmmax .. to /etc/sysctl.conf

起動
Success. You can now start the database server using:

/opt/local/lib/postgresql82/bin/postgres -D /opt/local/var/db/postgresql82/defaultdb
or
/opt/local/lib/postgresql82/bin/pg_ctl -D /opt/local/var/db/postgresql82/defaultdb -l logfile start

インストール後にコマンドが表示される。エラーはなし。便利。

'/SourceCache/apache_mod_php/apache_mod_php-43/php/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'

このアーカイブについて

このページには、2008年1月に書かれたブログ記事が新しい順に公開されています。

前のアーカイブは2007年12月です。

次のアーカイブは2008年2月です。

最近のコンテンツはインデックスページで見られます。過去に書かれたものはアーカイブのページで見られます。