LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-09-2006, 12:22 AM   #1
WindowBreaker
Member
 
Registered: Oct 2005
Distribution: Slackware
Posts: 228

Rep: Reputation: 40
Help installing openldap


I'm having trouble getting openldap working on slackware 10.2.

I installed the package from linuxpackages.net, and have a very basic and minimual slapd.conf file.
Code:
include                         /etc/openldap/schema/core.schema
include                         /etc/openldap/schema/cosine.schema
include                         /etc/openldap/schema/inetorgperson.schema

loglevel                        296
pidfile                         /var/run/slapd.pid
argsfile                        /var/run/slapd.args

password-hash                   {SSHA}

database                        bdb
suffix                          "dc=hopto,dc=org"
rootdn                          "cn=Manager,dc=hopto,dc=org"
rootpw                          {SSHA}QxZTzC3ZAYiGtpoOp+J4GkrM14XU3NC8
directory                       /var/ldap/hopto.org
mode                            0600
index           objectClass     eq
index           cn,sn,mail      pres,eq
cachesize                       2000
access to *
 by * read
I can start slapd, but the I can't kill it, even with -sigkill.
Tried:
Code:
kill -INT `cat /var/run/slapd.pid`
kill -s sigkill `pidof slapd`
killall slapd
I have to reboot to stop it.

Maybe I'm wrong, but I thought a INT signal to the master slapd process should cause it to clean up and terminate.

I'm thinking I must be doing something wrong. If you know what, please advise. Or if you know of a better way of getting a basic openldap working on slackware, let me know.

Thanks

Last edited by WindowBreaker; 02-09-2006 at 12:24 AM.
 
Old 02-09-2006, 03:18 AM   #2
WindowBreaker
Member
 
Registered: Oct 2005
Distribution: Slackware
Posts: 228

Original Poster
Rep: Reputation: 40
*SOLVED*

Solution:
1. Uninstall all 3 versions of Berkeley db that ship with slackware.
2. Configure/Compile/Install Berkeley db from source.
3. Configure/Compile/Install OpenLDAP from source.

Commands that did the magic:
Code:
## Remove all 3 bdb packages
removepkg db3-3.3.11-i486-4
removepkg db31-3.1.17-i486-1
removepkg db4-4.2.52-i486-2
## Download/configure/compile/install Berkeley db
cd /usr/local/src
wget http://downloads.sleepycat.com/db-4.4.20.tar.gz
tar xzf db-4.4.20.tar.gz
cd db-4.4.20/build_unix
../dist/configure --prefix=/usr/local/
make
make install
## Download/configure/compile/install openldap
wget ftp://ftp.openldap.org/pub/OpenLDAP/openldap-stable/openldap-stable-20060127.tgz
tar xzf openldap-stable-20060127.tgz
cd openldap-2.3.19
./configure --enable-wrappers
make depend
make
make install
To start OpenLDAP:
Code:
/usr/local/libexec/slapd
To stop OpenLDAP:
Code:
kill -HUP `cat /var/run/slapd.pid`
I really hope this saves other Slackers some time - it sure was a pain to figure out.

BTW: Below is the /etc/rc.d/rc.openldap script I wrote to control it all.
Usage: /etc/rc.d/rc.openldap (start|stop|restart)

Code:
# /etc/rc.d/rc.openldap
if [ $# -eq 0 ]; then
 echo "Usage: $0: (start|stop|restart)"
 exit 1
fi

start_ldap() {
echo "Starting OpenLDAP."
echo "/usr/local/libexec/slapd"
/usr/local/libexec/slapd
sleep 1
}

stop_ldap() {
echo "Stopping OpenLDAP"
LDAPPID="$(pidof slapd|sed 's/ /\n/g'|sort -n|head -n1)"
if [ -z $LDAPPID ]; then
 echo "slapd not running"
 exit 1
else
 echo "kill -INT $LDAPPID"
 kill -INT $LDAPPID
 sleep 1
fi
}

case $1 in
 start )        start_ldap      ;;
 stop )         stop_ldap       ;;
 restart )      stop_ldap
                start_ldap      ;;
 * ) echo "Usage: $0: (start|stop|restart)"     ;;
esac

exit 0
Cheers
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
login and postgresql problem after installing openldap robertngo Linux - Software 1 07-18-2005 07:47 PM
AD, OpenLDAP bentman78 Linux - Networking 1 03-15-2005 12:34 PM
openldap quarry_06 Linux - Networking 7 11-21-2004 01:11 PM
LDAP and OpenLDAP subaruwrx Linux - Networking 25 08-06-2004 09:31 PM
Help installing Openldap on Slackware 9.1 puma1824 Slackware 3 03-03-2004 08:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration