Skip to content

Instantly share code, notes, and snippets.

@apprentice1988
Last active October 10, 2016 06:08
Show Gist options
  • Save apprentice1988/359e8c9ec37c7bf3cb8c3210616ba37f to your computer and use it in GitHub Desktop.
Save apprentice1988/359e8c9ec37c7bf3cb8c3210616ba37f to your computer and use it in GitHub Desktop.
aliyun 配置rails, nginx, unicorn环境

首先设置语言

cd /usr/share/locales
sudo ./install-language-pack zh_CN

安装RUBY必要的环境依赖

sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libpq-dev imagemagick libmagickwand-dev

安装必要的服务

sudo apt-get install memcached redis-server nodejs
# https://www.linode.com/docs/databases/redis/redis-on-ubuntu-12-04-precise-pangolin

使用RBENV安装RUBY

cd ~
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL

git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL

rbenv install 2.1.3
rbenv global 2.1.3
ruby -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment