How to install NetDoT on Ubuntu 16.04

how to install netdot on ubuntu 16

As mentioned on the official Netdot website, Netdot is an open source tool designed to help network administrators collect, organize and maintain network documentation.

Netdot is actively developed by the Network and Telecommunication Services group of the University of Oregon.

Netdot features include:

  • Device discovery via SNMP

  • Layer 2 topology discovery and graphing, using multiple sources of information: CDP+LLDP, Spanning Tree Protocol, switch forwarding tables, router point-to-point subnets.

  • IPv4 and IPv6 address space management (also referred to as IPAM), including hierarchical organization, address block visualization and IP and MAC address location and tracking.

  • Cable plant information including: sites, rooms, jacks, closets, inter and intra-building wiring, circuits, etc.

  • Contact information for related entities: departments, providers, vendors, etc.

  • Netdot can generate configuration files for various other tools, including:

  • Netdot implements role-based access control, allowing tasks such as IP address management, documentation of switch/router ports and updating of contact information to be delegated to specific groups with limited access to the web interface.

Prerequisites:

  • Fresh installation of Ubuntu 16.04 server
  • Pre-installed Apache and MySQL
  • Internet connection

You can follow below instructions to begin the installation process

  • Login as the ROOT into the system, we will work as the ROOT during the entire process.
  • Install MySQL Server, and set the root password 
    • apt-get install mysql-server
    • If it didn't ask for the password, then after the installation you have to change it by executing: mysql_secure_installation and follow the given instructions.
    • Please remember this root password, as it will be used for the Netdot configuration.
    • systemctl status mysql.service
  • Install Apache 
    • apt-get install apache2 -y
    • systemctl start apache2.service
    • systemctl status apache2.service
    • Now check the apache status by browsing the address http://your_host_ip_address/
  • Netdot Installation. At any location/directory, execute the code below:
    • git clone https://github.com/cvicente/Netdot.git
    • cd Netdot
    • apt-get install build-essential
    • make apt-install
    • This will take some time to finish it, please be patient
    • Type 'mysql' when it asks for the below question
      • Which RDBMS do you plan to use as backend: [mysql|Pg]? mysql
    • Press Y for the following question
      • We need to add a temporary repository of Netdot dependencies until all packages are in Debian/Ubuntu official repositories.
      • Would you like to continue? [y/n] y
    • Also input Y then ENTER for the following questions
      • We will install the MIB files now. Continue? [y/n] y
      • A new /etc/snmp/snmp.conf needs to be installed to point to the newly installed MIB files. The current file will be backed up. Continue? [y/n] y
    • If you get MIBS downloading error, then follow the steps below:
      • mkdir /tmp/netdisco-mibs
      • cd /tmp/netdisco-mibs
      • wget https://sourceforge.net/projects/netdisco/files/netdisco-mibs/1.0/netdisco-mibs-1.0.tar.gz
      • cd back to your Netdot directory
      • make apt-install
    • The result of all modules should be ok, otherwise you have to install them manually
    • To test for missing modules in your system, run: make testdeps
    • In case you get any missing modules, you can install it by run the following command:
      • make installdeps
    • To install the missing modules manually, you can use CPAN to install by execute the following command:
      • cpan
        • install Module::Blah (enter the missing module name here)
  • Netdot configuration
    • Still on the Netdot directory
    • cp etc/Default.conf etc/Site.conf
    • vi etc/Site.conf
    • Please modify the configurations below according to your needs:
      • NETDOTNAME => 'CAHANGE_ME',
      • DB_DBA_PASSWORD => 'CAHANGE_ME', //(the password you used when installing mysql)
      • DEFAULT_SNMPCOMMUNITIES  =>  ['CAHANGE_ME'],
      • NMS_DEVICE => 'localhost',
      • DEFAULT_DNSDOMAIN  => 'CAHANGE_ME',
      • DEVICE_NAMING_METHOD_ORDER => [ 'snmp_target', 'sysname', 'highest_ip', 'lowest_loopback' ],
  • We need to patch the files by the following tasks (please adjust your Netdot directory accordingly):
    • cd / 
    • patch -p0 < ~/Netdot/patches/ubuntu-1604/DBI.pm.patch
    • patch -p0 < ~/Netdot/patches/ubuntu-1604/apache2-init.patch
  • Install the database application and the Netdot itself (note that some command below is a single line command)
    • cd back to Netdot directory
    • make installdb
    • make install APACHEUSER=www-data APACHEGROUP=www-data
    • ln -s /usr/local/netdot/etc/netdot_apache24_local.conf \ /etc/apache2/conf-available/netdot.conf
    • a2enconf netdot
    • systemctl restart apache2
    • If you don't get any error, then you are good to go, otherwise, you'll have to fix the error shown on the screen.
  • Copy the Netdot's cron to the system:
    • cp netdot.cron /etc/cron.d/netdot
  • Login to the Netdot on your browser by typing http://your_host_ip_address/netdot 
    • Username: admin  
    • Password: admin

