mattak's blog

人生を1ミリ進める

さくらで再インストールしたときのメモ

公開鍵の登録

$ ssh-copy-id -i .ssh/id_rsa.pub user@server.com

パッケージの更新

$ sudo aptitude update 

zshのインストール

$ sudo aptitude install zsh
$ chsh -s $(which zsh)

gitのインストール

$ sudo aptitude install git-core
$ git config --global user.name "user"
$ git config --global user.email "user@email.com"
$ git config --global core.editor "vim"

公開鍵の生成

$ ssh-keygen -t rsa

githubに公開鍵を登録

dotfilesのインストール

$ mkdir -p ~/dev/github/
$ cd ~/dev/github/
$ git clone git@github.com:mattak/dotfiles.git
$ cd dotfiles
$ sh install.sh

$ mkdir -p ~/dev/bitbucket
$ cd ~/dev/bitbucket/
$ git clone https://mattak@bitbucket.org/mattak/dotfiles-secret.git
$ cd dotfiles-secret
$ sh link.sh

vim のインストール

$ sudo aptitude install vim

vim環境の設定

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

便利ツールのインストール

$ sudo aptitude install tree
$ sudo aptitude install lv
$ sudo aptitude install curl
$ sudo aptitude install tmux

ruby環境の設定

$ sudo aptitude install build-essential
$ sudo aptitude install libreadline-dev libssl-dev zlib1g-dev
$ sudo apt-get install libssl1.0.0
$ git clone git://github.com/sstephenson/rbenv.git ~/.rbenv

$ mkdir ~/src
$ cd ~/src
$ git clone git://github.com/sstephenson/ruby-build.git
$ cd ruby-build
$ sudo ./install.sh

$ rbenv-install 1.9.3-p385
$ rbenv global 1.9.3-p385

よく使うgemをインストール

$ gem i bundle 
$ gem i rspec
$ gem i rake
$ gem i rdoc --pre
$ gem i pry
$ gem i sinatra
$ gem i padrino
$ gem i slim

$ rbenv rehash

refe

$ mkdir ~/src
$ cd ~/src
$ curl -O http://doc.ruby-lang.org/archives/201208/ruby-refm-1.9.3-dynamic-20120829.tar.gz
$ tar xvzf ruby-refm-1.9.3-dynamic-20120829.tar.gz
$ mv ruby-refm-1.9.3-dynamic-20120829 rubyrefm
$ mkdir ~/bin
$ curl https://gist.github.com/mattak/5226604/raw/4d70eec417860108f82bfd8f5bedb7a3b1f00713/refe > ~/bin/refe
$ chmod a+x ~/bin/refe

なんかロケールの設定がみすってる。

$ perl -v
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "ja_JP",
        LC_ALL = "ja_JP.UTF-8",
        LANG = "ja_JP.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

ロケール設定し直した

$ sudo locale-gen ja_JP.UTF-8
$ sudo dpkg-reconfigure locales

python環境のインストール

$ git clone git://github.com/yyuu/pyenv.git ~/.pyenv
$ pyenv install 2.7.3
$ pyenv global 2.7.3
$ pyenv rehash

$ pip install sphinx

あれ。。後述のnodebrew install latest でimport bz2の部分でこけた。。。

$ rm -rf ~/.pyenv

デフォルトのpython2.7.3でいいや。。

node系のインストール

$ curl https://raw.github.com/hokaccha/nodebrew/master/nodebrew | perl - setup
$ nodebrew install latest

node周りのモジュールインストール

$ npm i grunt