Skip to content

Instantly share code, notes, and snippets.

@yudai09
Created November 20, 2012 02:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yudai09/4115628 to your computer and use it in GitHub Desktop.
Save yudai09/4115628 to your computer and use it in GitHub Desktop.
centOS6.3にrailsをインストールする
#!/usr/bin/env bash
#[OpenSSLのインストール]
{
yum -y install zlib zlib-devel ;
yum -y install openssl-devel ;
yum install gcc make ;
} || exit 1
#[readline-develのインストール]
{
yum -y install readline-devel
} || exit 1
# [YAMLのインストール]
{
wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz ;
tar zxvf yaml-0.1.4.tar.gz ;
cd yaml-0.1.4 --prefix=/usr ;
./configure ;
make ;
make install ;
cd ..
} || exit 1
# 2. rubyのインストール
# [Rubyソースファイルのダウンロード]
{
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p327.tar.bz2 ;
tar jxvf ruby-1.9.3-p327.tar.bz2 ;
cd ruby-1.9.3-p327 ;
./configure --prefix=/usr/ ;
make ;
make install ;
cd ..
}|| exit 1
#※エラーが出るときは、--no-ri --no-rdocを付けてコマンド入力して下さい。
{
gem install rails --no-ri --no-rdoc
}|| exit 1
#4. SQLite3のインストール (ダウンロードページ)
{
tar xvzf sqlite-autoconf-3070900.tar.gz ;
cd sqlite-autoconf-3070900 ;
./configure --prefix=/usr/ ;
maker ;
make install ;
cd ..
}|| exit 1
# 5.sqlite3-rubyのインストール
{
yum -y install sqlite-devel ;
gem install sqlite3-ruby --no-ri --no-rdoc ;
}|| exit 1
# 6. rakeのインストール
{
gem install rake
}|| exit 1
# 7. git clone
{
yum -y install git ;
yum -y install gcc-c++ ;
git clone git://github.com/yudai09/Tyouseisan.git ;
cd Tyouseisan/ ;
gem install therubyracer -v '0.10.2' ;
bundle install
} || exit 1
# 8. aptana
yum -y install java-1.6.0-openjdk.x86_64
echo "Download Aptana, and unzip it, then it will work"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment