Redmine + 32 bit chroot ruby + passenger + apache
This is how I got to run the ruby process behind my redmine
application inside a 32 bit debian chroot, where it uses considerably
less memory.
First I followed the well-written instructions here.
I took care to install all the stuff required by redmine, such as
passenger IN THE SAME VERSION as I had it installed on my primary
virtual host which contains the chroot, also installed all binaries
and gems in the very same absolute paths on the chroot as they were on
the primary host.
I linked (with mount -o bind) my redmine base directory to the same
absolute path on the chroot. From the above linked tutorial, I also
mounted /dev, /tmp, /proc and /var/mysqld to the chroot.
I did the "ln -s runas32bit ruby1.8" in my /usr/local/lib and made
sure ruby1.8 is also installed in /usr/local/lib on the chroot.
The correct passenger configuration in my case then was
unusually helpful in my case.
application inside a 32 bit debian chroot, where it uses considerably
less memory.
First I followed the well-written instructions here.
I took care to install all the stuff required by redmine, such as
passenger IN THE SAME VERSION as I had it installed on my primary
virtual host which contains the chroot, also installed all binaries
and gems in the very same absolute paths on the chroot as they were on
the primary host.
I linked (with mount -o bind) my redmine base directory to the same
absolute path on the chroot. From the above linked tutorial, I also
mounted /dev, /tmp, /proc and /var/mysqld to the chroot.
I did the "ln -s runas32bit ruby1.8" in my /usr/local/lib and made
sure ruby1.8 is also installed in /usr/local/lib on the chroot.
The correct passenger configuration in my case then was
# this forwards to the 32 bit chroot rubyThat's about it! If anything goes wrong: the apache2 error logs were
PassengerRuby /usr/local/bin/ruby1.8
# this is the correct path on either side of the chroot wall
PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.14
# this loads the correct 64 bit version of mod_passenger -- because
apache2 won't swallow the 32bit one
LoadModule passenger_module
/usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.14/ext/apache2/mod_passenger.so
unusually helpful in my case.
danielgruen - 8. Jan, 21:15