{"id":18,"date":"2013-08-05T18:16:00","date_gmt":"2013-08-05T18:16:00","guid":{"rendered":""},"modified":"2021-08-31T10:12:25","modified_gmt":"2021-08-31T09:12:25","slug":"configuring-389-directory-server-for-first-use","status":"publish","type":"post","link":"https:\/\/www.srivittal.com\/wp\/?p=18","title":{"rendered":"Configuring 389 Directory Server for First Use"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left;\">\n<h3 style=\"text-align: left;\">Pre-config Steps<\/h3>\n<div style=\"text-align: left;\">1. Switch to root id.<\/div>\n<div style=\"text-align: left;\">2. Ensure that a proper host name has been assigned to the Linux Server. I am running this inside a virtual machine and hence I have created a host name and assigned it to the local loopback address. (Edit the \/etc\/hosts file). <b><span style=\"color: red;\">Ensure that the server&#8217;s host name appears before the localhost host name within the \/etc\/hosts file.<\/span><\/b><\/div>\n<div style=\"text-align: left;\">3. Add the CentOS repos to RedHat. See my earlier article <a href=\"https:\/\/www.srivittal.com\/wp\/?p=20\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a><\/div>\n<div style=\"text-align: left;\">4. Install Firefox by running the command <span style=\"background-color: black;\"><span style=\"color: white;\">yum install firefox&nbsp;<\/span><\/span><\/div>\n<div style=\"text-align: left;\">5. Run the <span style=\"background-color: black;\"><span style=\"color: white;\">dsktune<\/span><\/span> command. Fix any errors reported by the dsktune program. <b>If you cannot&nbsp; <\/b>find the dsktune program it means that the 389 (RedHat) Directory server is not installed<\/div>\n<div style=\"text-align: left;\">6. <span style=\"background-color: black;\"><span style=\"color: white;\"><span style=\"background-color: white;\"><span style=\"color: black;\">Look at the download and installation instructions mentioned&nbsp;<a href=\"http:\/\/directory.fedoraproject.org\/wiki\/Download\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a><\/span><\/span><\/span><\/span> <\/div>\n<div style=\"text-align: left;\">7.&nbsp; Run the following command to install the directory server. The following example shows the open source 389 server<\/div>\n<div style=\"text-align: left;\"><\/div>\n<div style=\"text-align: left;\"><span style=\"background-color: black;\"><span style=\"color: white;\">yum install 389-ds 389-ds-base 389-ds-base-libs<\/span><\/span><\/div>\n<div style=\"text-align: left;\"><\/div>\n<div style=\"text-align: left;\">8. Run the dsktune command again. I received the following output<\/div>\n<div style=\"text-align: left;\"><\/div>\n<div style=\"text-align: left;\"><span style=\"background-color: black;\"><span style=\"color: white;\">[root@connect ~]# dsktune<br \/>389 Directory Server system tuning analysis version 23-FEBRUARY-2012.<\/p>\n<p>NOTICE : System is i686-unknown-linux2.6.32-220.el6.i686 (2 processors).<\/p>\n<p>ERROR&nbsp; : There is 7990MB of physical memory but only 2047MB of swap space.<\/p>\n<p>NOTICE : The net.ipv4.tcp_keepalive_time is set to 7200000 milliseconds<br \/>(120 minutes).&nbsp; This may cause temporary server congestion from lost<br \/>client connections.<\/p>\n<p>WARNING: There are only 1024 file descriptors (hard limit) available, which<br \/>limit the number of simultaneous connections.&nbsp; <\/p>\n<p>WARNING: There are only 1024 file descriptors (soft limit) available, which<br \/>limit the number of simultaneous connections.&nbsp; <\/p>\n<p>WARNING&nbsp; : The warning messages above should be reviewed before proceeding.<\/span><\/span><\/div>\n<div style=\"text-align: left;\"><\/div>\n<div style=\"text-align: left;\">9. Run the following commands to get rid of the warnings<\/div>\n<div style=\"text-align: left;\"><\/div>\n<div style=\"text-align: left;\"><span style=\"background-color: black;\"><span style=\"color: white;\">echo &#8216;net.ipv4.tcp_keepalive_time = 600&#8217; &gt;&gt; \/etc\/sysctl.conf<br \/>sysctl -p<\/span><\/span><\/div>\n<div style=\"text-align: left;\"><\/div>\n<div style=\"text-align: left;\">10. Add this to \/etc\/security\/limits.conf<\/p>\n<p><span style=\"background-color: black;\"><span style=\"color: white;\">*  soft nofile  8192<br \/>*  hard nofile  8192<\/span><\/span><\/div>\n<div style=\"text-align: left;\"><\/div>\n<div style=\"text-align: left;\">11. Reboot the server<\/div>\n<div style=\"text-align: left;\">12. Run dsktune to ensure no errors or warnings are present. (Ignore the output from my machine above where I have allocated 8 GB of memory and 2 GB of swap)<\/div>\n<div style=\"text-align: left;\"><\/div>\n<h3 style=\"text-align: left;\">Config steps<\/h3>\n<div style=\"text-align: left;\">1. Run the setup-ds-admin.pl command<\/div>\n<div style=\"text-align: left;\"><span style=\"font-family: &quot;Courier New&quot;,Courier,monospace;\"><span style=\"background-color: black;\"><span style=\"color: white;\"><br \/><\/span><\/span><\/span><\/div>\n<p><span style=\"font-family: &quot;Courier New&quot;,Courier,monospace;\"><span style=\"background-color: black;\"><span style=\"color: white;\">[root@connect tmp]# setup-ds-admin.pl<\/p>\n<p>==============================================================================<br \/>This program will set up the 389 Directory and Administration Servers.<\/p>\n<p>It is recommended that you have &#8220;root&#8221; privilege to set up the software.<br \/>Tips for using this program:<br \/>&nbsp; &#8211; Press &#8220;Enter&#8221; to choose the default and go to the next screen<br \/>&nbsp; &#8211; Type &#8220;Control-B&#8221; then &#8220;Enter&#8221; to go back to the previous screen<br \/>&nbsp; &#8211; Type &#8220;Control-C&#8221; to cancel the setup program<\/p>\n<p>Would you like to continue with set up? [yes]: <\/p>\n<p>==============================================================================<br \/>Your system has been scanned for potential problems, missing patches,<br \/>etc.&nbsp; The following output is a report of the items found that need to<br \/>be addressed before running this software in a production<br \/>environment.<\/p>\n<p>389 Directory Server system tuning analysis version 23-FEBRUARY-2012.<\/p>\n<p>NOTICE : System is i686-unknown-linux2.6.32-220.el6.i686 (2 processors).<\/p>\n<p>ERROR&nbsp; : There is 7990MB of physical memory but only 2047MB of swap space.<\/p>\n<p>Would you like to continue? [yes]: <\/p>\n<p>==============================================================================<br \/>Choose a setup type:<\/p>\n<p>&nbsp;&nbsp; 1. Express<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Allows you to quickly set up the servers using the most<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; common options and pre-defined defaults. Useful for quick<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; evaluation of the products.<\/p>\n<p>&nbsp;&nbsp; 2. Typical<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Allows you to specify common defaults and options.<\/p>\n<p>&nbsp;&nbsp; 3. Custom<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Allows you to specify more advanced options. This is <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; recommended for experienced server administrators only.<\/p>\n<p>To accept the default shown in brackets, press the Enter key.<\/p>\n<p>Choose a setup type [2]: 3<\/p>\n<p>==============================================================================<br \/>Enter the fully qualified domain name of the computer<br \/>on which you&#8217;re setting up server software. Using the form<br \/><hostname>.<domainname><br \/>Example: eros.example.com.<\/p>\n<p>To accept the default shown in brackets, press the Enter key.<\/p>\n<p>Warning: This step may take a few minutes if your DNS servers<br \/>can not be reached or if DNS is not configured correctly.&nbsp; If<br \/>you would rather not wait, hit Ctrl-C and run this program again<br \/>with the following command line option to specify the hostname:<\/p>\n<p>&nbsp;&nbsp;&nbsp; General.FullMachineName=your.hostname.domain.name<\/p>\n<p>Computer name [connect.svil.com.svil.com]: connect.svil.com<\/p>\n<p>==============================================================================<br \/>The servers must run as a specific user in a specific group.<br \/>It is strongly recommended that this user should have no privileges<br \/>on the computer (i.e. a non-root user).&nbsp; The setup procedure<br \/>will give this user\/group some permissions in specific paths\/files<br \/>to perform server-specific operations.<\/p>\n<p>If you have not yet created a user and group for the servers,<br \/>create this user and group using your native operating<br \/>system utilities.<\/p>\n<p>System User [nobody]: <br \/>System Group [nobody]: <\/p>\n<p>==============================================================================<br \/>Server information is stored in the configuration directory server.<br \/>This information is used by the console and administration server to<br \/>configure and manage your servers.&nbsp; If you have already set up a<br \/>configuration directory server, you should register any servers you<br \/>set up or create with the configuration server.&nbsp; To do so, the<br \/>following information about the configuration server is required: the<br \/>fully qualified host name of the form<br \/><hostname>.<domainname>(e.g. hostname.example.com), the port number<br \/>(default 389), the suffix, the DN and password of a user having<br \/>permission to write the configuration information, usually the<br \/>configuration directory administrator, and if you are using security<br \/>(TLS\/SSL).&nbsp; If you are using TLS\/SSL, specify the TLS\/SSL (LDAPS) port<br \/>number (default 636) instead of the regular LDAP port number, and<br \/>provide the CA certificate (in PEM\/ASCII format).<\/p>\n<p>If you do not yet have a configuration directory server, enter &#8216;No&#8217; to<br \/>be prompted to set up one.<\/p>\n<p>Do you want to register this software with an existing<br \/>configuration directory server? [no]: <\/p>\n<p>==============================================================================<br \/>Please enter the administrator ID for the configuration directory<br \/>server.&nbsp; This is the ID typically used to log in to the console.&nbsp; You<br \/>will also be prompted for the password.<\/p>\n<p>Configuration directory server<br \/>administrator ID [admin]: <br \/>Password: <br \/>Password (confirm): <\/p>\n<p>==============================================================================<br \/>The information stored in the configuration directory server can be<br \/>separated into different Administration Domains.&nbsp; If you are managing<br \/>multiple software releases at the same time, or managing information<br \/>about multiple domains, you may use the Administration Domain to keep<br \/>them separate.<\/p>\n<p>If you are not using administrative domains, press Enter to select the<br \/>default.&nbsp; Otherwise, enter some descriptive, unique name for the<br \/>administration domain, such as the name of the organization<br \/>responsible for managing the domain.<\/p>\n<p>Administration Domain [svil.com]: <\/p>\n<p>==============================================================================<br \/>The standard directory server network port number is 389.&nbsp; However, if<br \/>you are not logged as the superuser, or port 389 is in use, the<br \/>default value will be a random unused port number greater than 1024.<br \/>If you want to use port 389, make sure that you are logged in as the<br \/>superuser, that port 389 is not in use.<\/p>\n<p>Directory server network port [40387]: <\/p>\n<p>==============================================================================<br \/>Each instance of a directory server requires a unique identifier.<br \/>This identifier is used to name the various<br \/>instance specific files and directories in the file system,<br \/>as well as for other uses as a server instance identifier.<\/p>\n<p>Directory server identifier [connect]: <br \/>Error: the server already exists at &#8216;\/etc\/dirsrv\/slapd-connect&#8217;<br \/>Please remove it first if you really want to recreate it,<br \/>or use a different ServerIdentifier to create another instance.<br \/>Directory server identifier [connect]: connections<\/p>\n<p>==============================================================================<br \/>The suffix is the root of your directory tree.&nbsp; The suffix must be a valid DN.<br \/>It is recommended that you use the dc=domaincomponent suffix convention.<br \/>For example, if your domain is example.com,<br \/>you should use dc=example,dc=com for your suffix.<br \/>Setup will create this initial suffix for you,<br \/>but you may have more than one suffix.<br \/>Use the directory server utilities to create additional suffixes.<\/p>\n<p>Suffix [dc=svil, dc=com]: <\/p>\n<p>==============================================================================<br \/>Certain directory server operations require an administrative user.<br \/>This user is referred to as the Directory Manager and typically has a<br \/>bind Distinguished Name (DN) of cn=Directory Manager.<br \/>You will also be prompted for the password for this user.&nbsp; The password must<br \/>be at least 8 characters long, and contain no spaces.<br \/>Press Control-B or type the word &#8220;back&#8221;, then Enter to back up and start over.<\/p>\n<p>Directory Manager DN [cn=Directory Manager]: <br \/>Password: <br \/>Password (confirm): <\/p>\n<p>==============================================================================<br \/>You may install some sample entries in this directory instance.&nbsp; These<br \/>entries will be installed in a separate suffix and will not interfere<br \/>with the normal operation of the directory server.<\/p>\n<p>Do you want to install the sample entries? [no]: yes<\/p>\n<p>==============================================================================<br \/>You may wish to populate your new directory instance with some data.<br \/>&#8220;You may already have a file in LDIF format to use or some suggested<br \/>entries can be added.&nbsp; If you want to import entries from an LDIF<br \/>file, you may type in the full path and filename at the prompt.&nbsp; If<br \/>you want the setup program to add the suggested entries, type the<br \/>word suggest at the prompt.&nbsp; The suggested entries are common<br \/>container entries under your specified suffix, such as ou=People and<br \/>ou=Groups, which are commonly used to hold the entries for the persons<br \/>and groups in your organization.&nbsp; If you do not want to add any of<br \/>these entries, type the word none at the prompt.<\/p>\n<p>Type the full path and filename, the word suggest, or the word none [suggest]: <\/p>\n<p>==============================================================================<br \/>The Administration Server is separate from any of your web or application<br \/>servers since it listens to a different port and access to it is<br \/>restricted.<\/p>\n<p>Pick a port number between 1024 and 65535 to run your Administration<br \/>Server on. You should NOT use a port number which you plan to<br \/>run a web or application server on, rather, select a number which you<br \/>will remember and which will not be used for anything else.<\/p>\n<p>Administration port [9830]: <\/p>\n<p>==============================================================================<br \/>If you want to configure the Administration Server to bind<br \/>to a specific IP address, enter the address below.<\/p>\n<p>IP address [0.0.0.0]: <\/p>\n<p>==============================================================================<br \/>The Administration Server program runs as a certain user on your<br \/>system. This user must have permission to modify files and directories<br \/>for your Directory server as well as the Administration server.&nbsp; You<br \/>are strongly encouraged to use a non-privileged (i.e. non-root) user.<\/p>\n<p>Run Administration Server as [nobody]: <\/p>\n<p>==============================================================================<br \/>The interactive phase is complete.&nbsp; The script will now set up your<br \/>servers.&nbsp; Enter No or go Back if you want to change something.<\/p>\n<p>Are you ready to set up your servers? [yes]: <br \/>Creating directory server . . .<br \/>Your new DS instance &#8216;connections&#8217; was successfully created.<br \/>Creating the configuration directory server . . .<br \/>Beginning Admin Server creation . . .<br \/>Creating Admin Server files and directories . . .<br \/>Updating adm.conf . . .<br \/>Updating admpw . . .<br \/>Registering admin server with the configuration directory server . . .<br \/>Updating adm.conf with information from configuration directory server . . .<br \/>Updating the configuration for the httpd engine . . .<br \/>Starting admin server . . .<br \/>output: Starting dirsrv-admin: <br \/>output:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [&nbsp; OK&nbsp; ]<br \/>The admin server was successfully started.<br \/>Admin server was successfully created, configured, and started.<br \/>Exiting . . .<br \/>Log file is &#8216;\/tmp\/setupS7bwUq.log&#8217;<\/p>\n<p>[root@connect tmp]# <\/domainname><\/hostname><\/domainname><\/hostname><\/span><\/span><\/span><\/p>\n<p>2. Run 389-console<\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"http:\/\/1.bp.blogspot.com\/-6-UwJzNR_Fc\/Uf_hOkcToNI\/AAAAAAAAAK0\/6aNpMDqbCr0\/s1600\/Screen+Shot+2013-08-05+at+18.30.17.png\" style=\"margin-left: 1em; margin-right: 1em;\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" height=\"239\" src=\"http:\/\/1.bp.blogspot.com\/-6-UwJzNR_Fc\/Uf_hOkcToNI\/AAAAAAAAAK0\/6aNpMDqbCr0\/s320\/Screen+Shot+2013-08-05+at+18.30.17.png\" width=\"320\" \/><\/a><\/div>\n<p>3. Fill values as shown. Password is what you entered originally.<\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"http:\/\/4.bp.blogspot.com\/-PNBFsB9w5nQ\/Uf_hg78uUSI\/AAAAAAAAAK8\/ERCjwYNaBYU\/s1600\/Screen+Shot+2013-08-05+at+18.31.13.png\" style=\"margin-left: 1em; margin-right: 1em;\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" height=\"237\" src=\"http:\/\/4.bp.blogspot.com\/-PNBFsB9w5nQ\/Uf_hg78uUSI\/AAAAAAAAAK8\/ERCjwYNaBYU\/s320\/Screen+Shot+2013-08-05+at+18.31.13.png\" width=\"320\" \/><\/a><\/div>\n<div style=\"text-align: left;\"><\/div>\n<div style=\"text-align: left;\"><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Pre-config Steps 1. Switch to root id. 2. Ensure that a proper host name has been assigned to the Linux Server. I am running this inside a virtual machine and hence I have created a host name and assigned it to the local loopback address. (Edit the \/etc\/hosts file). Ensure that the server&#8217;s host name &hellip;<\/p>\n","protected":false},"author":2,"featured_media":78,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,3,25,14,24,23],"tags":[],"class_list":["post-18","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-389-directory-server","category-centos","category-identity-management","category-ldap","category-odsee","category-oracle-directory-server","entry entry-center"],"_links":{"self":[{"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/18","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=18"}],"version-history":[{"count":2,"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/18\/revisions"}],"predecessor-version":[{"id":184,"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/18\/revisions\/184"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=\/wp\/v2\/media\/78"}],"wp:attachment":[{"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=18"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=18"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.srivittal.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=18"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}