Last active
January 3, 2016 06:09
-
-
Save ngtk/8421203 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Build tools and dependencies | |
| sudo yum install git gcc gcc-c++ make openssl-devel -y | |
| # Install RBENV | |
| git clone git://github.com/sstephenson/rbenv.git ~/.rbenv | |
| echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
| echo 'eval "$(rbenv init -)"' >> ~/.bash_profile | |
| source .bash_profile | |
| # Install Ruby-build | |
| git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
| cd ~/.rbenv/plugins/ruby-build | |
| sudo ./install.sh | |
| # Install Ruby 1.9.3 | |
| rbenv install 1.9.3-p429 | |
| rbenv rehash | |
| rbenv global 1.9.3-p429 | |
| rbenv rehash | |
| rbenv version | |
| ruby -v | |
| # Install Mecab | |
| mkdir ~/src | |
| cd ~/src/ | |
| wget http://mecab.googlecode.com/files/mecab-0.996.tar.gz | |
| tar zxvf mecab-0.996.tar.gz | |
| cd mecab-0.996 | |
| ./configure --with-charset=utf8 | |
| make | |
| make check | |
| sudo make install | |
| # Install ipa-dic | |
| cd ~/src/ | |
| wget http://mecab.googlecode.com/files/mecab-ipadic-2.7.0-20070801.tar.gz | |
| tar zxfv mecab-ipadic-2.7.0-20070801.tar.gz | |
| cd mecab-ipadic-2.7.0-20070801 | |
| ./configure --with-charset=utf8 | |
| make | |
| sudo make install | |
| # Install mecab-ruby | |
| cd ~/src | |
| wget http://mecab.googlecode.com/files/mecab-ruby-0.996.tar.gz | |
| tar zxvf mecab-ruby-0.996.tar.gz | |
| cd mecab-ruby-0.996 | |
| ruby extconf.rb | |
| make | |
| sudo make install | |
| # Add share liblary | |
| sudo cat /usr/local/lib >> /etc/ld.so.conf | |
| sudo ldconfig | |
| ruby ~/src/mecab-ruby-0.996/test.rb # test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment