Tuesday, November 03, 2009

compiling apache 2.2.14 on CentOS 5

wrangled with this a bit today. One of our clients needed the upgrade for PCI compliance, and CentOS still has 2.2.8 as the latest version in YUM.

I couldn't find any decent RPMs, so I decided to compile from scratch by first downloading & extracting the source from apache.org.

The ./configure command for installing apache 2.2.14 on CentOS is below. The --disable lines you see are there because CentOS installs the default modules separately, which is probably a good thing. The rest of the options I found by reverse engineering the directory structure of the existing apache install.

To compile from source, you may need to first run: yum groupinstall 'Development Tools'



./configure \
--prefix=/etc/httpd \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--mandir=/usr/share/man \
--libdir=/usr/lib64 \
--sysconfdir=/etc/httpd/conf \
--includedir=/usr/local/include/httpd \
--libexecdir=/etc/httpd/modules \
--datadir=/var/www \
--with-mpm=prefork \
--with-devrandom \
--disable-auth \
--disable-cgi \
--disable-cgid \
--disable-mime \
--disable-env \
--disable-setenvif \
--disable-negotiation \
--disable-alias \
--disable-actions \
--disable-autoindex \
--disable-include \
--disable-dir \
--disable-userdir \
--disable-status \
--disable-authn-file \
--disable-authn-default \
--disable-authz-default \
--disable-authz-user \
--disable-authz-host \
--disable-authz-groupfile \
--disable-auth-basic \
--disable-asis \
--disable-log-config


Note that I also had to then comment out the following lines, possibly because I didn't --enable-ldap during the compile. I don't need LDAP though, so I just commented out:


#LoadModule ldap_module modules/mod_ldap.so
#LoadModule authnz_ldap_module modules/mod_authnz_ldap.so

Tuesday, April 21, 2009

installing ruby, rails, and redmine on Apache & FreeBSD 6

I will elaborate on this if anyone needs it, but for now I just wanted to post my notes from this evening when I got ruby, rails, and redmine running on FreeBSD 6 with Apache 2.2:

1. install ruby

#cd /usr/ports/lang/ruby18/
#make && make install

2. install rails 2.2.2
#cd /usr/ports/www/rubygem-rails
#make && make install

3. install ruby-iconv (rake script for redmine won't run without this)
cd /usr/ports/converters/ruby-iconv/
#make && make install

4. install mysql gem
#/usr/local/bin/gem install mysql

5. install passenger
#cd /usr/ports/www/rubygem-passenger
#make && make install

6. add these lines to your httpd.conf:

LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3
PassengerRuby /usr/local/bin/ruby18

7. install SVN (we'll need it to export the redmine trunk)
#cd /usr/ports/devel/subversion
#make && make install
#rehash

8. export redmine trunk (note: since we have ruby 2.2.2, we'll need the trunk, not the stable version of redmine.) ** see note below

svn export http://redmine.rubyforge.org/svn/trunk/ redmine

9. follow instructions at: http://www.redmine.org/wiki/redmine/RedmineInstall
10. copy redmine/public/dispatch.fcgi.example to redmine/public/dispatch.fcgi
11. -set up redmine vhost:

#------------------------------------
# redmine.example.com
#----------------------------------
<VirtualHost 192.168.1.100:80>
ServerName redmine.example.com
DocumentRoot /home/www/redmine/public

</VirtualHost>


Now you should be good to go at redmine.example.com!


NOTE:
The version of trunk I exported seemed to have some bugs, so I ended up installing rails 2.1.2 and going with the stable version of redmine by doing:

#gem install rails --version='=2.1.2'
#svn export http://redmine.rubyforge.org/svn/branches/0.8-stable redmine

Thanks to Mat Schaffer for the help on that one

Tuesday, January 06, 2009

sIFR flash is in front of dropdown menus

While using sIFR to get nice, clean, scalable fonts on the web, I noticed that because sIFR uses flash replacement, the replaced text was appearing on top of (e.g. z-index) the dropdown navigation menus the site had, which was not the desired behavior. The simple fix was adding: sWmode: "opaque" as one of the options to the sIFR.replaceElement method.