Friday, July 8, 2011

Installing and setting up netdot on Ubuntu 10.04 to 11.04

This is how to set up  netdot (from the University of Oregon) on Ubuntu. I've only tested this on Ubuntu 10.04 and 10.10 but there's no reason why it shouldn't work on 11.04 as well.

First of all install Apache and MySQL and Apache perl modules using the following commands.

sudo apt-get install apache2 apache2-dev mysql-server mysql-client \
libapache2-mod-perl2 libapache2-mod-perl2-dev build-essential 

When asked for a root password for MySQL provide one and remember it.

Download the latest version of netdot from here. (Not the VM, the Source Code) I used version 0.99.

Extract the package and change directory into it.

tar -xvzf netdot-0.99.tar.gz
cd netdot-0.99 

Netdot needs a whole lot of dependencies for it to install correctly. You can check which dependencies are missing by using the command:

make testdeps

You will get a long list of various packages needed by netdot and whether they are installed. Chances are, most of them will not be installed. You find and install them one by one, by the creators of netdot have very thoughtfully provided us with a handy script to take care of all that. Just type:

sudo make installdeps-apt-get

At the end of all the installing, it will download a file called oui.txt or something. You will see a list of organizations or something. Don't worry if it gets seems to get stuck some way down. Just terminate it.


Run make testdeps again to see if everything is installed. If everything went smoothly all the dependencies should now be ok. IF you are running 0.98 you will need to additionally install two more packages.

sudo apt-get install libssl-dev rrdtool

If all the dependencies are ok, you can get on with installing netdot, (If some of the dependencies have not been installed for some reason, you can try to install them manually) but first you must change the configuration file. Make a copy of the default config file that is provided, name it as Site.conf and open it for editing.

cp etc/Default.conf etc/Site.conf 

Include your MySQL root password in DB_DBA_PASSWORD.

Install netdot using the following command.

sudo make install APACHEUSER=www-data APACHEGROUP=www-data 


Install the database and populate it with default values.

sudo make installdb

Now you need to tell Apache what modules to load, where to find netdot etc... Just create a sym-link to the provided configuration file inside Apache's conf.d directory and restart Apache.

ln -s /usr/local/netdot/etc/netdot_apache2_local.conf /etc/apache2
/conf.d
service apache2 graceful

Now you should be able to access the netdot web interface at http://localhost/netdot
Default user name: admin,  password: admin

If netdot isn't able to discover devices, i.e, you get a

"ERROR - Device::_get_snmp_session: Cannot connect to domain.net. Tried communities: community " 

error, you need to install the following package

sudo apt-get install snmp-mibs-downloader


Then, edit your config file ( /usr/local/netdot/etc/Site.conf )

sudo vim /usr/local/netdot/etc/Site.conf

Comment out the line that says ":mibs", save and exit, restart Apache and you will be good to go.

2 comments:

Unknown said...

I keep getting this eror message
mod_perl is already running, too late for PerlSwitches

fhngiuwsshnfiuahngnuiahfuid said...

I think for the last step you mean /etc/snmp/snmp.conf - not the Site.conf

Post a Comment