First of all, install the latest Apache2 RPM or better yet, compile and install Apache2 from source code (
http://httpd.apache.org/download.cgi). (Here is the configuration that I used):
./configure --prefix=/var/www --enable-so --enable-ssl --enable-cgi --enable-speling --enable-rewrite --enable-usertrack --enable-mime-magic
Then compile and install libmcrypt, mcrypt, and mhash (standard compile - ./configure, make, make install):
http://mcrypt.hellug.gr/mcrypt/index.html
Then compile and install PHP (
http://www.php.net/downloads.php) (Here is the configuration that I used):
./configure --with-apxs2=/var/www/bin/apxs --with-mysql --with-mcrypt=/usr/local/bin --enable-debug --with-openssl --with-mhash=/usr/local/lib --disable-cgi --with-gettext --with-ldap --with-zlib
Edit your /var/www/conf/httpd.conf file and add the following:
# Add index.php to your DirectoryIndex line:
DirectoryIndex index.html index.php
AddType application/x-httpd-php .php
# PHP Syntax Coloring (recommended):
AddType application/x-httpd-php-source .phps
Here is a helpful page for understanding the PHP/Apache2 install part:
http://dan.drydog.com/apache2php.html
Create a base.ldif file to initialize your LDAP server (change the dc=domain,dc=org to match your own domain setup you are using):
dn: dc=domain,dc=org
objectClass: dcObject
objectClass: organization
dc: domain
o: domain
structuralObjectClass: organization
dn: ou=Users,dc=domain,dc=org
objectClass: organizationalUnit
ou: Users
structuralObjectClass: organizationalUnit
dn: ou=Groups,dc=domain,dc=org
objectClass: organizationalUnit
ou: Groups
structuralObjectClass: organizationalUnit
dn: ou=Computers,dc=domain,dc=org
objectClass: organizationalUnit
ou: Computers
structuralObjectClass: organizationalUnit
dn: ou=Domains,dc=domain,dc=org
objectClass: organizationalUnit
ou: Domains
structuralObjectClass: organizationalUnit
Initialize your LDAP server:
/usr/sbin/slapadd -v -l base.ldif
Check /var/lib/ldap and view the permissions on the .dbb database files you created in the previous step. If the permissions are set to root:root, chown them to ldap:ldap.
Extract LAM (
http://lam.sourceforge.net) into your /var/www/htdocs directory. Change the /var/www/htdocs/lam/config files (config.cfg_sample and lam.conf_sample) to config.cfg and lam.conf. Edit lam.conf to match the values you have set in your /etc/openldap/slapd.conf file. Chmod 0755 both lam.conf and config.cfg. Then point your browser to
http://localhost/lam and you should see the LAM interface. The test scripts in the /var/www/htdocs/lam/tests directory may be helpful. Point your browser to these scripts for testing your LAM setup. For example:
http://localhost/lam/tests/conf-main-test.php.
Good Luck!