Apache2, modperl, Ruby on Rails for Solaris

  1. http://httpd.apache.org/
  2. /tmp/httpd-2.2.31>env PATH=/usr/bin:/usr/sbin:/usr/ccs/bin:/opt/solarisstudio12.4/bin:/usr/sfw/bin \
    CC=cc CFLAGS="-m64 -xO3" LDFLAGS="-m64" \
    ./configure --with-expat=/usr/sfw --with-ssl=/usr --enable-ssl \
    --enable-proxy --enable-rewrite --enable-modules=all --enable-mods-shared=all \
    --with-included-apr --prefix=/opt/apache2
    
    # edit apr_rules.mk and config_vars.mk in /opt/apache2/build 
    #  add "-m64 -xO3" to EXTRA_CFLAGS and "-m64" EXTRA_LDFLAGS
    #  confirm "-m64"
    # edit apr-1-config and apu-1-config in /opt/apache2/bin
    #  add the same to CFLAGS and LDFLAGS
    #  confirm "-m64"
    # on S10, to capture modern openssl
    #  add "-L/usr/lib/64 -R/usr/lib/64 -L/usr/sfw/lib/64 -R/usr/sfw/lib/64" to LDFLAGS 
    #  add -I/usr/include to CPPFLAGS
      
  3. http://www.cpan.org/
  4. /tmp/perl-5.22.2>env PATH=/usr/bin:/usr/sbin:/usr/ccs/bin:/opt/solarisstudio12.4/bin:/usr/sfw/bin \
    ./Configure -Dprefix=/opt/apache2/perl-5.22.2 -Dcc=cc -Duseshrplib \
    -Uusemymalc -Duselargefiles -Ubincompat5005 -Doptimize=-xO3 -Duse64bitall
    
    # cleanup config.sh: s/generic64/-m64/
    # and get rid of extraneous lib and include paths.
      
  5. http://perl.apache.org/
  6. /tmp/mod_perl-2.0.9>env PATH=/opt/apache2/perl-5.22.2/bin:/usr/bin:/usr/sbin:/usr/ccs/bin:/opt/solarisstudio12.4/bin:/usr/sfw/bin \
    perl Makefile.PL MP_APXS=/opt/apache2/bin/apxs MAKE=gmake
    
    # tests require LWP::Simple
      
  7. http://httpd.apache.org/apreq/
  8. /tmp/libapreq2-2.13>env PATH=/opt/apache2/perl-5.22.2/bin:/usr/bin:/usr/sbin:/usr/ccs/bin:/opt/solarisstudio12.4/bin:/usr/sfw/bin \
    CC=cc CFLAGS="-m64 -xO3" LDFLAGS="-m64" \
    perl Makefile.PL --with-apache2-apxs=/opt/apache2/bin/apxs
    /tmp/libapreq2-2.13>env PATH=/usr/bin:/usr/sbin:/usr/ccs/bin:/opt/solarisstudio12.4/bin:/usr/sfw/bin \
    gmake
    
    # libapreq2 requires GNUmake. gmake for Solaris 8 and 9 is available from OpenCSW.ORG among other places
    # also requires CPAN modules ExtUtils::XSBuilder and ExtUtils::XSBuilder::WrapXS
    # On S10, using SUNWlexpt, add -R/usr/sfw/lib/64 to LDFLAGS
      
  9. http://tomcat.apache.org/
  10. /tmp/tomcat-connectors-1.2.27-src/native>env PATH=/usr/bin:/usr/ccs/bin:/opt/solarisstudio12.3/bin \
    ./configure --with-apxs=/opt/apache2/bin/apxs
    
      
  11. http://curl.haxx.se/
  12. # Ruby requires curl, S10 doesn't include it
    #  curl-config doesn't include -Rprefix/lib, so either add it to LDFLAGS or manually after installation
    $ env PATH=/usr/bin:/usr/ccs/bin:/opt/solarisstudio12.3/bin:/usr/sfw/bin CC=cc \
    CFLAGS="-m64 -xO3" \
    LDFLAGS="-m64 -L/usr/sfw/lib/64 -R/usr/sfw/lib/64 -L/opt/apache2/curl/lib -R/opt/apache2/curl/lib" \
    ./configure --prefix=/opt/apache2/curl --disable-static
      
  13. http://www.ruby-lang.org/
  14. On S10

    #
    # some choking with SUNWmake, ln -s /usr/sfw/bin/gmake /tmp/bin/make
    #
    $ env PATH=/tmp/bin:/usr/bin:/usr/sbin:/usr/ccs/bin:/opt/solarisstudio12.3/bin:/usr/sfw/bin \
    CC="cc -m64" CFLAGS="-m64 -O3" LDFLAGS="-m64" CXX="CC -m64" CXXFLAGS="-m64 -O3" \
    ./configure --prefix=/opt/apache2/ruby-2.1.3 --enable-shared --without-gcc \
    --without-dtrace --disable-dtrace
      

    On S11

    $ env PATH=/usr/bin:/usr/sbin:/usr/ccs/bin:/opt/solarisstudio12.3/bin:/usr/sfw/bin \
    CC="cc -m64" CXX="CC -m64" CFLAGS="-m64 -O3" CXXFLAGS="-m64 -O3" \
    CPPFLAGS=-I/opt/apache2/yaml/include \
    LDFLAGS="-m64 -L/opt/apache2/yaml/lib -R/opt/apache2/yaml/lib" MAKE=gmake \
    ./configure --prefix=/opt/apache2/ruby-1.9.3 --enable-shared --without-gcc
      
  15. http://rubyonrails.org/
  16. $ env PATH=/opt/apache2/ruby-2.1.3/bin:/opt/apache2/bin:/opt/postgres/bin:/usr/bin:/usr/ccs/bin:/opt/solarisstudio12.3/bin:/usr/sfw/bin \
    gem install pg
    $ env PATH=/opt/apache2/ruby-2.1.3/bin:/opt/apache2/bin:/opt/postgres/bin:/usr/bin:/usr/ccs/bin:/opt/solarisstudio12.3/bin:/usr/sfw/bin \
    gem install rails
    
  17. http://www.modrails.com/
  18. #  add -m64 to build/basics.rb
    $ env PATH=/tmp/bin:/opt/apache2/ruby-2.1.3/bin:/opt/apache2/bin:/opt/apache2/curl/bin:/usr/bin:/usr/sbin:/usr/ccs/bin:/opt/solarisstudio12.3/bin:/usr/sfw/bin \
    CC="gcc -m64" CXX="g++ -m64" \
    LDFLAGS="-m64 -R/opt/apache2/lib -R/opt/apache2/ruby-2.1.3/lib" MAKE=gmake \
    CFLAGS=-m64 CXXFLAGS=-m64 bin/passenger-install-apache2-module
       

John D. Groenveld <groenveld@acm.org>
$Id: apache2.html,v 1.23 2016/08/13 14:23:47 jdg117 Exp jdg117 $