vagrantでubuntuいれてからしたこと


vagrantでguiを立ち上げても、
xubuntu-desktopが立ち上がらない。誰か、助けて。

##rootパスワードの変更

```
sudo su -
password
````

##berkshelfで入れているもの

```Vagrantfile
config.vm.provision :chef_solo do |chef|
    chef.run_list = [
        "recipe[mysql::client]",
        "recipe[mysql::server]",
        "recipe[nginx]",
        "recipe[php]",
        "recipe[vim]", ⇒これはソースから入れ直し。
        "recipe[git]",
        "recipe[zsh]",
        "recipe[hello]"
    ]
```

##シェルを変更

```
which zsh
/usr/bin/zsh
chsh
/usr/bin/zsh
````

##ビルドやなんやらに必要なパッケージ(※build-essentialにmake, g++が入ってるらしい)
```
sudo apt-get install build-essential 
sudo apt-get install libncurses5-dev
sudo apt-get install libpcre3-dev libxml2-dev libcurl3-dev
```

##ctagsいれる
```

sudo apt-get install ctag
```


##vimに neobundleを入れる

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

git clone https://github.com/PUTTYO/myconfigfile.git
ln -s myconfigfile/.tmux.conf
ln -s myconfigfile/.vimrc
ln -s myconfigfile/.zshrc
ln -s myconfigfile/.ctags
ln -s myconfigfile/.jshintrc
ln -s myconfigfile/.gitconfig
```

##nodebrewでnodeいれちゃおう。
```
cd
curl https://raw.github.com/hokaccha/nodebrew/master/nodebrew | perl - setup
vi .zshrc
```

```.zshrc
#path
export PATH=$HOME/.nodebrew/current/bin:$PATH
```

```install
nodebrew ls-remote
nodebrew install-binary v0.10.21
nodebrew use v0.10.21
```

##ruby/rbenvを入れる

```
$ sudo apt-get install rbenv
$ sudo apt-get install ruby-build
$ 
$ rbenv install 1.9.3-rc1
$ rbenv versions
  1.9.3-rc1
$ rbenv global 1.9.3-rc1
$ rbenv version
1.9.3-rc1 (set by /home/vagrant/.rbenv/version)
$ 
```

こっちにした。

```
$ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
$ echo export PATH=$HOME/.rbenv/bin:$PATH >> ~.zshrc
$ echo 'eval "$(rbenv init -)"' >> ~.zshrc
$ exec $SHELL
$ type rbenv
 rbenv is /home/vagrant/.rbenv/bin/rbenv
$
$
$ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
```

```.zshrc
export RBENV_ROOT="$HOME/.rbenv"
export PATH=$RBENV_ROOT/bin:$PATH
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
```

```install
$ rbenv install 1.9.3-rc1
$ rbenv versions
  1.9.3-rc1
$ rbenv global 1.9.3-rc1
$ rbenv version
1.9.3-rc1 (set by /home/vagrant/.rbenv/version)
$ 
```

##pythonをいれる。

```Pythonbrewのインストール
$ curl -kL http://xrl.us/pythonbrewinstall | bash
$ echo [[ -s "$HOME/.pythonbrew/etc/bashrc" ]] && source "$HOME/.pythonbrew/etc/bashrc" > .zshrc
$ pythonbrew --version
1.3.4
```

``` python
$ pythonbrew list -k
# Pythons
Python-1.5.2
Python-1.6.1
Python-2.0.1
Python-2.1.3
Python-2.2.3
Python-2.3.7
Python-2.4.6
Python-2.5.6
Python-2.6.8
Python-2.7.5
Python-3.0.1
Python-3.1.4
Python-3.2.4
Python-3.3.1
$ pythonbrew install  Python-3.3.1
Downloading Python-3.3.1.tgz as /home/vagrant/.pythonbrew/dists/Python-3.3.1.tgz
#######################################################################  100.0%
Extracting Python-3.3.1.tgz into /home/vagrant/.pythonbrew/build/Python-3.3.1

This could take a while. You can run the following command on another shell to track the status:
  tail -f "/home/vagrant/.pythonbrew/log/build.log"

Installing Python-3.3.1 into /home/vagrant/.pythonbrew/pythons/Python-3.3.1

Downloading distribute_setup.py as /home/vagrant/.pythonbrew/dists/distribute_setup.py
######################################################################## 100.0%
Installing distribute into /home/vagrant/.pythonbrew/pythons/Python-3.3.1
Installing pip into /home/vagrant/.pythonbrew/pythons/Python-3.3.1

Installed Python-3.3.1 successfully. Run the following command to switch to Python-3.3.1.
  pythonbrew switch 3.3.1
$ pythonbrew switch 3.3.1
Switched to Python-3.3.1
$ pythonbrew list
# pythonbrew pythons
  Python-3.3.1 (*)
```


##vim7.4を入れる
ソースからコンパイル。。と思ったら、apt-getで入った。
ただし、luaは有効じゃないので、
ソースから入れたほうがいいかな。
ということで、ソースをゲット。

```　ソースゲット
$ cd /usr/local/src
$ wget ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2
$ tar -xvf vim-7.4.tar.bz2
```

###vimと連携させたい言語を入れる。

``` lua
$ sudo apt-get install lua
Package lua is a virtual package provided by:
  lua5.2:i386 5.2.2-1
  lua5.1:i386 5.1.5-5
  lua50 5.0.3-6
  lua5.2 5.2.2-1
  lua5.1 5.1.5-5
You should explicitly select one to install.
```

なんかいっぱいでてきたので、とりあえず最新を入れてみる。

```
sudo apt-get install luajit lua5.2 liblua5.2-dev
```

あとは適当。

```
$ sudo apt-get install libncurses5-dev
$ sudo apt-get install python-dev python3-dev
$ sudo apt-get install ruby-dev
$ sudo apt-get install libperl-dev
$ sudo apt-get install tcl-dev
$ sudo apt-get install plt-scheme
```

```インストール
./configure --with-features=huge --enable-multibyte --enable-rubyinterp --enable-pythoninterp --enable-python3interp --enable-luainterp=yes --with-lua-prefix=/usr  --enable-perlinterp --enable-tclinterp --enable-gpm --enable-cscope --enable-fontset --disable-selinux --prefix=/usr/local
```
※--enable-mzschemeinterpはエラーがでたので外した。

vimが一番時間かかったorz
オプションは以下の通り。luaも有効になっているし、満足だ。

```
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 10 2013 02:45:34)
Compiled by vagrant@ubuntu-13
Huge version without GUI.  Features included (+) or not (-):
+arabic          +file_in_path    +mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
-balloon_eval    +float           +mouse_urxvt     -tag_any_white
-browse          +folding         +mouse_xterm     +tcl
++builtin_terms  -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         +gettext         -mzscheme        +textobjects
-clientserver    -hangul_input    +netbeans_intg   +title
-clipboard       +iconv           +path_extra      -toolbar
+cmdline_compl   +insert_expand   +perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    +keymap          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       +python/dyn      +viminfo
+cscope          +lispindent      +python3/dyn     +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con      +lua             +rightleft       +windows
+diff            +menu            +ruby            +writebackup
+digraphs        +mksession       +scrollbind      -X11
-dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     -xim
+emacs_tags      -mouseshape      -sniff           -xsmp
+eval            +mouse_dec       +startuptime     -xterm_clipboard
+ex_extra        -mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop
+farsi           +mouse_netterm   +syntax
```

##web(これはまだ途中)
```
cd 
mkdir web
git clone https://github.com/PUTTYO/webapp-grunt
cd webapp-grunt
npm install
npm install -g grunt-cli
npm install -g bower
bower install
```