{"id":2450,"date":"2014-07-28T17:11:40","date_gmt":"2014-07-28T23:11:40","guid":{"rendered":"http:\/\/benincosa.com\/blog\/?p=2450"},"modified":"2014-11-19T11:23:55","modified_gmt":"2014-11-19T17:23:55","slug":"installing-cisco-dcnm-on-red-hat-linux","status":"publish","type":"post","link":"https:\/\/benincosa.com\/?p=2450","title":{"rendered":"Installing Cisco DCNM on Red Hat Linux"},"content":{"rendered":"<p>DCNM is Cisco&#8217;s GUI for managing MDS and Nexus products. \u00a0It&#8217;s pretty great for getting a visual of how things are configured and performing.<\/p>\n<p>I thought I would go into a little more detail than I&#8217;ve seen posted online about installing DCNM on RedHat Linux. \u00a0In this example we&#8217;ll be installing two servers. \u00a0One server will be our app server and the other one will be our Postgres database server. \u00a0You can do it all in just one server, but where is the fun in that?<\/p>\n<p><strong>1. Download binaries<\/strong><\/p>\n<p>From Cisco&#8217;s homepage, click support. \u00a0In the &#8216;Downloads&#8217; section start typing in &#8216;Data Center Network&#8217;. \u00a0(DCNM showed no results when I tried it) You&#8217;ll see the first entry is Cisco Prime DCNM as shown below.<\/p>\n<p><a href=\"http:\/\/benincosa.com\/blog\/wp-content\/uploads\/2014\/07\/c51541d95b8f5ce13af56c04f500248c.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-2451\" src=\"http:\/\/benincosa.com\/blog\/wp-content\/uploads\/2014\/07\/c51541d95b8f5ce13af56c04f500248c.png\" alt=\"c51541d95b8f5ce13af56c04f500248c\" width=\"1938\" height=\"982\" \/><\/a><\/p>\n<p>We will be using DCNM 6.3.2 since its the latest and works great. \u00a0We need to download 2 files.<\/p>\n<p><a href=\"http:\/\/benincosa.com\/blog\/wp-content\/uploads\/2014\/07\/a5d7fb529e317d463fc85375727c51211.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-2454\" src=\"http:\/\/benincosa.com\/blog\/wp-content\/uploads\/2014\/07\/a5d7fb529e317d463fc85375727c51211.png\" alt=\"a5d7fb529e317d463fc85375727c5121\" width=\"1520\" height=\"176\" \/><\/a><\/p>\n<p><a href=\"http:\/\/benincosa.com\/blog\/wp-content\/uploads\/2014\/07\/f7cd12ccc5167c06be64ed2580cbf085.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-2453\" src=\"http:\/\/benincosa.com\/blog\/wp-content\/uploads\/2014\/07\/f7cd12ccc5167c06be64ed2580cbf085.png\" alt=\"f7cd12ccc5167c06be64ed2580cbf085\" width=\"1554\" height=\"190\" \/><\/a><\/p>\n<p>The installer is really all you need, but its kind of nice to use the silent installer to script the installation process.<\/p>\n<p><strong>2. \u00a0Initial VM installation<\/strong><\/p>\n<p>Using the <a href=\"http:\/\/http:\/\/www.cisco.com\/c\/en\/us\/td\/docs\/switches\/datacenter\/sw\/6_x\/dcnm\/release\/notes\/dcnm_6_3_2_relnotes.html#pgfId-307022\">release notes<\/a> as our guide as well as other <a href=\"http:\/\/www.cisco.com\/c\/en\/us\/td\/docs\/switches\/datacenter\/sw\/6_x\/dcnm\/installation\/published\/install\/inst_SAN_prep.html\">installation instructions<\/a> we will be creating two VMs with the following characteristics:<\/p>\n<table>\n<tbody>\n<tr>\n<td>Processors<\/td>\n<td>2 x 2GHz cores<\/td>\n<\/tr>\n<tr>\n<td>Memory<\/td>\n<td>8GB (8096MB)<\/td>\n<\/tr>\n<tr>\n<td>Storage<\/td>\n<td>64-100GB<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>For this installation, we&#8217;re just doing this as a test, so you may need more space. \u00a0Also, notice that in the release notes it states that when doing LAN and SAN monitoring with DCNM you need to use an Oracle Database. \u00a0A Postgres Database is supported on just SAN for up to 2000 ports or just LAN for up to 1000 ports.<\/p>\n<p>Create these VMs. \u00a0I&#8217;m using KVM but you can use vSphere or Hyper-V.<\/p>\n<p><strong>3. \u00a0Operating System Installation\u00a0<\/strong><\/p>\n<p>The installation guides show that RHEL 5.4\/5.5\/5.6\/5.7\/6.4 (32-bit and 64-bit) are supported. \u00a0I&#8217;m using RHEL 6.5 x86_64. \u00a0It comes by default with PostgreSQL 8.4. \u00a0So I might be living on the edge a little bit, but I had 0 problems with the OS.<\/p>\n<p>I installed two machines:<\/p>\n<table>\n<tbody>\n<tr>\n<td>dcnm-app<\/td>\n<td>10.1.1.17<\/td>\n<\/tr>\n<tr>\n<td>dcnm-db<\/td>\n<td>10.1.1.18<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>During the installation, I changed 2 things, but other than setting up the network I accepted the defaults with nearly everything.<\/p>\n<p><strong>3.1 dcnm-app<\/strong><\/p>\n<p>I set up as a Desktop as shown below.<\/p>\n<p><a href=\"http:\/\/benincosa.com\/blog\/wp-content\/uploads\/2014\/07\/0b4a589c1a2dc22e91835e291f2e0dc7.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-2455\" src=\"http:\/\/benincosa.com\/blog\/wp-content\/uploads\/2014\/07\/0b4a589c1a2dc22e91835e291f2e0dc7.png\" alt=\"0b4a589c1a2dc22e91835e291f2e0dc7\" width=\"2054\" height=\"1488\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong>3.2 dcnm-db<\/strong><\/p>\n<p>Set up as a Database server as shown below<\/p>\n<p><a href=\"http:\/\/benincosa.com\/blog\/wp-content\/uploads\/2014\/07\/8aaad864f638c1760b7b8f3b220f3eb4.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-2456\" src=\"http:\/\/benincosa.com\/blog\/wp-content\/uploads\/2014\/07\/8aaad864f638c1760b7b8f3b220f3eb4.png\" alt=\"8aaad864f638c1760b7b8f3b220f3eb4\" width=\"2074\" height=\"1404\" \/><\/a><\/p>\n<p><strong>4. Operating System Configuration<\/strong><\/p>\n<p>There are several quick things to do to get this up and running. \u00a0You probably have OS hardening procedures at your organization, but this is howI did it to get up and running. \u00a0 Do the following on both servers.<\/p>\n<p><strong>4.1 Disable SELinux<\/strong><\/p>\n<p>Does anybody besides Federal agencies use this? \u00a0Edit \/etc\/sysconfig\/selinux.<\/p>\n<p>Change the line to be:<\/p>\n<pre>SELINUX=disabled.<\/pre>\n<p>This then requires a reboot.<\/p>\n<p><strong>4.2 Disable iptables<\/strong><\/p>\n<p>Yeah, I&#8217;m just closing the firewall. \u00a0There are some ports pointed out in the installation guide you can use to create custom firewalls, but I&#8217;m just leaving things wide open.<\/p>\n<pre>service iptables stop\r\nchkconfig --del iptables<\/pre>\n<p><strong>4.3 Enable YUM<\/strong><\/p>\n<p>If you set your server up with the RedHat network then you are ready to go. \u00a0I&#8217;m just going to keep it local bro! \u00a0I do this by mounting an expanded RedHat installation media \u00a0via NFS. \u00a0Here&#8217;s how I do it:<\/p>\n<pre>mkdir \/media\/rhel6.5\r\nmount 10.1.1.100:\/install\/rhels6.5\/x86_64\/media\/rhel6.5<\/pre>\n<p>If you are cool then you can put it in \/etc\/fstab so it persists.<\/p>\n<p>I then created the file \/etc\/yum.repos.d\/local.repo. \u00a0I edited it to look like the below:<\/p>\n<pre>[local]\r\nname=Red Hat Enterprise Linux $releasever - $basearch - Source\r\nbaseurl=file:\/\/\/media\/rhel6.5\r\nenabled=1\r\ngpgcheck=1\r\ngpgkey=file:\/\/\/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-redhat-release\r\n<\/pre>\n<p><strong>4.4 Install additional RPMs as needed<\/strong><\/p>\n<p>One that you will need on dcnm-app is glibc.i686<\/p>\n<pre>yum -y install glibc.i686\r\n<\/pre>\n<p><strong>5. Database Installation on dcnm-db<\/strong><\/p>\n<p>This step is only needed on dcnm-db. \u00a0Using the info from the <a href=\"%20http:\/\/www.cisco.com\/c\/en\/us\/td\/docs\/switches\/datacenter\/sw\/6_x\/dcnm\/installation\/published\/install\/inst_database.html\">database installation guide<\/a> we are using Postgres. \u00a0If you followed above like I did then you should just be able to see all the postgres RPMs installed.<\/p>\n<p>If not, then you can install them all with<\/p>\n<pre>yum -y groupinstall 'PostgreSQL Database Server'<\/pre>\n<p>Next, start up the data base:<\/p>\n<pre>service postgresql initdb\r\nservice postgresql start\r\n<\/pre>\n<p>With the default installation of Postgres on RedHat, a user named postgres is created who pretty much does everything. We use him to configure the database.<\/p>\n<pre>su - postgres\r\ncreated dcmdb\r\ncreateuser -P -s -e dcnmuser\r\n<\/pre>\n<p><strong>5.1 Postgres Config<\/strong><\/p>\n<p>Postgres on RHEL6.5 doesn&#8217;t accept network connections by default. \u00a0That makes it more secure. \u00a0To enable our App server to connect to it, we need to change two files.<\/p>\n<p><strong>\/var\/lib\/pgsql\/data\/postgresql.conf<\/strong><\/p>\n<p>Modify this file by adding the IP address for it to listen on. \u00a0By default its set to only listen for connections on &#8216;localhost&#8217;.<br \/>\nChange this line:<\/p>\n<pre>listen_addresses = 'localhost'         # what IP address(es) to listen on;\r\n<\/pre>\n<p>To look like this:<\/p>\n<pre>listen_addresses = '10.1.1.18,127.0.0.1'\r\n<\/pre>\n<p>Or you can just make it &#8216;*&#8217; (that says: listen on every interface). In my case this works because my Database servers IP address is 10.1.1.18, so I&#8217;m listening on eth0 and the local interface.<\/p>\n<p><strong>\/var\/lib\/pgsql\/data\/pg_hba.conf<\/strong><\/p>\n<p>Modify this file by adding in a line for our DCNM user. \u00a0At the bottom of the file I added this line:<\/p>\n<pre>host \u00a0 \u00a0dcmdb \u00a0 \u00a0 \u00a0 dcnmuser \u00a0 \u00a010.1.1.17\/32 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0md5\r\n<\/pre>\n<p>Once those two files are changed, restart postgres.<\/p>\n<pre>service postgresql restart\r\n<\/pre>\n<p>Now you should be ready to rock the Database server. We&#8217;ll check it in a minute. Now lets go over to the app server.<\/p>\n<p><strong>6. \u00a0Configure the App Server<\/strong><\/p>\n<p>You need to login via either VNC or on the console for XWindows. \u00a0VNC is probably the easiest way to see it remote.<\/p>\n<pre>yum -y install tigervnc-server<\/pre>\n<p>Start the VNC server and then you can VNC into it.<\/p>\n<pre>service vncserver start<\/pre>\n<p>You&#8217;ll then need to copy the dcmn installer that you downloaded from Cisco in step 1 as well as the properties file that you downloaded. \u00a0I put mine in the \/tmp directory. \u00a0Change this to be an executable by running:<\/p>\n<pre>chmod 755 \/tmp\/dcnm-installer*<\/pre>\n<p><strong>6.1 Modify the installer.properties<\/strong><\/p>\n<p>The dcnm-silent-installer-properties file is a zip file. \u00a0When expanded it has a directory called Postgres+Linux. \u00a0In this directory is the file we will use for our installation. \u00a0For the most part, I left it alone. \u00a0I just changed a few of the entries:<\/p>\n<pre>USE_EXISTING_DB=FALSE  # ! make sure you add this!\r\n#USE_EXISTING_DB=TRUE  # ! comment this out!\r\n\r\n#------------Use Existing Postgres--------------\r\nDCNM_DB_URL=jdbc\\:postgresql\\:\/\/10.1.1.18\\:5432\/dcmdb\r\nDCNM_DB_NAME=dcmdb\r\nSELECTED_DATABASE=postgresql\r\nDCNM_DB_USERNAME=dcnmuser\r\nDCNM_DB_USER_PASSWORD=Cisco.123\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>With that, we are ready to run!<\/p>\n<p><strong>7. Install DCNM<\/strong><\/p>\n<p>On the App server, we finally run:<\/p>\n<pre>dcnm-installer-x64-linux.6.3.2.bin -i silent -f \/tmp\/installer.properties<\/pre>\n<p>If all goes well, you should be able to open a browser to dcnm-app and see the Cisco login screen.<\/p>\n<p>Hurray!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>DCNM is Cisco&#8217;s GUI for managing MDS and Nexus products. \u00a0It&#8217;s pretty great for getting a visual of how things are configured and performing. I thought I would go into a little more detail than I&#8217;ve seen posted online about installing DCNM on RedHat Linux. \u00a0In this example we&#8217;ll be installing two servers. \u00a0One server&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[990,920,1],"tags":[380,382,381],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts\/2450"}],"collection":[{"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2450"}],"version-history":[{"count":2,"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts\/2450\/revisions"}],"predecessor-version":[{"id":2458,"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts\/2450\/revisions\/2458"}],"wp:attachment":[{"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2450"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2450"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2450"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}