2013
03.10

Mac Portsを事前にインストールしておく

Hiroto-no-MacBook:~ hiroto$ sudo port variants git-core
git-core has the variants:
   bash_completion: Completion support for bash
[+]credential_osxkeychain: Install git credential-osxkeychain utility from
                           contrib
[+]doc: Install HTML and plaintext documentation
   gitweb: Install gitweb.cgi
[+]pcre
   python26: Use Python 2.6
     * conflicts with python27
[+]python27: Use Python 2.7
     * conflicts with python26
   svn: Bi-directional subversion repository support
   universal: Build for multiple architectures
Hiroto-no-MacBook:~ hiroto$ sudo port install git-core
Password:
--->  Computing dependencies for git-core
--->  Dependencies to be installed: curl curl-ca-bundle libidn gettext expat libiconv ncurses openssl zlib p5.12-error perl5.12 gdbm p5.12-term-readkey pcre bzip2 libedit python27 db46 python_select sqlite3 rsync popt
--->  Fetching archive for curl-ca-bundle
--->  Attempting to fetch curl-ca-bundle-7.29.0_0.darwin_11.noarch.tbz2 from http://packages.macports.org/curl-ca-bundle
--->  Attempting to fetch curl-ca-bundle-7.29.0_0.darwin_11.noarch.tbz2.rmd160 from http://packages.macports.org/curl-ca-bundle
--->  Installing curl-ca-bundle @7.29.0_0
--->  Activating curl-ca-bundle @7.29.0_0
--->  Cleaning curl-ca-bundle
--->  Fetching archive for expat
--->  Attempting to fetch expat-2.1.0_0.darwin_11.x86_64.tbz2 from http://packages.macports.org/expat
--->  Attempting to fetch expat-2.1.0_0.darwin_11.x86_64.tbz2.rmd160 from http://packages.macports.org/expat
--->  Installing expat @2.1.0_0
--->  Activating expat @2.1.0_0
--->  Cleaning expat
--->  Fetching archive for libiconv
--->  Attempting to fetch libiconv-1.14_0.darwin_11.x86_64.tbz2 from http://packages.macports.org/libiconv
--->  Attempting to fetch libiconv-1.14_0.darwin_11.x86_64.tbz2.rmd160 from http://packages.macports.org/libiconv
--->  Installing libiconv @1.14_0
--->  Activating libiconv @1.14_0
--->  Cleaning libiconv
--->  Fetching archive for ncurses
--->  Attempting to fetch ncurses-5.9_2.darwin_11.x86_64.tbz2 from http://packages.macports.org/ncurses
--->  Attempting to fetch ncurses-5.9_2.darwin_11.x86_64.tbz2.rmd160 from http://packages.macports.org/ncurses
--->  Installing ncurses @5.9_2
--->  Activating ncurses @5.9_2
--->  Cleaning ncurses
--->  Fetching archive for gettext
--->  Attempting to fetch gettext-0.18.2_2.darwin_11.x86_64.tbz2 from http://packages.macports.org/gettext
--->  Attempting to fetch gettext-0.18.2_2.darwin_11.x86_64.tbz2.rmd160 from http://packages.macports.org/gettext
--->  Installing gettext @0.18.2_2
--->  Activating gettext @0.18.2_2
--->  Cleaning gettext
--->  Fetching archive for libidn
--->  Attempting to fetch libidn-1.26_0.darwin_11.x86_64.tbz2 from http://packages.macports.org/libidn
--->  Attempting to fetch libidn-1.26_0.darwin_11.x86_64.tbz2.rmd160 from http://packages.macports.org/libidn
--->  Installing libidn @1.26_0
--->  Activating libidn @1.26_0
--->  Cleaning libidn
--->  Fetching archive for zlib
--->  Attempting to fetch zlib-1.2.7_0.darwin_11.x86_64.tbz2 from http://packages.macports.org/zlib
--->  Attempting to fetch zlib-1.2.7_0.darwin_11.x86_64.tbz2.rmd160 from http://packages.macports.org/zlib
--->  Installing zlib @1.2.7_0
--->  Activating zlib @1.2.7_0
--->  Cleaning zlib
--->  Fetching archive for openssl
--->  Attempting to fetch openssl-1.0.1e_0.darwin_11.x86_64.tbz2 from http://packages.macports.org/openssl
--->  Attempting to fetch openssl-1.0.1e_0.darwin_11.x86_64.tbz2.rmd160 from http://packages.macports.org/openssl
--->  Installing openssl @1.0.1e_0
--->  Activating openssl @1.0.1e_0
--->  Cleaning openssl
--->  Fetching archive for curl
--->  Attempting to fetch curl-7.29.0_0+ssl.darwin_11.x86_64.tbz2 from http://packages.macports.org/curl
--->  Attempting to fetch curl-7.29.0_0+ssl.darwin_11.x86_64.tbz2.rmd160 from http://packages.macports.org/curl
--->  Installing curl @7.29.0_0+ssl
--->  Activating curl @7.29.0_0+ssl
--->  Cleaning curl
--->  Fetching archive for gdbm
--->  Attempting to fetch gdbm-1.10_2.darwin_11.x86_64.tbz2 from http://packages.macports.org/gdbm
--->  Attempting to fetch gdbm-1.10_2.darwin_11.x86_64.tbz2.rmd160 from http://packages.macports.org/gdbm
--->  Installing gdbm @1.10_2
--->  Activating gdbm @1.10_2
--->  Cleaning gdbm
--->  Fetching archive for perl5.12
--->  Attempting to fetch perl5.12-5.12.4_1.darwin_11.x86_64.tbz2 from http://packages.macports.org/perl5.12
--->  Attempting to fetch perl5.12-5.12.4_1.darwin_11.x86_64.tbz2.rmd160 from http://packages.macports.org/perl5.12
--->  Installing perl5.12 @5.12.4_1
--->  Activating perl5.12 @5.12.4_1
--->  Cleaning perl5.12
--->  Fetching archive for p5.12-error
--->  Attempting to fetch p5.12-error-0.170.160_4.darwin_11.noarch.tbz2 from http://packages.macports.org/p5.12-error
--->  Attempting to fetch p5.12-error-0.170.160_4.darwin_11.noarch.tbz2.rmd160 from http://packages.macports.org/p5.12-error
--->  Installing p5.12-error @0.170.160_4
--->  Activating p5.12-error @0.170.160_4
--->  Cleaning p5.12-error
--->  Fetching archive for p5.12-term-readkey
--->  Attempting to fetch p5.12-term-readkey-2.300.0_3.darwin_11.x86_64.tbz2 from http://packages.macports.org/p5.12-term-readkey
--->  Attempting to fetch p5.12-term-readkey-2.300.0_3.darwin_11.x86_64.tbz2.rmd160 from http://packages.macports.org/p5.12-term-readkey
--->  Installing p5.12-term-readkey @2.300.0_3
--->  Activating p5.12-term-readkey @2.300.0_3
--->  Cleaning p5.12-term-readkey
--->  Fetching archive for bzip2
--->  Attempting to fetch bzip2-1.0.6_0.darwin_11.x86_64.tbz2 from http://packages.macports.org/bzip2
--->  Attempting to fetch bzip2-1.0.6_0.darwin_11.x86_64.tbz2.rmd160 from http://packages.macports.org/bzip2
--->  Installing bzip2 @1.0.6_0
--->  Activating bzip2 @1.0.6_0
--->  Cleaning bzip2
--->  Fetching archive for libedit
--->  Attempting to fetch libedit-20121213-3.0_0.darwin_11.x86_64.tbz2 from http://packages.macports.org/libedit
--->  Attempting to fetch libedit-20121213-3.0_0.darwin_11.x86_64.tbz2.rmd160 from http://packages.macports.org/libedit
--->  Installing libedit @20121213-3.0_0
--->  Activating libedit @20121213-3.0_0
--->  Cleaning libedit
--->  Fetching archive for pcre
--->  Attempting to fetch pcre-8.32_1.darwin_11.x86_64.tbz2 from http://packages.macports.org/pcre
--->  Attempting to fetch pcre-8.32_1.darwin_11.x86_64.tbz2.rmd160 from http://packages.macports.org/pcre
--->  Installing pcre @8.32_1
--->  Activating pcre @8.32_1
--->  Cleaning pcre
--->  Fetching archive for db46
--->  Attempting to fetch db46-4.6.21_7.darwin_11.x86_64.tbz2 from http://packages.macports.org/db46
--->  Attempting to fetch db46-4.6.21_7.darwin_11.x86_64.tbz2.rmd160 from http://packages.macports.org/db46
--->  Installing db46 @4.6.21_7
--->  Activating db46 @4.6.21_7
--->  Cleaning db46
--->  Fetching archive for python_select
--->  Attempting to fetch python_select-0.3_2.darwin_11.noarch.tbz2 from http://packages.macports.org/python_select
--->  Attempting to fetch python_select-0.3_2.darwin_11.noarch.tbz2.rmd160 from http://packages.macports.org/python_select
--->  Installing python_select @0.3_2
--->  Activating python_select @0.3_2
--->  Cleaning python_select
--->  Fetching archive for sqlite3
--->  Attempting to fetch sqlite3-3.7.15.2_0.darwin_11.x86_64.tbz2 from http://packages.macports.org/sqlite3
--->  Attempting to fetch sqlite3-3.7.15.2_0.darwin_11.x86_64.tbz2.rmd160 from http://packages.macports.org/sqlite3
--->  Installing sqlite3 @3.7.15.2_0
--->  Activating sqlite3 @3.7.15.2_0
--->  Cleaning sqlite3
--->  Fetching archive for python27
--->  Attempting to fetch python27-2.7.3_1.darwin_11.x86_64.tbz2 from http://packages.macports.org/python27
--->  Attempting to fetch python27-2.7.3_1.darwin_11.x86_64.tbz2.rmd160 from http://packages.macports.org/python27
--->  Installing python27 @2.7.3_1
--->  Activating python27 @2.7.3_1

To make python 2.7 the default (i.e. the version you get when you run 'python'),
please run:

sudo port select --set python python27

--->  Cleaning python27
--->  Fetching archive for popt
--->  Attempting to fetch popt-1.16_0.darwin_11.x86_64.tbz2 from http://packages.macports.org/popt
--->  Attempting to fetch popt-1.16_0.darwin_11.x86_64.tbz2.rmd160 from http://packages.macports.org/popt
--->  Installing popt @1.16_0
--->  Activating popt @1.16_0
--->  Cleaning popt
--->  Fetching archive for rsync
--->  Attempting to fetch rsync-3.0.9_2.darwin_11.x86_64.tbz2 from http://packages.macports.org/rsync
--->  Attempting to fetch rsync-3.0.9_2.darwin_11.x86_64.tbz2.rmd160 from http://packages.macports.org/rsync
--->  Installing rsync @3.0.9_2
--->  Activating rsync @3.0.9_2

To use the rsyncd server you must copy /opt/local/etc/rsyncd.conf.example to
rsyncd.conf and add your modules there. See 'man rsyncd.conf' for more
information.

--->  Cleaning rsync
--->  Fetching archive for git-core
--->  Attempting to fetch git-core-1.8.1.3_0+credential_osxkeychain+doc+pcre+python27.darwin_11.x86_64.tbz2 from http://packages.macports.org/git-core
--->  Attempting to fetch git-core-1.8.1.3_0+credential_osxkeychain+doc+pcre+python27.darwin_11.x86_64.tbz2 from http://jog.id.packages.macports.org/macports/packages/git-core
--->  Attempting to fetch git-core-1.8.1.3_0+credential_osxkeychain+doc+pcre+python27.darwin_11.x86_64.tbz2 from http://lil.fr.packages.macports.org/git-core
--->  Fetching distfiles for git-core
--->  Attempting to fetch git-1.8.1.3.tar.gz from http://git-core.googlecode.com/files/
--->  Attempting to fetch git-manpages-1.8.1.3.tar.gz from http://git-core.googlecode.com/files/
--->  Attempting to fetch git-htmldocs-1.8.1.3.tar.gz from http://git-core.googlecode.com/files/
--->  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.8.1.3_0+credential_osxkeychain+doc+pcre+python27
--->  Activating git-core @1.8.1.3_0+credential_osxkeychain+doc+pcre+python27
--->  Cleaning git-core
--->  Updating database of binaries: 100.0%
--->  Scanning binaries for linking errors: 100.0%
--->  No broken files found.
Hiroto-no-MacBook:~ hiroto$ git --version
git version 1.8.1.3
2013
03.10

