每开一个 vps ,都要重新安装一下这个东西。
做个脚本 ,直接运行搞定,只要复制,黏贴到 ssh 窗口,直接运行。
ruby2.0 +rails 4.0 +nginx 1.4.2+mysql5
#mysql
yum -yq install mysql-server mysql-devel
yum -yq git
yum -y install gcc-c++ make patch
yum -y install zlib-devel openssl-devel readline-devel
yum install -y libxml2-devel bzip2-devel curl-devel libjpeg-devel libpng-devel libXpm-devel freetype-devel t1lib-devel libmcrypt-devel libxslt-devel
yum -y install sqlite-devel
#nginx
yum -y install pcre-devel openssl openssl-devel
wget http://nginx.org/download/nginx-1.4.2.tar.gz
tar xvf nginx-1.4.2.tar.gz
cd nginx-1.4.2
./configure --prefix=/usr/local/nginx
make
make install
ln -s /usr/local/nginx/sbin/nginx /usr/local/sbin/nginx
#node js
wget http://nodejs.org/dist/v0.10.15/node-v0.10.15.tar.gz
tar xvf node-v0.10.15.tar.gz
cd node-v0.10.15
./configure
make
make install
#ruby
echo "gem: --no-ri --no-rdoc " >~/.gemrc
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
exec $SHELL -l
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
rbenv install 2.0.0-p247
rbenv global 2.0.0-p247
rbenv rehash
gem install --no-ri --no-rdoc rails rake rack fastthread passenger mysql sqlite3-ruby node thin execjs therubyracer