{"id":16816,"date":"2015-02-20T12:58:28","date_gmt":"2015-02-20T18:58:28","guid":{"rendered":"https:\/\/secure.rosehosting.com\/blog\/?p=16816"},"modified":"2022-12-09T05:27:52","modified_gmt":"2022-12-09T11:27:52","slug":"how-to-install-ldap-389-directory-server-on-a-centos-6-vps","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-ldap-389-directory-server-on-a-centos-6-vps\/","title":{"rendered":"How to install LDAP 389 Directory Server on a CentOS 6 VPS"},"content":{"rendered":"
In this article we will guide you through the steps on how to install LDAP 389 Directory Server (389 DS) on a CentOS 6 VPS<\/a><\/strong>.<\/p>\n What is 389 DS?<\/strong><\/p>\n It is an enterprise-class Open Source LDAP server<\/a> for GNU\/Linux. It is hardened by real-world use, is full-featured, supports multi-master replication, and already handles many of the largest LDAP<\/span> deployments in the world. The 389 Directory Server<\/strong> can be downloaded for free, and set up in less than an hour using the graphical administration console.<\/p>\n Some of the Key Features of 389 DS are:<\/strong><\/p>\n <\/p>\n System Requirements?<\/strong><\/p>\n <\/p>\n <\/p>\n Before proceeding any further, <\/p>\n You need to enable the EPEL (Extra Packages for Enterprise Linux) repository on your CentOS VPS before you install the 389 Directory Server. To do it, run the following if you encounter a 404 error message, go to http:\/\/dl.fedoraproject.org\/pub\/epel\/6\/x86_64\/ and install the latest <\/p>\n Next, add an unprivileged system user on your CentOS Linux Server<\/a> which will be used for 389 DS. You can achieve this by using the setup password for the newly created user using <\/p>\n The LDAP 389 Directory Server can be installed on your CentOS VPS using if you’re prompted with something like this:<\/em><\/p>\n then simply accept the signing key by typing ‘y’ and hit ‘ENTER’<\/em><\/p>\n <\/p>\n Once the 389 DS is finished, let’s configure the directory server using the provided Ok, now execute the following command to initiate the setup:<\/p>\n and answer the questions prompted, for example:<\/p>\n <\/p>\n With your 389 DS being setup and configured, add it to your system startup so it starts automatically every time the Linux VPS is rebooted:<\/p>\n next, check if services are up and listening using the following <\/p>\n Next step is to allow access to your LDAP ports in your server’s firewall. You can achieve this by using the following <\/p>\n You can test the setup by performing the following LDAP query using the if you get something like this:<\/p>\n then everything looks good. your directory server is installed and operating.<\/p>\n <\/p>\n You need to use the appropriate 389 DS Administration Console depending on the client OS you’re using. If you’re using some GNU\/Linux based distribution, then you can simply run the Of course you don\u2019t have to do any of this if you use one of our Fully Managed Hosting Services<\/a>, in which case you can simply ask our expert Linux admins to install LDAP 389 DS for you<\/strong>. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n PS<\/span>.<\/strong> If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":" In this article we will guide you through the steps on how to install LDAP 389 Directory Server (389 DS) … <\/p>\n\n
\n
UPDATE SYSTEM<\/b><\/h3>\n
ssh<\/code> to your CentOS Linux VPS<\/a>, initiate a
screen<\/code> session and upgrade your system using
yum<\/code>:<\/p>\n
## screen -U -S 389-ds\r\n## yum update<\/pre>\n
ENABLE EPEL<\/b><\/h3>\n
rpm<\/code> command as root:<\/p>\n
## rpm -Uvh http:\/\/dl.fedoraproject.org\/pub\/epel\/6\/x86_64\/epel-release-6-8.noarch.rpm<\/pre>\n
epel-release-6-X.noarch.rpm<\/code><\/em><\/p>\n
ADD SYSTEM USER<\/b><\/h3>\n
useradd<\/code> tool as in:<\/p>\n
## useradd ldapadmin<\/pre>\n
passwd<\/code>:<\/p>\n
## passwd ldapadmin<\/pre>\n
INSTALL LDAP 389<\/b><\/h3>\n
yum<\/code>. To install it, execute the following command:<\/p>\n
## yum install 389-ds openldap-clients<\/pre>\n
warning: rpmts_HdrFromFdno: Header V3 RSA\/SHA256 Signature, key ID 0608b895: NOKEY\r\nRetrieving key from file:\/\/\/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-EPEL-6\r\nImporting GPG key 0x0608B895:\r\n Userid : EPEL (6) <epel@fedoraproject.org>\r\n Package: epel-release-6-8.noarch (installed)\r\n From : \/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-EPEL-6\r\nIs this ok [y\/N]: y<\/pre>\n
CONFIGURE LDAP 389<\/b><\/h4>\n
setup-ds-admin.pl<\/code> perl script. Make sure you change the relevant information to suit your needs. Here are some tips for the installer:<\/p>\n
- type Ctrl+B and hit 'ENTER' to go back to the previous screen\r\n- type Ctrl+C to cancel the setup<\/pre>\n
## setup-ds-admin.pl<\/pre>\n
Would you like to continue with set up? [yes]: yes\r\nWould you like to continue? [no]: yes\r\nChoose a setup type [2]: 2\r\nComputer name [host.yourdomain.com]: host.yourdomain.com\r\nSystem User [nobody]: ldapadmin\r\nSystem Group [nobody]: ldapadmin\r\nDo you want to register this software with an existing\r\nconfiguration directory server? [no]: no\r\nadministrator ID [admin]: admin\r\nAdministration Domain [yourdomain.com]: ldap.yourdomain.com\r\nDirectory server network port [389]: 389\r\nDirectory server identifier [host]: host\r\nSuffix [dc=yourdomain, dc=com]: dc=yourdomain, dc=com\r\nDirectory Manager DN [cn=Directory Manager]: PRESS ENTER\r\nAdministration port [9830]: PRESS ENTER\r\nAre you ready to set up your servers? [yes]: yes<\/pre>\n
ADD 389 DS TO SYSTEM STARTUP<\/b><\/h4>\n
## chkconfig dirsrv on\r\n## chkconfig dirsrv-admin on<\/pre>\n
netstat<\/code> command:<\/p>\n
## netstat -tunlp | grep -E '9830|389'\r\n\r\ntcp 0 0 0.0.0.0:9830 0.0.0.0:* LISTEN 1231\/httpd.worker\r\ntcp 0 0 :::389 :::* LISTEN 1110\/.\/ns-slapd<\/pre>\n
SETUP FIREWALL PORTS FOR LDAP<\/b><\/h3>\n
iptables<\/code> commands:<\/p>\n
## iptables -A INPUT -p tcp --dport 389 -m state --state NEW -j ACCEPT\r\n## iptables -A INPUT -p tcp --dport 9830 -m state --state NEW -j ACCEPT\r\n## service iptables save<\/pre>\n
TEST THE SETUP<\/b><\/h3>\n
ldapsearch<\/code> command:<\/p>\n
## ldapsearch -x -b \"dc=yourdomain,dc=com\"<\/pre>\n
...\r\n# search result\r\nsearch: 2\r\nresult: 0 Success<\/pre>\n
389 DS ADMINISTRATION CONSOLE<\/b><\/h3>\n
389-console<\/code> program to access the GUI console. If you’re using a Windows based machine, then you need to download the administration console from http:\/\/directory.fedoraproject.org\/docs\/389ds\/download.html<\/a><\/p>\n
\n