Firs of all you need a CentOS operating system with mysql, ruby 1.9 and passenger installed
If you don’t have this or you don’t know how to do it, just follow the simple instructions on these 2 posts:
Installing Ruby 1.9 on CentOS
Installing Phusion’s Passenger on CentOS (for Ruby 1.9)
Once you are done with this you are ready to move forward.
First you need to copy the following directories from your GeneXus installation to the CentOS server.
From under “gxruby” copy the “linux” and “generic” directory both under the same subdirectory.
In my case I’ve created a new directory on the server called “gxruby” (original 🙂 ), and put them there.
Now before you run the installation script, in order to work properly under CentOS you have to do the following:
- The installation script is based on Debian, so it expects to have certain libraries installed in places where CentOS doesn’t normally used them
specially the “libmysqlclient”. On CentOS these library is called “libmysqlclient.so.15.0.0” and it’s under “/usr/lib/mysql/”, but in the installation
script it should be under “/usr/local/lib/” so we’ll have to link it to the new location, we do this with the following command:
$ ln -s /usr/lib/mysql/libmysqlclient.so.15.0.0 /usr/local/lib/libmysqlclient.so - Under the subdirectory “gxruby/generic/gx_lucene” (this is where you copy from the GeneXus machine), you have to edit the script “build_make.sh”.
In reality, because this file is corrupted on GeneXus Evo1 U3, it’s better if you delete it an create a new one with the same name with the following contente:#!/bin/shtar -xzf clucene-core-0.9.21b.tar.gzcd clucene-core-0.9.21bsh autogen.shsh configuremakemake installcd ..ruby extconf.rb –with-clucene-include=’clucene-core-0.9.21b/src’ –with-clucene-lib=’clucene-core-0.9.21b/src/.libs’ –with-ldflags=’-lclucene’makemkdir libmv CLucene_gx.so libgem build build_gem.rbgem install CLucene_gx-0.1.1-x86-linux
NOTE:
In addition, if you are using a 64 bit platform replace the last line of the script for gem install CLucene_gx-0.1.1-x86_64-linux
Now you are ready to run the installation script that will install all GeneXus gems on your system.
Go to “./gxruby/linux”, and run the “installgems.bash” script.
In order to do that just change the mode of the file to “executable” with $ chmod +x installgems.bash
and then runt $ ./installgems.bash
Now, you are ready to deploy your GeneXus Ruby applications.
If you don’t know how to do it, follow the next post where I’m going to walk you through the deployment process
😉
Pingback: Deploying GeneXus applications on CentOS with Ruby 1.9 and mysql (part 2) | Shared Knowledge