Adding the devices:

    • On the Management>Devices Click on the [new] option on the right side
    • On the 'Discover Device' under 'Device Tasks' input your desired device IP or domain
    • Leave the SNMP version as default
    • Choose your SNMP Community according to what you have configured on the Site.conf file.
    • Hit the 'Discover' button, it will take a while to search for the device
    • After succeed adding the device, you need to change the 'Used by' option to your device type, such as Cisco and hit the 'Update' button
  • Congratulations, you have your own Netdot on your system.

Additional information

  • If you run apt update and get the error below:
E: The repository 'http://netdot.apt.nsrc.org unstable/ Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
  • Then do some tweak on the netdot repository
    • sudo vi /etc/apt/sources.list.d/netdot.apt.nsrc.org.list
    • Add "[trusted=yes]" after the "deb" and "deb-src" lines
      • From
        • deb http://netdot.apt.nsrc.org/ unstable/
        • deb-src http://netdot.apt.nsrc.org/ unstable/
      • To
        • deb [trusted=yes] http://netdot.apt.nsrc.org/ unstable/
        • deb-src [trusted=yes] http://netdot.apt.nsrc.org/ unstable/
  • Now you can proceed to the system update

Aapache2 service auto shutdown everyday

I have experienced apache2 service automatically stopped everyday, so I have to start the service manually from the server. I still don't know where is the problem came from. To solve this, I have to put an script to automatically bring up the apache2 service every day at 7:00am. This bash script is also work for another services as well. Follow the instructions below:
  • mkdir /root/scripts
  • cd /root/scripts
  • vi apache_autostart.sh
  • Then copy the content below into the files and save it. Please adjust the setting to your needs
    #!/bin/bash
    serv=apache2
    sstat=$(pidof $serv | wc -l )
    if [ $sstat -gt 0 ]
    then
    echo "$serv service is up!!!"
    else
    echo "$serv is down!!!"
    systemctl start $serv
    echo "$serv service is up now!!!" | mail -s "$serv service on the $(hostname) server is up again" yourmail@mail.com
    fi


  • chmod +x apache_autostart.sh
  • crontab -e
  • Add the below line to your crontab, then save and exit:
        0 7 * * * /bin/bash /root/scripts/apache2_autostart.sh
  • Now the script will check the apache2 service everyday at 7:00am to make sure that the service is active and up. You will also receive an confirmation email about the service as well.

Sources

Propellerads
Propellerads

Disqus

Name

4G,2,Adobe Products,1,Adultos,1,Aileu,1,Ainaro,1,Android,6,Antivirus,1,APKpure,2,AutoCAD,1,Baucau,1,cms,1,Comics,6,Computer,10,CorelDRAW,1,CV,1,Dados,13,daw,2,Design,2,Dili,1,Download,36,E-book,4,Education,11,Edudaction,3,Ermera,1,Facebook,1,featured,20,FTP,1,Home Design,1,hosting,2,IM server,3,Internet,8,Iphone,1,Jogos,4,Lifestyle,2,Linux,5,Liquica,1,Lospalos,1,Maliana,1,Manatuto,1,Motivation,5,Music,10,MusicChart,1,Networking,3,Oecusse,1,Office,2,Photo,1,Photo Editor,2,Quiz,1,ring,1,Same,1,sapotl,1,sapotransfer,1,Server,4,Simulator,2,SMS,1,Suai,1,Tips,32,Tools,14,Trabalho,2,tutorial,7,Video,2,Viqueque,1,WhatsApp,3,wordpress,1,zipcode,13,
ltr
item
Oppa Newbie Blog: How to install NetDoT on Ubuntu 16.04
How to install NetDoT on Ubuntu 16.04
how to install netdot on ubuntu 16
Oppa Newbie Blog
https://www.onbtl.net/2020/07/how-to-install-netdot-on-ubuntu-1604.html
https://www.onbtl.net/
https://www.onbtl.net/
https://www.onbtl.net/2020/07/how-to-install-netdot-on-ubuntu-1604.html
true
7485714727160759481
UTF-8
Loaded All Posts La Hetan Post Ruma HARE HOTU Lee Liutan Resposta Kansela Resposta Apaga Husi Varanda PAJINA POST Hare Hotu REKOMENDA BA BELUN LABEL ARKIVU BUKA POST HOTU La hetan post ruma nebe hanesan ida nebe belun buka Back Home Domingu Segunda Tersa Kuarta Kinta Sexta Sabadu Dom Seg Ter Kua Kin Sex Sab Janeiru Febreiru Marsu Abril Maiu Junu Julu Agostu Setembru Outubru Novembru Dezembru Jan Feb Mar Apr Maiu Jun Jul Ago Set Out Nov Dez foin lalais Minutu 1 liu ba $$1$$ minutes ago Oras 1 liu ba $$1$$ hours ago Horseik $$1$$ days ago $$1$$ weeks ago liu semana 5 liu ba Tuir nain sira Tuir THIS PREMIUM CONTENT IS LOCKED PASU 1: Fahe. PASU 2: Klik iha ligasaun nebe belun fahe hodi unlock Kopia kodigu hotu Hili kodigu hotu Kodigu hotu kopia tiha ona ba iha clipboard Lakohi kopia kodigu / testu, favor hanehan [CTRL]+[C] (or CMD+C ba Mac) hodi kopia