centos 5.5 rails 安装 参考

1.安装gcc
yum install gcc-c++
yum install flex autoconf zlib curl zlib-devel curl-devel bzip2 bzip2-devel ncurses-devel libjpeg-devel libpng-devel libtiff-

devel freetype-devel pam-devel

2.安装ruby
wget http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p286.tar.gz
tar
tar zxvf ruby-1.8.6-p286.tar.gz
cd ruby-1.8.6-p286
./configure
make
make install

3.安装gems
wget http://rubyforge.org/frs/download.php/73882/rubygems-1.4.2.tgz
tar zxvf ruby-1.8.6-p286.tar.gz
tar zxvf rubygems-1.4.2.tgz
cd rubygems-1.4.2
ruby setup.rb

4.安装rails (如果安装没反应 可能是rubygems版本过低的缘故)
gem install rails -v=2.3.8 

5.安装msyql
yum install mysql-server
/sbin/chkconfig --levels 235 mysqld on
启动service mysqld start

6.安装mysql gem
yum install mysql-devel
gem install mysql --no-rdoc --no-ri -- --with-mysql-dir=/usr/bin --with-mysql-lib=/usr/

for frashman:
mysql安装完后,默认密码是空,需要修改密码:
    mysqladmin -u root password "newpass"
 如果root已经设置过密码,采用如下方法
  mysqladmin -u root password oldpass "newpass"


参考文章:

http://ali.iteye.com/blog/243037

http://www.cnblogs.com/gnome/archive/2011/03/03/1969469.html

http://www.360fire.cn/ruby/rails/2010-09-02/7587.html


本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/pengruikeji/archive/2011/05/19/6432704.aspx

你可能感兴趣的:(mysql,centos,Ruby,rubygems,Rails)