aliyun ubuntu_12.04_64bit 部署 rails
- apt-get update
sudo apt-get install build-essential - 安装rvm requirements
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config - 安装rvm
curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enabled # Or, --ruby=1.9.3
source ~/.bashrc
source ~/.bash_profile - 修改 RVM 的 Ruby 安装源到国内的 淘宝镜像服务器,这样能提高安装速
sed -i -e 's/ftp\.ruby-lang\.org\/pub\/ruby/ruby\.taobao\.org\/mirrors\/ruby/g' ~/.rvm/config/db - 安装ruby
rvm install 1.9.3
rvm use 1.9.3
rvm gemset create rails3.2
rvm use [email protected] - 跟换rubygems的服务器地址(同时记得修改该项目中的Gemfile)
gem source -r https://rubygems.org
gem source -a http://ruby.taobao.org - 安装rails
gem install bundler rails - 运行rails server的时候提示安装node.js
sudo apt-get install nodejs - 安装passenger
gem install passenger - 安装nginx
rvmsudo `which passenger-install-nginx-module` - passenger默认会将nginx安装到/opt/nginx下,与直接安装nginx的路径略有差异,请特别注意。
git clone git://gist.github.com/525330.git sudo mv 525330/nginx.sh /etc/init.d/nginx chmod +x /etc/init.d/nginx #此处不能使用sudo chown等其他更改权限方式
让启动脚本随机启动:
/usr/sbin/update-rc.d -f nginx defaults /etc/init.d/nginx start
如果成功,则可以直接使用start,stop,restart,reload控制nginx
- 切换分支:
git branch –r
git checkout -b 4th origin/4th
相关推荐
何志文 2020-05-11
JOO 2020-04-26
龙浩然 2014-06-03
yohunl 2008-01-11
wujiajax 2011-07-22
samllQ的备忘录 2011-07-22
wl00 2020-10-28
EricNet 2020-07-05
EricNet 2020-05-27
happyfreeangel 2020-04-09
Poisedflw 2020-03-23
yangliuhbhd 2020-03-06
Ben的程序员生涯 2013-06-01
chenshuixian 2013-06-01
wes0 2014-05-31
mrice00 2019-12-20
EricNet 2019-12-11