Rails基本环境配置

December 24, 2011

Mac

Xcode,rvm 安装1.9以上版本的ruby需要设置编译器为gcc

Ubuntu 10.04 LTS

apt-get install wget vim build-essential openssl libssl-dev libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libxml2-dev libxslt-dev autoconf automake libtool imagemagick libpcre3-dev libmysqld-dev

CentOS 5

yum groupinstall "Development Tools"
yum install zlib-devel wget openssl-devel pcre pcre-devel make gcc gcc-c++ curl-devel mysql-devel

# gem install mysql --no-rdoc --no-ri -- --with-mysql-dir=/usr/bin --with-mysql-lib=/usr/lib/mysql --with-mysql-include=/usr/include/mysql

passenger+apache2/passenger+nginx

Apache2

 apt-get install apache2 libcurl4-openssl-dev apache2-prefork-dev apache2-mpm-prefork libapr1-dev libaprutil1-dev
gem install passenger
passenger-install-apache2-module

Nginx

 gem install passenger
passenger-install-nginx-module

Database

geek@me$: sudo apt-get install postgre libpq-dev postgresql-contrib
geek@me$: sudo password postgres
geek@me$: sudo su postgres
postgres@me:$ createuser pg --pwprompt
Enter password for new role:[pg]
Enter it again: [pg][]
Shall the new role be a superuser? (y/n) y
gem install pg
  • MongoDB
  • SQLite3

Comments