FAQ

Page Discussion History

Installing on Solaris

Revision as of 23:29, 3 July 2011 by Lewellyn (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Contents

Nginx on Solaris

In general, installing on Solaris is the same as documented on the Install page.

Some Tips

  • Keep your $PATH as minimal as possible while building (don't include things like /usr/local, /opt/csw, etc.). This will help avoid weird dependency issues that may be difficult to track down at runtime.
  • On Solaris, LD_LIBRARY_PATH and friends are likely not YOUR friends. Avoid them like the plague when building, for your sanity and anyone who might have to clean up after you later.
  • If you need/want to use (the now-defunct) GCCFSS, be sure you are using 4.3.3 due to earlier versions not supporting Intel atomics used by nginx, causing build failures. (You probably don't want to use GCCFSS on OpenSolaris/Illumos/Solaris 11, as the provided GCC should be reasonably sane.)
  • If at all possible, use the --with-* options to include the third-party stuff (such as OpenSSL and PCRE) instead of relying on the outdated Solaris-provided items. Don't use third-party binaries. Take the time to let nginx build what it needs. (See configuration notes below.)
  • Use GNU make, not Solaris make. It lives in /usr/sfw/bin/gmake on Solaris 10.
  • If you're moving from Sun/Oracle's Apache, or just want permissions-compatibility with it, use webservd as your user and group for nginx.
  • On Solaris 10 and OpenSolaris, you'll probably use pfexec instead of sudo in the installation instructions. (Solaris 11 and illumos-based distributions use sudo, by default.)

Configuration tips

  • As stated above, use pristine sources for zlib/OpenSSL/PCRE on Solaris 10 or any other Solaris which has outdated versions. Assuming you keep your sources in $HOME/src, nginx will be in $HOME/src/nginx-x.y.z so you can do things like --with-openssl=../openssl-z.y.x on the configure line. (Be sure to unpack the pristine sources first!)
  • If you use --prefix, everything related to nginx will end up installed under that prefix, making it easier to package and/or just deal with.

A sample ./configure invocation

./configure \
        --group=webservd \
        --prefix=/opt/nginx \
        --user=webservd \
        --with-debug \
        --with-http_addition_module \
        --with-http_degradation_module \
        --with-http_gzip_static_module \
        --with-http_random_index_module \
        --with-http_realip_module \
        --with-http_ssl_module \
        --with-http_sub_module \
        --with-http_xslt_module \
        --with-ipv6 \
        --with-openssl=../openssl-1.0.0d \
        --with-pcre=../pcre-8.12 \
        --with-zlib=../zlib-1.2.5