1. Xcodeをインストール

App StoreでXcodeをダウンロード

Xcodeインストール

2. XcodeのPreferencesのDownloadsタブでCommand Line Toolsをインストール

3. Mac Portsをインストール

Mac Portsをダウンロード

Mac Portsをアップデート

--->  Updating MacPorts base sources using rsync
receiving file list ... done

sent 36 bytes  received 69 bytes  70.00 bytes/sec
total size is 3594240  speedup is 34230.86
receiving file list ... done

sent 36 bytes  received 76 bytes  44.80 bytes/sec
total size is 512  speedup is 4.57
MacPorts base version 2.1.3 installed,
MacPorts base version 2.1.3 downloaded.
--->  Updating the ports tree
Synchronizing local ports tree from rsync://rsync.macports.org/release/tarballs/ports.tar
receiving file list ... done

sent 36 bytes  received 70 bytes  70.67 bytes/sec
total size is 54691840  speedup is 515960.75
receiving file list ... done

sent 36 bytes  received 77 bytes  45.20 bytes/sec
total size is 512  speedup is 4.53
Creating port index in /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports
Adding port lang/chicken

Total number of ports parsed:	1
Ports successfully parsed:	1
Ports failed:			0
Up-to-date ports skipped:	16529

--->  MacPorts base is already the latest version

