Create a dir install in "mycentos" (that is your centos dir).
mkdir /home/mycentos/install/
cd /home/mycentos/install/
Install dependencies
yum grouplist |grep -i Development
sudo yum groupinstall "Development Tools"
rpm -qa |grep ruby
sudo yum install httpd-devel
openssl-devel
zlib-devel
gcc
gcc-c++
curl-devel
expat-devel
gettext-devel
mysql-server
mysql-devel
last time it didn't work, so I had to separate it:
sudo yum install httpd-devel
sudo yum install openssl-devel
sudo yum install zlib-devel
sudo yum install gcc
sudo yum install gcc-c++
sudo yum install curl-devel
sudo yum install expat-devel
sudo yum install gettext-devel
sudo yum install mysql-server
sudo yum install mysql-devel
Install ruby
wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
tar xzvf yaml-0.1.4.tar.gz
cd yaml-0.1.4
./configure --prefix=/usr/local
make
make install
back
cd ..
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz
tar xzvf ruby-1.9.3-p0.tar.gz
cd ruby-1.9.3-p0
./configure --prefix=/usr/local --enable-shared --disable-install-doc --with-opt-dir=/usr/local/lib
make
make install
verify the version
ruby -v
gem -v
back
cd ..
Install Rails
sudo gem install rails
Current version of rails can cause problems, solution:
sudo gem install --version '2.2.3' rails
Install Bundle
sudo gem install bundle
Install Tokyo Tyrant DB for odk build
Some libs
yum install gzip bzip2 bzip2-devel
Tokyo cabinet
wget http://fallabs.com/tokyocabinet/tokyocabinet-1.4.47.tar.gz
tar zxf tokyocabinet-1.4.47.tar.gz
cd tokyocabinet-1.4.47
./configure
make
make install
back
cd ..
Tokyo tyrant
wget http://fallabs.com/tokyotyrant/tokyotyrant-1.1.41.tar.gz
tar zxf tokyotyrant-1.1.41.tar.gz
cd tokyotyrant-1.1.41
./configure
make
make install
back
cd ..
Install git
Add the repository
rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm
Install the latest version of git
yum install --enablerepo=webtatic git-all
Download odk from github with git
mkdir odk
cd odk
git clone git://github.com/clint-tseng/odkbuild.git
Install gemfile
cd odkbuild
bundle install --path .rubygems
Copy and rename config.yml.sample to config.yml
cp config.yml.sample config.yml
Start DB TokyoTyrant
rake db:dev:start
Start Default Server Webrick with 8084 port
bundle exec rackup config.ru -p 8084
Install alternative server thin, only If webrick doesnt work with external private Ips install Thin
sudo gem install thin
Start Server with thin -p myport start and that's all, if have problems with rake 1.3.4 maybe you should change the gemfile and bundle install again
thin -p 8084 start
Daemon mode
bundle exec thin -d -p 8084 start
List the installed gems.
gem list