{"id":992,"date":"2008-12-04T07:11:13","date_gmt":"2008-12-04T11:11:13","guid":{"rendered":"http:\/\/onlineappsdba.com\/index.php\/2008\/12\/04\/ldap-installation-and-migration\/"},"modified":"2014-03-13T17:56:29","modified_gmt":"2014-03-13T21:56:29","slug":"ldap-installation-and-migration","status":"publish","type":"post","link":"https:\/\/onlineappsdba.com\/index.php\/2008\/12\/04\/ldap-installation-and-migration\/","title":{"rendered":"LDAP Installation and Migration"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>How to Migrate LDAP server to another\u00a0machine with same architecture?<\/p>\n<p>The following article explains simple way to install and migrate LDAP server.<\/p>\n<p>I have taken two machines (host1.example.com and host2.example.com) with Oracle Enterprise Linux 4,\u00a0as it is available free.\u00a0 Host1 machine is already installed and running with LDAP server and now we need to work on host2.example.com machine. See that each machine configured with FQDN.<\/p>\n<p>Now login to host2.example.com and perform the following tasks.<\/p>\n<h4><strong>Installation:<\/strong><\/h4>\n<p>Check whether the fedora-ds (fedora directory service) is installed or not.<\/p>\n<pre>#<\/pre>\n<p><span style=\"color: #0000ff;\">rpm -qi fedora-ds<\/span><\/p>\n<p>Install fedora-ds using <a title=\"Managing Yum\" href=\"https:\/\/onlineappsdba.com\/index.php\/2008\/11\/25\/managing-yum-redhat-oracle-enterprise-4\/\">yum<\/a>\u00a0 or rpm.\u00a0 If you want to use rpm to install, <a href=\"http:\/\/directory.fedoraproject.org\/wiki\/Download\">download the fedora-ds package<\/a>.<\/p>\n<pre>#<\/pre>\n<p><span style=\"color: #0000ff;\">yum install fedora-ds<\/span><\/p>\n<p>Or<\/p>\n<pre>#<\/pre>\n<p><span style=\"color: #0000ff;\">wget -c http:\/\/directory.fedoraproject.org\/download\/fedora-ds-1.0.4-1.RHEL4.i386.opt.rpm<\/span><\/p>\n<pre>#<\/pre>\n<p><span style=\"color: #0000ff;\">rpm -ivh\u00a0 fedora-ds-1.0.4-1.RHEL4.i386.opt.rpm<\/span><\/p>\n<p>After successful installation of fedora-ds package goto the \/opt\/fedora-ds directory.<\/p>\n<pre>#<\/pre>\n<p><span style=\"color: #0000ff;\">cd \/opt\/fedora-ds<\/span><\/p>\n<pre>#<\/pre>\n<p><span style=\"color: #0000ff;\">\u00a0.\/setup\/setup<\/span><\/p>\n<p>Select all the defaults and you just need to provide the admin and Directory Manager passwords.<\/p>\n<p>Or<\/p>\n<p>You can use the custom installation file<\/p>\n<pre>#<\/pre>\n<p><span style=\"color: #0000ff;\">.\/setup\/setup \u00a0-s \u2013f \/PATH OF FILE\/sample.inf<\/span><\/p>\n<p>A sample .inf file is listed below<\/p>\n<pre>[General]<\/pre>\n<pre>FullMachineName=\u00a0\u00a0 host2.example.com<\/pre>\n<pre>SuiteSpotUserID=\u00a0\u00a0 nobody<\/pre>\n<pre>ServerRoot=\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/usr\/lib\/fedora-ds<\/pre>\n<pre>[slapd]<\/pre>\n<pre>ServerPort=\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 389<\/pre>\n<pre>ServerIdentifier=\u00a0 myhost<\/pre>\n<pre>Suffix=\u00a0\u00a0 dc=host2,dc=example,dc=com<\/pre>\n<pre>RootDN=\u00a0\u00a0 cn=Directory Manager<\/pre>\n<pre>RootDNPwd=\u00a0\u00a0 password<\/pre>\n<pre><\/pre>\n<p>After the installation, start the server.<\/p>\n<pre><\/pre>\n<pre>#<\/pre>\n<p><span style=\"color: #0000ff;\">cd \/opt\/fedora-ds\/slapd-`hostname \u2013a`<\/span><\/p>\n<pre>#<\/pre>\n<p><span style=\"color: #0000ff;\">.\/start-slapd<\/span><\/p>\n<pre><\/pre>\n<p>To test the basic operation of the server, use the ldapsearch command:<\/p>\n<pre><\/pre>\n<pre>#<\/pre>\n<p><span style=\"color: #0000ff;\"> \/usr\/bin\/ldapsearch -x [-h &lt;your host&gt;] [-p &lt;your port&gt;] -s base -b &#8220;&#8221; &#8220;objectclass=*&#8221;\u00a0 (syntax)<\/span><\/p>\n<pre><\/pre>\n<pre><\/pre>\n<h4>Migration of LDAP:<\/h4>\n<pre><\/pre>\n<p>To migrate the ldap to new server you need to take the backup of schema(structure of ldap database) \u00a0and database.<\/p>\n<p>Login to host1.example.com<\/p>\n<pre><\/pre>\n<h5><strong>Schema backup:<\/strong><\/h5>\n<pre><\/pre>\n<pre>#<\/pre>\n<p><span style=\"color: #0000ff;\">cd \/opt\/fedora-ds\/slapd-`hostname \u2013a`\/<\/span><\/p>\n<pre><\/pre>\n<p>You can take the backup of schema in two ways.<\/p>\n<pre><\/pre>\n<pre><\/pre>\n<p>One is through ldapsearch<\/p>\n<pre> #<\/pre>\n<p><span style=\"color: #0000ff;\">ldapsearch -b cn=schema -L &#8220;(objectclass=*)&#8221; &gt; schema.ldif<\/span><\/p>\n<p>Copy the file to \/tmp of host2<\/p>\n<p><!--[if !supportLineBreakNewLine]--> Other way is to copy the schema folder \u00a0from the host1 to\u00a0 host2<\/p>\n<pre><\/pre>\n<pre>#<\/pre>\n<p><span style=\"color: #0000ff;\">scp \u2013r \/opt\/fedora-ds\/slapd-`hostname \u2013a`\/config\/sch* \\<\/span><span style=\"color: #0000ff;\">host2.example.com: \/opt\/fedora-ds\/slapd-`hostname \u2013a`\/config\/.<\/span><\/p>\n<pre><\/pre>\n<pre><\/pre>\n<h5><strong>Database backup :<\/strong><\/h5>\n<pre><\/pre>\n<pre>#<\/pre>\n<p><span style=\"color: #0000ff;\">\/opt\/fedora-ds\/slapd-`hostname \u2013a`<\/span><\/p>\n<pre>#<\/pre>\n<p><span style=\"color: #0000ff;\"> .\/db2ldif -s &#8220;dc=example,dc=com&#8221; -s &#8220;o=NetscapeRoot&#8221;\u00a0 \\<\/span><span style=\"color: #0000ff;\">-a \/tmp\/example-ldapRootDSE-`date +%m%d%y-%I%M%S`.ldif<\/span><\/p>\n<pre><\/pre>\n<p>Copy the backup file to \/tmp of host2 server .<\/p>\n<h4><strong>Schema and Database restoration :<\/strong><\/h4>\n<p>Note that this server should be in running state.<\/p>\n<pre><\/pre>\n<pre>#<\/pre>\n<p><span style=\"color: #0000ff;\">cd \/opt\/fedora-ds\/slapd-`hostname \u2013a`\/<\/span><\/p>\n<pre><\/pre>\n<pre>#<\/pre>\n<p><span style=\"color: #0000ff;\">.\/ldif2ldap &#8220;cn=Directory Manager&#8221;\u00a0 manager \/tmp\/schema.ldif <\/span><span style=\"color: #0000ff;\">( ignore this step, if you have copied schema directory to host2)<\/span><\/p>\n<pre><\/pre>\n<pre>#<\/pre>\n<p><span style=\"color: #0000ff;\">.\/ldif2ldap &#8220;cn=Directory Manager&#8221;\u00a0 manager \\<\/span><span style=\"color: #0000ff;\">\/tmp\/example-ldapRootDSE-xxxx.ldif<\/span><\/p>\n<pre><\/pre>\n<p><strong>Syntax:<\/strong><\/p>\n<p>.\/ldif2ldap &#8220;cn=Directory Manager&#8221;\u00a0 &lt;password&gt; \/PATH OF BACKUPFILE<\/p>\n<pre><\/pre>\n<pre><\/pre>\n<p>Now you will find the same data on both servers.<\/p>\n<pre><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; How to Migrate LDAP server to another\u00a0machine with same architecture? The following article explains simple way to install and [&hellip;]<\/p>\n","protected":false},"author":115,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[134],"tags":[],"class_list":["post-992","post","type-post","status-publish","format-standard","hentry","category-unix"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>LDAP Installation and Migration -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/onlineappsdba.com\/index.php\/2008\/12\/04\/ldap-installation-and-migration\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"LDAP Installation and Migration -\" \/>\n<meta property=\"og:description\" content=\"&nbsp; How to Migrate LDAP server to another\u00a0machine with same architecture? The following article explains simple way to install and [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/onlineappsdba.com\/index.php\/2008\/12\/04\/ldap-installation-and-migration\/\" \/>\n<meta property=\"article:published_time\" content=\"2008-12-04T11:11:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-03-13T21:56:29+00:00\" \/>\n<meta name=\"author\" content=\"Masroof Ahmad\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Masroof Ahmad\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/onlineappsdba.com\/index.php\/2008\/12\/04\/ldap-installation-and-migration\/\",\"url\":\"https:\/\/onlineappsdba.com\/index.php\/2008\/12\/04\/ldap-installation-and-migration\/\",\"name\":\"LDAP Installation and Migration -\",\"isPartOf\":{\"@id\":\"https:\/\/onlineappsdba.com\/#website\"},\"datePublished\":\"2008-12-04T11:11:13+00:00\",\"dateModified\":\"2014-03-13T21:56:29+00:00\",\"author\":{\"@id\":\"https:\/\/onlineappsdba.com\/#\/schema\/person\/909a876ed58d400faf82caf81d61bfdb\"},\"breadcrumb\":{\"@id\":\"https:\/\/onlineappsdba.com\/index.php\/2008\/12\/04\/ldap-installation-and-migration\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/onlineappsdba.com\/index.php\/2008\/12\/04\/ldap-installation-and-migration\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/onlineappsdba.com\/index.php\/2008\/12\/04\/ldap-installation-and-migration\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/onlineappsdba.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"LDAP Installation and Migration\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/onlineappsdba.com\/#website\",\"url\":\"https:\/\/onlineappsdba.com\/\",\"name\":\"\",\"description\":\"Oracle Implementation &amp; Training Experts\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/onlineappsdba.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/onlineappsdba.com\/#\/schema\/person\/909a876ed58d400faf82caf81d61bfdb\",\"name\":\"Masroof Ahmad\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/onlineappsdba.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/10f9db7bdbbd7f9ccfbe9b2d208e5978fc28315e9c704383e639a926ea0fce5f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/10f9db7bdbbd7f9ccfbe9b2d208e5978fc28315e9c704383e639a926ea0fce5f?s=96&d=mm&r=g\",\"caption\":\"Masroof Ahmad\"},\"url\":\"https:\/\/onlineappsdba.com\/index.php\/author\/masroof\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"LDAP Installation and Migration -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/onlineappsdba.com\/index.php\/2008\/12\/04\/ldap-installation-and-migration\/","og_locale":"en_US","og_type":"article","og_title":"LDAP Installation and Migration -","og_description":"&nbsp; How to Migrate LDAP server to another\u00a0machine with same architecture? The following article explains simple way to install and [&hellip;]","og_url":"https:\/\/onlineappsdba.com\/index.php\/2008\/12\/04\/ldap-installation-and-migration\/","article_published_time":"2008-12-04T11:11:13+00:00","article_modified_time":"2014-03-13T21:56:29+00:00","author":"Masroof Ahmad","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Masroof Ahmad","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/onlineappsdba.com\/index.php\/2008\/12\/04\/ldap-installation-and-migration\/","url":"https:\/\/onlineappsdba.com\/index.php\/2008\/12\/04\/ldap-installation-and-migration\/","name":"LDAP Installation and Migration -","isPartOf":{"@id":"https:\/\/onlineappsdba.com\/#website"},"datePublished":"2008-12-04T11:11:13+00:00","dateModified":"2014-03-13T21:56:29+00:00","author":{"@id":"https:\/\/onlineappsdba.com\/#\/schema\/person\/909a876ed58d400faf82caf81d61bfdb"},"breadcrumb":{"@id":"https:\/\/onlineappsdba.com\/index.php\/2008\/12\/04\/ldap-installation-and-migration\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/onlineappsdba.com\/index.php\/2008\/12\/04\/ldap-installation-and-migration\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/onlineappsdba.com\/index.php\/2008\/12\/04\/ldap-installation-and-migration\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/onlineappsdba.com\/"},{"@type":"ListItem","position":2,"name":"LDAP Installation and Migration"}]},{"@type":"WebSite","@id":"https:\/\/onlineappsdba.com\/#website","url":"https:\/\/onlineappsdba.com\/","name":"","description":"Oracle Implementation &amp; Training Experts","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/onlineappsdba.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/onlineappsdba.com\/#\/schema\/person\/909a876ed58d400faf82caf81d61bfdb","name":"Masroof Ahmad","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/onlineappsdba.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/10f9db7bdbbd7f9ccfbe9b2d208e5978fc28315e9c704383e639a926ea0fce5f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/10f9db7bdbbd7f9ccfbe9b2d208e5978fc28315e9c704383e639a926ea0fce5f?s=96&d=mm&r=g","caption":"Masroof Ahmad"},"url":"https:\/\/onlineappsdba.com\/index.php\/author\/masroof\/"}]}},"_links":{"self":[{"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/posts\/992","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/users\/115"}],"replies":[{"embeddable":true,"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/comments?post=992"}],"version-history":[{"count":0,"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/posts\/992\/revisions"}],"wp:attachment":[{"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/media?parent=992"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/categories?post=992"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/tags?post=992"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}