DCNM is Cisco’s GUI for managing MDS and Nexus products. It’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’ve seen posted online about installing DCNM on RedHat Linux. In this example we’ll be installing two servers. One server will be our app server and the other one will be our Postgres database server. You can do it all in just one server, but where is the fun in that?
1. Download binaries
From Cisco’s homepage, click support. In the ‘Downloads’ section start typing in ‘Data Center Network’. (DCNM showed no results when I tried it) You’ll see the first entry is Cisco Prime DCNM as shown below.
We will be using DCNM 6.3.2 since its the latest and works great. We need to download 2 files.
The installer is really all you need, but its kind of nice to use the silent installer to script the installation process.
2. Initial VM installation
|Processors||2 x 2GHz cores|
For this installation, we’re just doing this as a test, so you may need more space. Also, notice that in the release notes it states that when doing LAN and SAN monitoring with DCNM you need to use an Oracle Database. A Postgres Database is supported on just SAN for up to 2000 ports or just LAN for up to 1000 ports.
Create these VMs. I’m using KVM but you can use vSphere or Hyper-V.
3. Operating System Installation
The installation guides show that RHEL 5.4/5.5/5.6/5.7/6.4 (32-bit and 64-bit) are supported. I’m using RHEL 6.5 x86_64. It comes by default with PostgreSQL 8.4. So I might be living on the edge a little bit, but I had 0 problems with the OS.
I installed two machines:
During the installation, I changed 2 things, but other than setting up the network I accepted the defaults with nearly everything.
I set up as a Desktop as shown below.
Set up as a Database server as shown below
4. Operating System Configuration
There are several quick things to do to get this up and running. You probably have OS hardening procedures at your organization, but this is howI did it to get up and running. Do the following on both servers.
4.1 Disable SELinux
Does anybody besides Federal agencies use this? Edit /etc/sysconfig/selinux.
Change the line to be:
This then requires a reboot.
4.2 Disable iptables
Yeah, I’m just closing the firewall. There are some ports pointed out in the installation guide you can use to create custom firewalls, but I’m just leaving things wide open.
service iptables stop chkconfig --del iptables
4.3 Enable YUM
If you set your server up with the RedHat network then you are ready to go. I’m just going to keep it local bro! I do this by mounting an expanded RedHat installation media via NFS. Here’s how I do it:
mkdir /media/rhel6.5 mount 10.1.1.100:/install/rhels6.5/x86_64/media/rhel6.5
If you are cool then you can put it in /etc/fstab so it persists.
I then created the file /etc/yum.repos.d/local.repo. I edited it to look like the below:
[local] name=Red Hat Enterprise Linux $releasever - $basearch - Source baseurl=file:///media/rhel6.5 enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
4.4 Install additional RPMs as needed
One that you will need on dcnm-app is glibc.i686
yum -y install glibc.i686
5. Database Installation on dcnm-db
This step is only needed on dcnm-db. Using the info from the database installation guide we are using Postgres. If you followed above like I did then you should just be able to see all the postgres RPMs installed.
If not, then you can install them all with
yum -y groupinstall 'PostgreSQL Database Server'
Next, start up the data base:
service postgresql initdb service postgresql start
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.
su - postgres created dcmdb createuser -P -s -e dcnmuser
5.1 Postgres Config
Postgres on RHEL6.5 doesn’t accept network connections by default. That makes it more secure. To enable our App server to connect to it, we need to change two files.
Modify this file by adding the IP address for it to listen on. By default its set to only listen for connections on ‘localhost’.
Change this line:
listen_addresses = 'localhost' # what IP address(es) to listen on;
To look like this:
listen_addresses = '10.1.1.18,127.0.0.1'
Or you can just make it ‘*’ (that says: listen on every interface). In my case this works because my Database servers IP address is 10.1.1.18, so I’m listening on eth0 and the local interface.
Modify this file by adding in a line for our DCNM user. At the bottom of the file I added this line:
host dcmdb dcnmuser 10.1.1.17/32 md5
Once those two files are changed, restart postgres.
service postgresql restart
Now you should be ready to rock the Database server. We’ll check it in a minute. Now lets go over to the app server.
6. Configure the App Server
You need to login via either VNC or on the console for XWindows. VNC is probably the easiest way to see it remote.
yum -y install tigervnc-server
Start the VNC server and then you can VNC into it.
service vncserver start
You’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. I put mine in the /tmp directory. Change this to be an executable by running:
chmod 755 /tmp/dcnm-installer*
6.1 Modify the installer.properties
The dcnm-silent-installer-properties file is a zip file. When expanded it has a directory called Postgres+Linux. In this directory is the file we will use for our installation. For the most part, I left it alone. I just changed a few of the entries:
USE_EXISTING_DB=FALSE # ! make sure you add this! #USE_EXISTING_DB=TRUE # ! comment this out! #------------Use Existing Postgres-------------- DCNM_DB_URL=jdbc\:postgresql\://10.1.1.18\:5432/dcmdb DCNM_DB_NAME=dcmdb SELECTED_DATABASE=postgresql DCNM_DB_USERNAME=dcnmuser DCNM_DB_USER_PASSWORD=Cisco.123
With that, we are ready to run!
7. Install DCNM
On the App server, we finally run:
dcnm-installer-x64-linux.6.3.2.bin -i silent -f /tmp/installer.properties
If all goes well, you should be able to open a browser to dcnm-app and see the Cisco login screen.