The ports tree has been updated. To upgrade your installed ports, you should run
  port upgrade outdated
Hiroto-no-MacBook:~ hiroto$ xcodebuild -license
ENGLISH

IMPORTANT: BY USING THIS SOFTWARE, YOU ARE AGREEING TO BE BOUND BY THE FOLLOWING APPLE TERMS:

A. SOFTWARE LICENSE AGREEMENT FOR XCODE
B. iOS SDK AGREEMENT

APPLE INC.
SOFTWARE LICENSE AGREEMENT FOR XCODE

PLEASE READ THIS SOFTWARE LICENSE AGREEMENT ("LICENSE") CAREFULLY BEFORE USING THE DEVELOPER SOFTWARE (DEFINED BELOW). BY USING THE DEVELOPER SOFTWARE, YOU ARE AGREEING TO BE BOUND BY THE TERMS OF THIS LICENSE.  IF YOU ARE ACCESSING THE DEVELOPER SOFTWARE ELECTRONICALLY, SIGNIFY YOUR AGREEMENT TO BE BOUND BY THE TERMS OF THIS LICENSE BY CLICKING THE "AGREE " BUTTON.  IF YOU DO NOT AGREE TO THE TERMS OF THIS LICENSE, DO NOT USE THE DEVELOPER SOFTWARE AND CLICK “DISAGREE”. FOR DEVELOPER SOFTWARE INCLUDED WITH YOUR PURCHASE OF HARDWARE, YOU MUST RETURN THE ENTIRE HARDWARE/SOFTWARE PACKAGE IN ORDER TO OBTAIN A REFUND.

IMPORTANT NOTE: This software may be used to reproduce, modify, publish and distribute materials. It is licensed to you only for reproduction, modification, publication and distribution of non-copyrighted materials, materials in which you own the copyright, or materials you are authorized or legally permitted to reprod

By typing 'agree' you are agreeing to the terms of the software license agreements. Type 'print' to print them or anything else to cancel, [agree, print, cancel]

You can view the license agreements in Xcode's About Box, or at /Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf

Hiroto-no-MacBook:~ hiroto$ sudo port sync
--->  Updating the ports tree
2011
07.02

奥さんのPCは起動時にデスクトップに何も表示されないことがけっこうあったので、おそらくビデオカードが悪いのだろうということで、新しいビデオカード(玄人志向RH6950-E1GHW/DP)を購入して入れ替えみたらあっさり解消。

余った古いビデオカード(SAPPHIRE HD4870 512MB)はもったいないので、自分の新調したデスクトップPCに挿してベンチマークしてみたり、Virtuをためしてみた。
(続きを読む…)

2011
06.26

メインで使ってた PC は一応普通に使えてたんだけど、どうやらここ1年で CPU がかなり進化したとのこと。調べれば調べるほどほしくなって、結果勢い余って新調しましたw

構成は↓こんななかんじ。

今までのパーツ 新しく入れ替えたパーツ
CPU Core2Duo E6300 (1.83GHz/2core) Core i7 2600K (3.4GHz/4core/HT)
M/B ASUS P5Q-EM ASUS P8Z68-V
Memory DDR2-800 4GB DDR3-1333 8GB
DISK HDD 160GB * 2 (RAID0) Intel SSD510 120GB

ちなみに、メモリーは買い損ねたので ESXi サーバーから8GBほど拝借しました。
なので、ESXi上で動作しているマシンの大半がメモリを半分に減らしてます(^^;
おかげでちょくちょくメモリ不足のアラーとが出るようになりました。。。

(続きを読む…)

2011
05.22

同じネットワーク内のメールバーサーバーに対して別のLinuxサーバーからメールを送ることに失敗していたのでメモ。

maillogを見たところ、失敗の原因はメールサーバーの名前解決結果がグローバルIPになっていたこと。

LINUX sendmail[32525]: p4IF6IwF017505: to=<test@blue-robin.jp>, ctladdr=<root@LINUX.blue-robin.jp> (0/0), delay=21:40:10, xdelay=00:00:00, mailer=esmtp, pri=2100325, relay=mail.blue-robin.jp. [115.162.xxx.xxx], dsn=4.0.0, stat=Deferred: Connection refused by mail.blue-robin.jp.

ネットワーク内のDNSのMXレコードに内部のメールサーバーを指定しているのになぜ??

# nslookup -type=mx blue-robin.jp
Server:		192.168.1.2
Address:	192.168.1.2#53

blue-robin.jp	mail exchanger = 10 mail.blue-robin.jp.

# nslookup mail.blue-robin.jp
Server:		192.168.1.2
Address:	192.168.1.2#53

Name:	mail.blue-robin.jp
Address: 192.168.1.3

なんで、グローバルIPを引っ張り出しているのかはわからないけど、メールのリレー設定(/etc/mail/access)を加えてみた。

Connect:blue-robin.jp                   RELAY
Connect:localhost.localdomain           RELAY
Connect:localhost                       RELAY
Connect:127.0.0.1                       RELAY

ダメもとだったけど、メールの送信には成功。

LINUX sendmail[884]: p4JEM3WS000882: to=<test@blue-robin.jp>, ctladdr=<root@LINUX.blue-robin.jp> (0/0), delay=00:00:01, xdelay=00:00:00, mailer=esmtp, pri=120354, relay=mail.blue-robin.jp. [192.168.1.3], dsn=2.0.0, stat=Sent (Ok: queued as 11E3CF0045)

ログからも無事にネットワーク内のメールサーバーを指すようになったことがわかった。