{"id":6583,"date":"2016-06-19T14:51:41","date_gmt":"2016-06-19T06:51:41","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=6583"},"modified":"2023-04-28T09:47:07","modified_gmt":"2023-04-28T09:47:07","slug":"setup-389-directory-server-on-centos-7","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/setup-389-directory-server-on-centos-7\/","title":{"rendered":"How to Install and Setup 389 Directory Server on CentOS 7"},"content":{"rendered":"<p><img decoding=\"async\" class=\"alignnone wp-image-6677 size-full lazyload\" data-src=\"https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2016\/06\/How-to-Install-and-Setup-389-Directory-Server-on-CentOS-7.jpg\" alt=\"Setup 389 Directory Server\" width=\"1280\" height=\"904\" data-srcset=\"https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2016\/06\/How-to-Install-and-Setup-389-Directory-Server-on-CentOS-7.jpg 1280w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2016\/06\/How-to-Install-and-Setup-389-Directory-Server-on-CentOS-7-300x212.jpg 300w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2016\/06\/How-to-Install-and-Setup-389-Directory-Server-on-CentOS-7-768x542.jpg 768w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2016\/06\/How-to-Install-and-Setup-389-Directory-Server-on-CentOS-7-1024x723.jpg 1024w\" data-sizes=\"(max-width: 1280px) 100vw, 1280px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1280px; --smush-placeholder-aspect-ratio: 1280\/904;\" \/>389 Directory Server (previously <a href=\"https:\/\/directory.fedoraproject.org\/docs\/389ds\/download.html\" target=\"_blank\" rel=\"nofollow noopener\">Fedora Directory Server<\/a>) is an open source enterprise class LDAP server for Linux. It is developed by Red Hat community-supported Fedora Project. The name 389 is derived from the port number for LDAP.<\/p>\n<p>In this article we will guide you through the steps on how to install and setup 389 directory server on CentOS 7.<\/p>\n<h2>Steps to Install and Setup 389 Directory Server on CentOS 7<\/h2>\n<p>1. Turn off selinux :<\/p>\n<pre>vi \/etc\/sysconfig\/selinux\n<\/pre>\n<p>Change SELINUX to disabled then reboot the server :<\/p>\n<pre># This file controls the state of SELinux on the system.\n# SELINUX= can take one of these three values:\n#     enforcing - SELinux security policy is enforced.\n#     permissive - SELinux prints warnings instead of enforcing.\n#     disabled - No SELinux policy is loaded.\nSELINUX=disabled\n# SELINUXTYPE= can take one of three two values:\n#     targeted - Targeted processes are protected,\n#     minimum - Modification of targeted policy. Only selected processes are protected.\n#     mls - Multi Level Security protection.\nSELINUXTYPE=targeted\n<\/pre>\n<p>2. Perform basic performance and Security tuning for LDAP server :<\/p>\n<pre># vi \/etc\/sysctl.conf\n<\/pre>\n<p>Add the following :<\/p>\n<pre>net.ipv4.tcp_keepalive_time = 300\nnet.ipv4.ip_local_port_range = 1024 65000\nfs.file-max = 64000\n<\/pre>\n<pre># vi \/etc\/security\/limits.conf\n<\/pre>\n<p>Add the following :<\/p>\n<pre>* soft nofile 524288\n* hard nofile 524288\n<\/pre>\n<p>3. Reboot the server. This is to take effect the SELINUX and performance tuning setting :<\/p>\n<pre># reboot\n<\/pre>\n<p>4. Install 389 directory packages :<\/p>\n<pre># yum install https:\/\/dl.fedoraproject.org\/pub\/epel\/7\/x86_64\/e\/epel-release-7-6.noarch.rpm\n# yum install 389-* -y\n<\/pre>\n<p>5. Create ldap user and set its password :<\/p>\n<pre># useradd ldap\n# passwd ldap\n<\/pre>\n<p>6. Start 389 installation :<\/p>\n<pre># setup-ds-admin.pl\n\n==============================================================================\nThis program will set up the 389 Directory and Administration Servers.\n\nIt is recommended that you have \"root\" privilege to set up the software.\nTips for using this program:\n  - Press \"Enter\" to choose the default and go to the next screen\n  - Type \"Control-B\" then \"Enter\" to go back to the previous screen\n  - Type \"Control-C\" to cancel the setup program\n\nWould you like to continue with set up? [yes]:\n\n==============================================================================\nYour system has been scanned for potential problems, missing patches,\netc.  The following output is a report of the items found that need to\nbe addressed before running this software in a production\nenvironment.\n\n389 Directory Server system tuning analysis version 23-FEBRUARY-2012.\n\nNOTICE : System is x86_64-unknown-linux3.10.0-327.4.5.el7.x86_64 (2 processors).\n\nWould you like to continue? [yes]:\n\n==============================================================================\nChoose a setup type:\n\n   1. Express\n       Allows you to quickly set up the servers using the most\n       common options and pre-defined defaults. Useful for quick\n       evaluation of the products.\n\n   2. Typical\n       Allows you to specify common defaults and options.\n\n   3. Custom\n       Allows you to specify more advanced options. This is\n       recommended for experienced server administrators only.\n\nTo accept the default shown in brackets, press the Enter key.\n\nChoose a setup type [2]:\n\n==============================================================================\nEnter the fully qualified domain name of the computer\non which you're setting up server software. Using the form\n.\nExample: eros.example.com.\n\nTo accept the default shown in brackets, press the Enter key.\n\nWarning: This step may take a few minutes if your DNS servers\ncan not be reached or if DNS is not configured correctly.  If\nyou would rather not wait, hit Ctrl-C and run this program again\nwith the following command line option to specify the hostname:\n\n    General.FullMachineName=your.hostname.domain.name\n\nComputer name [centos72.ehowstuff.local]:\n\n==============================================================================\nThe servers must run as a specific user in a specific group.\nIt is strongly recommended that this user should have no privileges\non the computer (i.e. a non-root user).  The setup procedure\nwill give this user\/group some permissions in specific paths\/files\nto perform server-specific operations.\n\nIf you have not yet created a user and group for the servers,\ncreate this user and group using your native operating\nsystem utilities.\n\nSystem User [nobody]: ldap\nSystem Group [nobody]: ldap\n\n==============================================================================\nServer information is stored in the configuration directory server.\nThis information is used by the console and administration server to\nconfigure and manage your servers.  If you have already set up a\nconfiguration directory server, you should register any servers you\nset up or create with the configuration server.  To do so, the\nfollowing information about the configuration server is required: the\nfully qualified host name of the form\n.(e.g. hostname.example.com), the port number\n(default 389), the suffix, the DN and password of a user having\npermission to write the configuration information, usually the\nconfiguration directory administrator, and if you are using security\n(TLS\/SSL).  If you are using TLS\/SSL, specify the TLS\/SSL (LDAPS) port\nnumber (default 636) instead of the regular LDAP port number, and\nprovide the CA certificate (in PEM\/ASCII format).\n\nIf you do not yet have a configuration directory server, enter 'No' to\nbe prompted to set up one.\n\nDo you want to register this software with an existing\nconfiguration directory server? [no]:\n\n==============================================================================\nPlease enter the administrator ID for the configuration directory\nserver.  This is the ID typically used to log in to the console.  You\nwill also be prompted for the password.\n\nConfiguration directory server\nadministrator ID [admin]:\nPassword:\nPassword (confirm):\n\n==============================================================================\nThe information stored in the configuration directory server can be\nseparated into different Administration Domains.  If you are managing\nmultiple software releases at the same time, or managing information\nabout multiple domains, you may use the Administration Domain to keep\nthem separate.\n\nIf you are not using administrative domains, press Enter to select the\ndefault.  Otherwise, enter some descriptive, unique name for the\nadministration domain, such as the name of the organization\nresponsible for managing the domain.\n\nAdministration Domain [ehowstuff.local]:\n\n==============================================================================\nThe standard directory server network port number is 389.  However, if\nyou are not logged as the superuser, or port 389 is in use, the\ndefault value will be a random unused port number greater than 1024.\nIf you want to use port 389, make sure that you are logged in as the\nsuperuser, that port 389 is not in use.\n\nDirectory server network port [389]:\n\n==============================================================================\nEach instance of a directory server requires a unique identifier.\nThis identifier is used to name the various\ninstance specific files and directories in the file system,\nas well as for other uses as a server instance identifier.\n\nDirectory server identifier [centos72]:\n\n==============================================================================\nThe suffix is the root of your directory tree.  The suffix must be a valid DN.\nIt is recommended that you use the dc=domaincomponent suffix convention.\nFor example, if your domain is example.com,\nyou should use dc=example,dc=com for your suffix.\nSetup will create this initial suffix for you,\nbut you may have more than one suffix.\nUse the directory server utilities to create additional suffixes.\n\nSuffix [dc=ehowstuff, dc=local]:\n\n==============================================================================\nCertain directory server operations require an administrative user.\nThis user is referred to as the Directory Manager and typically has a\nbind Distinguished Name (DN) of cn=Directory Manager.\nYou will also be prompted for the password for this user.  The password must\nbe at least 8 characters long, and contain no spaces.\nPress Control-B or type the word \"back\", then Enter to back up and start over.\n\nDirectory Manager DN [cn=Directory Manager]:\nPassword:\nPassword (confirm):\n\n==============================================================================\nThe Administration Server is separate from any of your web or application\nservers since it listens to a different port and access to it is\nrestricted.\n\nPick a port number between 1024 and 65535 to run your Administration\nServer on. You should NOT use a port number which you plan to\nrun a web or application server on, rather, select a number which you\nwill remember and which will not be used for anything else.\n\nAdministration port [9830]:\n\n==============================================================================\nThe interactive phase is complete.  The script will now set up your\nservers.  Enter No or go Back if you want to change something.\n\nAre you ready to set up your servers? [yes]:\nCreating directory server . . .\nYour new DS instance 'centos72' was successfully created.\nCreating the configuration directory server . . .\nBeginning Admin Server creation . . .\nCreating Admin Server files and directories . . .\n<\/pre>\n<p>7. Start the dirsrv admin service and dirsrv instance :<\/p>\n<pre># systemctl start dirsrv-admin\n# systemctl start dirsrv@centos72\n<\/pre>\n<p>8. Configure dirsrv admin service and all dirsrv instance auto start at boot :<\/p>\n<pre># systemctl enable dirsrv.target &amp;&amp; systemctl enable dirsrv-admin\n<\/pre>\n<p>9. Allow management and directory service ports :<\/p>\n<pre># firewall-cmd --permanent --add-port=389\/tcp\n# firewall-cmd --permanent --add-port=636\/tcp\n# firewall-cmd --permanent --add-port=9830\/tcp\n# firewall-cmd --reload\n<\/pre>\n<p>10. Verify all the allowed ports :<\/p>\n<pre># firewall-cmd --list-all\npublic (default, active)\n  interfaces: ens160\n  sources:\n  services: dhcpv6-client ssh\n  ports: 389\/tcp 9830\/tcp 80\/tcp 636\/tcp\n  masquerade: no\n  forward-ports:\n  icmp-blocks:\n  rich rules:\n<\/pre>\n<p>11. Login to your 389 directory from console.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-6683 size-full lazyload\" data-src=\"https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2016\/06\/install-389-centos72-1.png\" alt=\"Setup 389 Directory Server\" width=\"430\" height=\"318\" data-srcset=\"https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2016\/06\/install-389-centos72-1.png 430w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2016\/06\/install-389-centos72-1-300x222.png 300w\" data-sizes=\"(max-width: 430px) 100vw, 430px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 430px; --smush-placeholder-aspect-ratio: 430\/318;\" \/><\/p>\n<p>12. Your 389 directory administration console will look as below :<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-6682 size-full lazyload\" data-src=\"https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2016\/06\/install-389-centos72-2.png\" alt=\"Setup 389 Directory Server\" width=\"748\" height=\"528\" data-srcset=\"https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2016\/06\/install-389-centos72-2.png 748w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2016\/06\/install-389-centos72-2-300x212.png 300w\" data-sizes=\"(max-width: 748px) 100vw, 748px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 748px; --smush-placeholder-aspect-ratio: 748\/528;\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>389 Directory Server (previously Fedora Directory Server) is an open source enterprise class LDAP server for Linux. It is developed by Red Hat community-supported Fedora Project. The name 389 is&#8230;<\/p>\n","protected":false},"author":6,"featured_media":6677,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[1102,996],"tags":[1178,1258,1975],"class_list":["post-6583","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-389-directory-server","category-linux","tag-389-directory","tag-centos-7","tag-install"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/6583","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=6583"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/6583\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media\/6677"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=6583"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=6583"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=6583"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}