6.4. Uninstalling Directory Server

6.4. Uninstalling Directory Server

6.4.1. Removing a Single Directory Server Instance

It is possible to remove a single instance of Directory Server without uninstalling the system. To do this, run the following:

/usr/sbin/ds_removal -s server_id -w admin_password

The ds_removal script unregisters the server from the Configuration Directory Server and removes any related files and directories. The key and cert files are left in the instance configuration directory, and the configuration directory is renamed instance-name.removed.

6.4.2. Uninstalling Directory Server

6.4.2.1. Linux

To uninstall Red Hat Directory Server entirely, do the following:

  1. Remove all of the Directory Server instances. Each Directory Server instance service must be running for the remove script to access it.

    /usr/sbin/ds_removal -s example1 -w itsasecret
    /usr/sbin/ds_removal -s example2 -w itsasecret
    /usr/sbin/ds_removal -s example3 -w itsasecret
    
  2. Stop the Administration Server.

    /etc/init.d/dirsrv-admin stop
    
  3. Then use the system tools to remove the packages. For example, on Red Hat Enterprise Linux 4, do the following:

    rpm -ev dirsec-nss dirsec-nspr dirsec-nss-tools  --nodeps
    rpm -ev svrcore mozldap6 mozldap6-tools perl-Mozilla-LDAP --nodeps
    rpm -ev redhat-ds-base --nodeps
    rpm -ev redhat-ds-admin redhat-ds-console redhat-admin-console --nodeps
    rpm -ev idm-console-framework redhat-idm-console --nodeps
    

    On Red Hat Enterprise Linux 5, the packages to remove are as follows:

    rpm -ev svrcore mozldap mozldap-tools perl-Mozilla-LDAP --nodeps
    rpm -ev redhat-ds-base --nodeps
    rpm -ev redhat-ds-admin redhat-ds-console redhat-admin-console --nodeps
    rpm -ev idm-console-framework redhat-idm-console --nodeps
    

6.4.2.2. HP-UX

To uninstall Red Hat Directory Server entirely, do the following:

  1. Remove all of the Directory Server instances.

    /opt/dirsrv/sbin/ds_removal -s example1 -w itsasecret
    /opt/dirsrv/sbin/ds_removal -s example2 -w itsasecret
    /opt/dirsrv/sbin/ds_removal -s example3 -w itsasecret
    
  2. Stop the Administration Server.

    /opt/dirsrv/sbin/stop-ds-admin
    
  3. Remove the directory where the Directory Server is installed. For example:

    rm -Rf /export/ds80
    
  4. Remove the symlinks to the directories. For example:

    rm -f /opt/dirsrv /var/opt/dirsrv /etc/opt/dirsrv
    

6.4.2.3. Solaris

To uninstall Red Hat Directory Server entirely, do the following:

  1. Remove all of the Directory Server instances.

    /usr/sbin/ds_removal -s example1 -w itsasecret
    /usr/sbin/ds_removal -s example2 -w itsasecret
    /usr/sbin/ds_removal -s example3 -w itsasecret
    
  2. Stop the Administration Server.

    /etc/init.d/dirsrv-admin stop
    
  3. Then use the system tools to remove the packages. For example:

    #!/bin/bash
      for i in `pkginfo | grep -i rhat | grep -vi rhatperlx | awk '{print $2}'`
      do
         pkgrm -n $i
      done
      echo "looking for any leftover RHAT packages ..."
      pkginfo | grep RHAT
    

Note: This documentation is provided {and copyrighted} by Red Hat®, Inc. and is released via the Open Publication License. The copyright holder has added the further requirement that Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder. The CentOS project redistributes these original works (in their unmodified form) as a reference for CentOS-5 because CentOS-5 is built from publicly available, open source SRPMS. The documentation is unmodified to be compliant with upstream distribution policy. Neither CentOS-5 nor the CentOS Project are in any way affiliated with or sponsored by Red Hat®, Inc.