标签:blog http io os 使用 ar 文件 数据 sp
sudo apt-get install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libxml2-dev libxslt-dev autoconf libc6-dev zlib1g-dev libssl-dev build-essential curl git-core libc6-dev g++ gcc
sudo adduser railsu sudo usermod -G passenger,www-data,sudo railsu su - railsu
bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
加载rvm (只需第一次安装时加载)
source .bashrc
安装ruby
rvm install 1.9.2
rvm 高阶应用可以参考这里的指南
rvm use 1.9.2 default gem install passenger rvmsudo passenger-install-nginx-module
所有都选默认,选择下载并编译passenger.
nginx安装目录也选择默认 /opt/nginx/
passenger 会自动修改config, 添加passenger所在的rvm的ruby和gem环境地址。
sudo apt-get install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libxml2-dev libxslt-dev autoconf libc6-dev zlib1g-dev libssl-dev build-essential curl git-core libc6-dev g++ gcc
sudo adduser railsu sudo usermod -G passenger,www-data,sudo railsu su - railsu
bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
加载rvm (只需第一次安装时加载)
source .bashrc
安装ruby
rvm install 1.9.2
rvm 高阶应用可以参考这里的指南
rvm use 1.9.2 default gem install passenger rvmsudo passenger-install-nginx-module
所有都选默认,选择下载并编译passenger.
nginx安装目录也选择默认 /opt/nginx/
passenger 会自动修改config, 添加passenger所在的rvm的ruby和gem环境地址。
wget https://raw.github.com/gist/1548664/53f6d7ccb9dfc82a50c95e9f6e2e60dc59e4c2fb/nginx sudo cp nginx /etc/init.d/ sudo chmod +x /etc/init.d/nginx sudo update-rc.d nginx defaults
配置文件在 /opt/nginx/config/nginx.conf
server { listen 80; server_name www.yourhost.com; root /home/railsu/project/public; # <--- 这里是你项目的public目录 passenger_enabled on; }
用来precompile rails assets
sudo apt-get install python-software-properties sudo add-apt-repository ppa:chris-lea/node.js sudo apt-get update sudo apt-get install nodejs
cd ~/project rake assets:precompile
sudo /etc/init.d/nginx start
wget https://raw.github.com/gist/1548664/53f6d7ccb9dfc82a50c95e9f6e2e60dc59e4c2fb/nginx sudo cp nginx /etc/init.d/ sudo chmod +x /etc/init.d/nginx sudo update-rc.d nginx defaults
配置文件在 /opt/nginx/config/nginx.conf
server { listen 80; server_name www.yourhost.com; root /home/railsu/project/public; # <--- 这里是你项目的public目录 passenger_enabled on; }
用来precompile rails assets
sudo apt-get install python-software-properties sudo add-apt-repository ppa:chris-lea/node.js sudo apt-get update sudo apt-get install nodejs
cd ~/project rake assets:precompile
标签:blog http io os 使用 ar 文件 数据 sp
原文地址:http://www.cnblogs.com/L-H-R-X-hehe/p/3999638.html