Home > Mac | UNIX > [Mac]SnowLeopardで開発環境構築するよ – MacPortsでPythonやらRailsやらを一気にインストール[SnowLeopard]

[Mac]SnowLeopardで開発環境構築するよ – MacPortsでPythonやらRailsやらを一気にインストール[SnowLeopard]

  1. SnowLeopard用のMacPortsをインストール
  2. .bashrcに環境変数を追加
    # MacPorts
    export PATH=/opt/local/bin:/opt/local/sbin:$PATH
    # Man
    export MANPATH=/usr/local/man:/usr/share/man:/opt/local/man
    

    追加したら.bashrcを再読み込み

    $ source .bashrc
  3. 手打ちするのが面倒くさいからインストールスクリプトを作る(zsh、python、railsとかごった煮で)
    1. スクリプトファイル作成
      $ vi port.sh

      ↓の内容で作成する。

      #!/bin/bash
       
      sudo port -d selfupdate
      sudo port -d install zsh-devel
      sudo port -d install libiconv +enable_cp932fix
      sudo port -d install coreutils
      sudo port -d install findutils
      sudo port -d install wget
      sudo port -d install curl +ssl +sftp_scp
      sudo port -d install nkf
      sudo port -d install screen
      sudo port -d install ruby
      sudo port -d install zlib
      sudo port -d install openssl
      sudo port -d install rb-rubygems
      sudo port -d install subversion
      sudo port -d install git-core
      sudo port -d install -f svk
      sudo port -d install lv
      sudo port -d install chasen
      sudo port -d install sqlite3
      sudo port -d install libxml
      sudo port -d install libxml2
      sudo port -d install expat
      sudo port -d install p7zip
      sudo port -d install bzip2
      sudo port -d install ctags
      sudo port -d install ncurses
      sudo port -d install vim
      sudo port -d install smartmontools
      sudo port -d install colordiff
      sudo port -d install tiff
      sudo port -d install imagemagick +q8 +gs +wmf
      sudo port -d install openssh
      sudo port -d install perl5.8
      sudo port -d install perl5.10
      sudo port -d install tig
      sudo port -d install tree
      sudo port -d install w3m
       
      # Python25
      sudo port -d install python25
      sudo port -d install py25-django
      sudo port -d install py25-ipython
      sudo port -d install py25-pip
      sudo port -d install py25-setuptools
      sudo port -d install py25-hashlib
      sudo port -d install py25-zlib
      sudo port -d install py25-readline
      sudo port -d install py25-sqlite3
      sudo port -d install py25-mysql
      sudo port -d install py25-twisted
      sudo port -d install py25-pgsql
      sudo port -d install py25-mechanize
      sudo port -d install py25-openssl
      sudo port -d install py25-paste
      sudo port -d install py25-pastedeploy
      sudo port -d install py25-simplejson
      sudo port -d install py25-nose
      sudo port -d install py25-sqlalchemy
      sudo port -d install py25-sqlalchemy-migrate
      sudo port -d install py25-turbogears
      sudo port -d install py25-memcached
      sudo port -d install py25-yaml
      sudo port -d install python25-doc
      sudo port -f activate py25-cherrypy3
      sudo port -d install py25-cherrypy3
       
      # Python26
      sudo port -d install python26
      sudo port -d install py26-bpython
      sudo port -d install py26-django
      sudo port -d install py26-django-extensions
      sudo port -d install py26-coverage
      sudo port -d install py26-ipython
      sudo port -d install py26-mysql
      sudo port -d install py26-nose
      sudo port -d install py26-pip
      sudo port -d install py26-pymacs
      sudo port -d install py26-setuptools
      sudo port -d install py26-twisted
      sudo port -d install py26-pgsql
      sudo port -d install py26-openssl
      sudo port -d install py26-paste
      sudo port -d install py26-pastedeploy
      sudo port -d install py26-simplejson
      sudo port -d install py26-sqlalchemy
      sudo port -d install py26-sqlalchemy-migrate
      sudo port -d install py26-memcached
      sudo port -d install py26-yaml
      sudo port -d install python26-doc
      sudo port -d install py26-cherrypy3
      sudo port -d install python_select
       
      # Ruby
      export RUBYOPT=rubygems
      sudo gem update --system
      sudo gem update
      sudo gem install mongrel
      sudo gem install mongrel_cluster
      sudo gem install mechanize
      sudo gem install Selenium
      sudo gem install vim-ruby
      sudo gem install sqlite3-ruby
      sudo gem install mysql
      sudo gem install postgres
      sudo gem install postgres-pr
      sudo gem install BlueCloth
      sudo gem install RedCloth
      sudo gem install net-ssh
      sudo gem install net-sftp
      sudo gem install coverage
      sudo gem install capistrano
      sudo gem install magic_multi_connections
      sudo gem install redgreen
      sudo gem install rspec
      sudo gem install rspec-rails
      sudo gem install cucumber
      sudo gem install rmagick
      sudo gem install rails
      sudo gem install jpmobile
      sudo gem install ruby-debug
      sudo gem install refe
      sudo gem install xml-simple
      sudo gem cleanup
    2. 作ったスクリプトファイルに実行権を付与。
      $ chmod +x port.sh
    3. インストールスクリプト実行
      $ ./port.sh
    4. インストール終了までかなり時間がかかるから寝て待つ
  4. shellをzshへ変更する
    1. /etc/shellsに/opt/local/bin/zshを追記
      $ sudo vi /etc/shells
      
    2. chshする
      $ chsh -s /opt/local/bin/zsh

Comments:0

add to hatena hatena.comment (4) add to del.icio.us (0) add to livedoor.clip (0) add to Yahoo!Bookmark (0) Total: 4

Comment Form
Remember personal info

Trackbacks:0

Trackback URL for this entry
http://ore.saizensen.net/archives/487/trackback
Listed below are links to weblogs that reference
[Mac]SnowLeopardで開発環境構築するよ – MacPortsでPythonやらRailsやらを一気にインストール[SnowLeopard] from おれ最前線ねっと

Home > Mac | UNIX > [Mac]SnowLeopardで開発環境構築するよ – MacPortsでPythonやらRailsやらを一気にインストール[SnowLeopard]

Search
Feeds
Meta

Return to page top