NOTICE: 由于Redhat的yum在线更新是收费的,如果没有注册的话是不能使用的,即不能在线安装软件。
解决办法有两种:
安装apt-get 使用CentOS的源 第一种方法在安装时候需要的依赖太多,水太深。所以只能选择第二种了。下面是详细的过程。
删除redhat原有的yum源
$ rpm -aq | grep yum|xargs rpm -e --nodeps
下载新的yum安装包
$ wget http://mirror.centos.org/centos/6.0/os/i386/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
$ wget http://mirror.centos.org/centos/6.0/os/i386/Packages/yum-metadata-parser-1.1.2-14.1.el6.i686.rpm
$ wget http://mirror.centos.org/centos/6.0/os/i386/Packages/yum-3.2.27-14.el6.centos.noarch.rpm
$ wget http://mirror.centos.org/centos/6.0/os/i386/Packages/yum-plugin-fastestmirror-1.1.26-1.el6.noarch.rpm
$ rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
$ rpm -ivh yum-metadata-parser-1.1.2-14.1.el6.i686.rpm
$ rpm -ivh yum-3.2.27-14.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.26-11.el6.noarch.rpm
注意: 最后两个安装包要放在一起同时安装,否则会提示相互依赖,安装失败。
$ cd /etc/yum.repos.d/
$ rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
$ rpm -ivh http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
$ rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
$ yum clean all
$ yum update
$ yum install gcc-c++ patch readline readline-devel zlib zlib-devel
$ yum install libyaml-devel libffi-devel openssl-devel make
$ yum install bzip2 autoconf automake libtool bison iconv-devel
$ curl -L get.rvm.io | bash -s stable
$ source /etc/profile.d/rvm.sh
$ rvm install 2.1.3
$ rvm use 2.1.3 --default
$ ruby --version
参考官方文档
$ yum install imagemagick
添加MySQL的yum源
http://dev.mysql.com/downloads/repo/yum/
$ cd /etc/yum.repos.d/
$ wget http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
$ rpm -ivh sudo mysql-community-release-el6-*.noarch.rpm
安装MySQL
$ yum install mysql mysql-server mysql-libs mysql-server
启动MySQL
$ sudo service mysqld start
NOTICE: 进入mysql打 status 看一下sockets的正确地址。