l-migrate2cloud-1-pd..
l-migrate2cloud-1-pd..
l-migrate2cloud-1-pd..
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
developerWorks®<br />
ibm.com/developerWorks<br />
CentOS comes with a dated Ruby version, so you will install Ruby Enterprise Edition<br />
(REE), which is a high-performance Ruby interpreter that's compatible with the<br />
current 1.8.7 branch of Ruby. Despite the expensive-sounding name, the software is<br />
open source. Listing 5 shows how to install REE.<br />
Listing 5. Installing REE<br />
# rpm -e ruby ruby-libs<br />
# yum -y install gcc-c++ zlib-devel openssl-devel readline-devel<br />
...<br />
Complete!<br />
# wget http://rubyforge.org/frs/download.php/71096/ruby-enterprise-1.8.7-2010.02.tar.gz<br />
...<br />
# tar -xzf ruby-enterprise-1.8.7-2010.02.tar.gz<br />
# ruby-enterprise-1.8.7-2010.02/installer -a /opt/ree<br />
The first two commands from Listing 5 remove the default Ruby installation and<br />
install a C compiler and a few necessary development packages. wget downloads<br />
the current REE tarball, which is then unpacked by tar. Finally, the last command<br />
runs the installer with an option to accept all defaults and place the results in<br />
/opt/ree. The installer is smart enough to tell you the commands you have to run if<br />
you're missing some packages, so look closely at the output if the installation isn't<br />
working.<br />
After Ruby is installed, add the bin directory to your path with export<br />
PATH="/opt/ree/bin:$PATH", which you can place in the system-wide<br />
/etc/bashrc or the .bashrc directory within your home directory.<br />
Installing PostgreSQL<br />
The PostgreSQL server is part of the CentOS distribution, so all you need to do is<br />
install it with the yum utility. Listing 6 shows how to install PostgreSQL and make<br />
sure it will start on boot.<br />
Listing 6. Installing PostgreSQL<br />
# yum -y install postgresql-server postgresql-devel<br />
...<br />
Installed: postgresql-devel.i386 0:8.1.21-1.el5_5.1<br />
postgresql-server.i386 0:8.1.21-1.el5_5.1<br />
Dependency Installed: postgresql.i386 0:8.1.21-1.el5_5.1<br />
postgresql-libs.i386 0:8.1.21-1.el5_5.1<br />
Complete!<br />
# chkconfig postgresql on<br />
The yum command installs packages from a repository. In Listing 7, you are<br />
installing the PostgreSQL server component and development libraries. Doing so<br />
automatically pulls in the core database utilities and any other packages you need.<br />
You will not need the development package yet, but when it comes time to integrate<br />
Initial migration<br />
Trademarks<br />
© Copyright IBM Corporation 2010. All rights reserved. Page 10 of 21