2014年01月08日

Mac miniのサブマシンにMac Book Air買ってしまいました。
年末の繁忙期のためか1日遅れで到着。
以下、正月休みに行った設定メモ

環境

  • 11インチ:128GBフラッシュストレージ
  • 1.3GHzデュアルコアIntel Core i5 プロセッサ
    (Turbo Boost使用時最大2.6GHz)
  • Intel HD Graphics 5000
  • 8GBメモリ
  • OsX 10.9.1(Marverics)
  • USキーボード

OSXアップデート

アップデートのリストを確認

% sudo softwareupdate -l

アップデートをすべて適用

% sudo softwareupdate -ia

特定のアップデートだけを適用

% sudo softwareupdate -i PackageName

自動更新On

% softwareupdate --schedule on

再起動

% sudo reboot

ログインShellをzshへ変更

% cat /etc/shells
    /bin/bash
    /bin/csh
    /bin/ksh
    /bin/sh
    /bin/tcsh
    /bin/zsh
% chsh -s /bin/zsh

アプリインストール

App Store購入済みアプリ

App Storeから手動でインストール

その他インストールしたもの

Dropboxで共有している.filesにシンボリックリンクを貼る。

% ln -s ~/Dropbox/dotfiles/.zshrc ~/.zshrc
% ln -s ~/Dropbox/dotfiles/.vimrc ~/.vimrc

HomeBrewインストール

  1. App Storeからダウンロードしてインストール
  2. Command Line Toolsのインストール
  • Homebrew

    インストール(公式HPの通り)

    % ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
    

    エラーがないかチェック

    % brew doctor
    

    Warningが発生

    Warning: Unbrewed dylibs were found in /usr/local/lib.
    If you didn't put them there on purpose they could cause problems when
    building Homebrew formulae, and may need to be deleted.
    Unexpected dylibs:
        /usr/local/lib/libusb-1.0.0.dylib
    

    消せと言われたけど、とりあえずゴミ箱へ移動してbrewでインストールする。

    % ls /usr/local/lib/libusb*
        /usr/local/lib/libusb-1.0.0.dylib* /usr/local/lib/libusb-1.0.dylib@
    % ls -l /usr/local/lib/libusb-1.0.dylib
            lrwxr-xr-x  1 root  admin  33 12 30 17:20 /usr/local/lib/libusb-1.0.dylib@ -> /usr/local/lib/libusb-1.0.0.dylib
    % mv /usr/local/lib/libusb* .Trash/
    

    再確認

    % brew doctor
        Your system is ready to brew.
    

    brewでlibusbを再インストール

    % brew install libusb
        ==> Downloading http://downloads.sourceforge.net/project/libusb/libusb-1.0/libus
        #################################################################### 100.0%
        ==> ./configure --prefix=/usr/local/Cellar/libusb/1.0.9
        ==> make install
        🍺  /usr/local/Cellar/libusb/1.0.9: 11 files, 416K, built in 12 seconds
    
    % ls -l /usr/local/lib/libusb*
        lrwxr-xr-x  1 xxxx  admin  45 12 30 18:39 /usr/local/lib/libusb-1.0.0.dylib@ -> ../Cellar/libusb/1.0.9/lib/libusb-1.0.0.dylib
        lrwxr-xr-x  1 xxxx  admin  39 12 30 18:39 /usr/local/lib/libusb-1.0.a@ -> ../Cellar/libusb/1.0.9/lib/libusb-1.0.a
        lrwxr-xr-x  1 xxxx  admin  43 12 30 18:39 /usr/local/lib/libusb-1.0.dylib@ -> ../Cellar/libusb/1.0.9/lib/libusb-1.0.dylib
    

    バージョンが1.0.0から1.0.9になった。

    本体を最新に更新

    % brew update
    

    brewからインストール

    % brew install w3m
    % brew install tree
    

Gnuコマンドを利用できるように変更

% brew install coreutils --default-names

問題が起きた場合は一旦切る

% brew unlink coreutils

元に戻す

% brew link coreutils

その他

% brew install findutils --default-names
% brew install binutls --default-names

zsh-completions

% brew install zsh-completions

.zshrcへパスを追加

fpath=(/usr/local/share/zsh-completions $fpath)
autoload -U compinit
compinit -u

zcompdumpをリビルド

% rm -f ~/.zcompdump; compinit

zsh-syntax-highlight

% mkdir ~/.zsh
% git clone git://github.com/zsh-users/zsh-syntax-highlighting.git ~/.zsh/zsh-syntax-highlighting

.zshrcへ記載

source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

Vim用設定

NeoBundleのインストール

% mkdir -p ~/.vim/bundle
% git clone git://github.com/Shougo/neobundle.vim ~/.vim/bundle/neobundle.vim

Vimから:NeoBundleInstall

その他



blog comments powered by Disqus