Installing Ruby on Centos with Yum
Ruby on Rails is an open-source web framework that’s optimizied for programmers happiness and sustainable productivity.
How to upgrade to the minimal requirement.
The below instructions are for 32-bit architecture.
#rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
#rpm -Uvh http://download.elff.bravenet.com/5/i386/elff-release-5-3.noarch.rpm
#yum install ruby ruby-shadow ruby-ri ruby-rdoc gcc gcc-c++ ruby-devel -y
#ruby -v
RubyGems
You can download and then install RubyGems from:
http://rubyforge.org/projects/rubygems/
You will see a list of all files for the project.
#wget http://rubyforge.org/frs/?group_id=126&release_id=43601
#tar xzvf rubygems-1.3.7.tgz
#cd cd rubygems-1.3.7
#sudo ruby setup.rb
#gem –version
Yum error: No module named sqlite
yum seems to be showing sqlite error.
yum clean all
There was a problem importing one of the Python modules required to run yum. The error leading to this problem was:
No module named sqlite
Reference : http://wiki.linux.duke.edu/YumFaq
To fix this download the latest python-sqlite rpm from CentOS mirror and peform a forceful upgrade.
rpm -Uvh python-sqlite-1.1.7-1.2.1.i386.rpm –force
yum clean all
yum update
How to protect one Yum repo’s packages from being replaced by packages from another source?
If we use two different repositories, each holding a different version of the same package, only the latest of the two will be installed if you use yum to update that package. This can lead to problems if the third party repository contains a newer version of a core system package than the Red Hat repository.
The yum-protectbase plugin will protect files of the base repository from being replaced by packages from a third party repository.
To install the plugin, use this command:
yum install yum-protectbase
This will install the plugin and its basic configuration file, /etc/yum/pluginconf.d/protectbase.conf
Setting are stored under /etc/yum/pluginconf.d/rhnplugin.conf with a section name matching the repo.id of the channel. You need to add :
To protect a different repository, go to its configuration file in /etc/yum.repos.d/repository.repo and add this line to its configuration
/etc/yum.repos.d/repository.repo
Add
[repository]
…
protect = 1
You will need to add this for each repository which needs to be protected.
Problem importing one of the Python modules required to run yum
Error: There was a problem importing one of the Python modules required to run yum. … Cannot allocate memory.
Solution: Python frequently runs into the memory limits set inside WHM and cPanel. You may be able to resolve this issue by increasing the per process memory limit in the WHM Tweak Settings feature, or by running EasyApache from the command line to minimize its memory footprint.
Reference: http://cpanel.net
Set up yum to get updates for RHEL5 system
To use the Red Hat repositories, make sure that you have installed the following package:
and that you have registered your system against RHN:
if you use a proxy, remember to specify it in the network configuration part of the assistant.
To manually set the proxy, fill /etc/sysconfig/up2date :
enableProxy=1
httpProxy=squid.example.com:3129
If the proxy requires authentication, also set these values :
enableProxyAuth=1
proxyUser=PROXYUSERNAME
proxyPassword=PROXYPASSWORD
All yum options are detailed in:
To check that your machine is registered, run: