Documentation for Crowd 2.0.x. Documentation for other versions of Crowd is available too.

This page tells you how to configure Crowd and Apache to authenticate HTTP Authentication requests made to an Apache web server running on Solaris. These instructions are part of the guide to integrating Crowd with Apache.

The intent of these instructions is to take you from a default OS installation to a working Apache/Subversion/Crowd integration as easily as possible. We assume a fresh installation. If you are an experienced Solaris system administrator you need not follow these instructions to the letter.

1. Check the Prerequisite Packages

Check to ensure that the following packages are installed (Apache and Perl):

SUNWapch22
SUNWperl584core
SUNWperl584usr
SUNWperl584man
SUNWperl-xml-parser
SUNWgmake

2. Install the Apache Web Server for Subversion Integration

There are various distributions of Apache available. Your choice depends on whether you intend to use Apache as a front end to Subversion or not. Solaris ships with Apache 2.0 with Perl integration but not with Subversion integration.

If you do not require Subversion, the standard Solaris Apache 2.0 package works fine and you can skip to step 3.

If you do require Subversion integration then you need an Apache that includes the Subversion modules. There are several Solaris distributions of Subversion that bundle Apache with Subversion integration enabled, but not Perl integration.

These instructions describe an installation of Subversion and Apache from the Sunfreeware project.

  1. Download and install Subversion 1.6 and its dependencies (including Apache) from the links below. You will probably need all the dependencies listed: This should give you an Apache 2.2.15 installation with Subversion integrated, installed in /usr/local.

  2. Build and install mod_perl (the Apache/Perl integration module):
    • Download and install the Sun Studio compiler from http://developers.sun.com/sunstudio/.
    • Download mod_perl from http://perl.apache.org/download/index.html.
    • Extract the downloaded file.
    • Run the following commands in the extracted directory:
      export PATH="/opt/sunstudio12.1/bin:/usr/local/bin:/usr/sfw/bin:$PATH"
      perl Makefile.PL MP_APXS=/usr/local/apache2/bin/apxs
      gmake && /usr/sfw/bin/gmake test
      gmake install
      

You might get an error message like this:

[  error] Unable to determine server version, aborting.
[  error] Invalid MP_APXS specified?

This is due to the Apache config script apxs looking for Perl in /usr/local/bin instead of /usr/bin. To fix this problem, edit the /usr/local/apache2/bin/apxs file and change the first line from this:

#!/usr/local/bin/perl -w

to this:

#!/usr/bin/perl -w

3. Install Perl Modules

When following the instructions below, you will install some required Perl modules and the Sun Studio compiler. The Crowd Apache connector integrates with Apache using the Perl language, which should be already installed. You must, however, install several Perl modules required by the connector, as described below. Perl modules are generally not available in PKG format for Solaris, so you will need to install them directly from CPAN. Several of the CPAN modules need a C compiler and they assume the Sun Studio compiler.

  1. Download and install the Sun Studio compiler from http://developers.sun.com/sunstudio/ (if you haven't already).
  2. Install the required CPAN modules:
    export PATH="/opt/sunstudio12.1/bin:/usr/sfw/bin:$PATH"
    perl -MCPAN -e "install Error"
    perl -MCPAN -e "install Digest::SHA1"
    perl -MCPAN -e "install Cache::Cache"
    
    perl -MCPAN -e shell
    cpan> force install Bundle::LWP
    cpan> quit
    
    perl -MCPAN -e "install SOAP::Lite"
    
    • If this is the first time you have installed Perl modules via CPAN you will prompted to configure it. Accepting the default values for each question should work.
    • Make sure that a 'make' program is configured.
      Where is your make program? [] /usr/sfw/bin/gmake
      
    • Also, during the installation of the SOAP::Lite module you will be prompted to confirm the installation of several other dependent modules. Say 'yes' in each case.

4. Install the Crowd Apache Connector Packages

The Crowd Apache connector software is available in pkg format.

  1. Download the packages from the link below:
  2. Install the packages as follows:
    unzip PKGS.zip
    pkgadd -d ATLNperl-atlassian-crowd-all.pkg
    pkgadd -d ATLNperl-apache-crowdauth-all.pkg
    pkgadd -d ATLNperl-apache-crowdauthz-all.pkg
    

5. Do the Initial Apache Configuration

Follow the instructions below, depending on whether you are using the standard Solaris Apache 2 package or the Sunfreeware Apache and Subversion packages.

Instructions for Solaris Apache 2

If you are using the standard Solaris Apache 2 package, the Apache configuration file lives in /etc/apache2/httpd.conf.

  1. If you have not configured Apache yet, the above configuration file will not exist. Add it now. There is an example config file at /etc/apache2/httpd.conf-example, that you can copy to /etc/apache2/httpd.conf to get started.
  2. Perl integration is not enabled by default. To add it edit the file /etc/apache2/httpd.conf and add the following line:
    LoadModule perl_module libexec/mod_perl.so
    
  3. Enable the Apache service:
    svcadm enable apache2
    svcadm restart apache2
    
  4. Use the svcs command to check that the service is running:
    # svcs -l apache2
    fmri         svc:/network/http:apache2
    name         Apache 2 HTTP server
    enabled      true
    state        online
    next_state   none
    state_time   Sat Jun 26 15:40:19 2010
    logfile      /var/svc/log/network-http:apache2.log
    restarter    svc:/system/svc/restarter:default
    contract_id  102
    dependency   require_all/error svc:/milestone/network:default (online)
    dependency   require_all/none svc:/system/filesystem/local:default (online)
    dependency   optional_all/error svc:/system/filesystem/autofs:default (online)
    
  5. If the state shows as 'maintenance', check the /var/svc/log/network-http:apache2.log file for the cause.

Instructions for Sunfreeware Apache and Subversion

If you are using the Sunfreeware Apache and Subversion packages, the Apache configuration file lives in /usr/local/apache2/conf/httpd.conf.

  1. Perl and Subversion integration is not enabled by default. To add it edit the file /usr/local/apache2/conf/httpd.conf and add the following lines after the existing LoadModule lines:
    LoadModule perl_module modules/mod_perl.so
    LoadModule dav_svn_module modules/mod_dav_svn.so
    
  2. Start Apache with the following command:
    /usr/local/apache2/bin/apachectl start
    
  3. The log file for Apache is /usr/local/apache2/logs/error_log. If everything has been installed correctly it should contain a line like the following:
    [Tue Jul 13 13:00:05 2010] [notice] Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/1.0.0a DAV/2 mod_perl/2.0.4 Perl/v5.8.4 configured -- resuming normal operations
    

Now that the software is installed, the next step is to configure Apache authentication.

  • ラベルなし