View Full Version: install-nedi-on-ubuntu-606.sh

Obsolete! Nedi Forum > Nedi 1.0.x support > install-nedi-on-ubuntu-606.sh


Title: install-nedi-on-ubuntu-606.sh
Description: Script that will install Nedi on Ubuntu


tristanbob - June 15, 2006 09:29 PM (GMT)
The newest version of my install script for Ubuntu is version 2.0. Remo will soon include it in the "contrib" directory of NeDi, which is the best place to get it. (Formatting gets lost when I post the file here, and some lines are wrapping incorrectly.)

Instructions:

1. Download Nedi from http://www.nedi.ch/
2. Untar the Nedi archive onto your server.
3. The install script is located at "./nedi/contrib/install-nedi-on-ubuntu.sh"
4. Make sure you read the requirements and warnings at the beginning of the script! (also listed below)
5. Execute the script ( ./install-nedi-on-ubuntu.sh )
6. Follow the prompts on the screen
7. Your Nedi installation should be working!

Changes:

Version 2.0 allows the user to install the version of Nedi that the script came with. Previously, the install script would re-download a specific version of Nedi.

Support:

Please reply to this post if you run into any issues or have a suggestion. My goal is to create official Debian/Ubuntu packages, but I am looking for a mentor.


CODE

#!/bin/bash
# NeDi (Network Discovery Suite) Install Script
# install-nedi-on-ubuntu.sh (v 2.0) 02/09/2007
# Tristan Rhodes

clear
echo ""
echo "     This script will install Nedi on Ubuntu 6.06 or 6.10"
echo ""
echo "     ---------- WARNING ----------"
echo "     You should only run this script ONCE."
echo "     You should only run this script on a clean install of Ubuntu"
echo "     Your original configuration files will be saved with a .orig extension"
echo "     UNSUPPORTED -  Use at your own risk.   "
echo "     ---------- WARNING ----------"
echo ""
echo "     Created by Tristan Rhodes"
echo "     http://useopensource.blogspot.com"
echo ""
echo -n "     Hit Return to continue or Ctrl-C to exit : "
read foo

c7borg - July 6, 2006 11:54 AM (GMT)
I works very well, or should I say your script does.. now I guess it's down to me to fill in the conf file...

I thought it was going to be simular to Netdisco where as the program discovers and gathers the information for you.. ahh well i shall have play

many thanks

Andrew.

rufer - July 20, 2006 12:46 PM (GMT)
That's just excellent. It's also a very good installation guide :)

Greetings
Rufer

renejorissen - August 16, 2006 11:00 AM (GMT)
The script is working perfectly. I have updated the script to use rc2. It is working perfectly to. You only need to change the download location and the tar command. And I had to adjust line 206.

Instead of opts="-Cob" it should be "-cob".


tristanbob - August 16, 2006 02:32 PM (GMT)
renejorissen,

Thanks for testing the script. I have created a new version (1.1) which should now be posted at the top of this thread.

It now supports RC1 and RC2, giving the user the option on which one to install. I also fixed several errors, including the one you mentioned.

Thanks again for your input!

Tristan Rhodes

renejorissen - August 17, 2006 08:16 AM (GMT)
Tristanbob,

I see that you also fixed the telnet problem. I forgot to meantion that one. The default user credentials for rc1 and rc2 are different, so I had to adjust them myself.

I see you noticed that also.

Thanks for fixing

oxo - November 9, 2006 03:03 PM (GMT)
Good work :)

However, you need a test for the installing packages
I forgot to put my Ubuntu CD in and didn't see all the error messages ...
Got as far as nedi init db and perl died 'cos of no Diff ...

I'm installing on a NOT newly installed Ubuntu so...(which may be the case for some users):

Little problem here:
CODE

Login via https:///html/
Username: admin
Password: admin


Probably because of 2 things: apache couldn't resolve machine name via DNS and because this is NOT a new installation
CODE

mv: cannot overwrite directory `/opt/nedi'
ln: creating symbolic link `/var/www/html' to `/opt/nedi/html/': File exists
ln: creating symbolic link `/etc/nedi.conf' to `/opt/nedi/nedi.conf': File exists * Forcing reload of apache 2.0 web server... [Thu Nov 09 16:00:07 2006] [error] (EAI 2)Name or service not known: Cannot resolve host name *:80 --- ignoring![Thu Nov 09 16:00:07 2006] [error] (EAI 2)Name or service not known: Cannot resolve host name *:80 --- ignoring![Thu Nov 09 16:00:07 2006] [error] (EAI 2)Name or service not known: Cannot resolve host name *:443 --- ignoring![Thu Nov 09 16:00:07 2006] [error] (EAI 2)Name or service not known: Cannot resolve host name *:443 --- ignoring!apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName[Thu Nov 09 16:00:07 2006] [error] (EAI 2)Name or service not known: Cannot resolve host name *:80 --- ignoring![Thu Nov 09 16:00:07 2006] [error] (EAI 2)Name or service not known: Cannot resolve host name *:80 --- ignoring![Thu Nov 09 16:00:07 2006] [error] (EAI 2)Name or service not known: Cannot resolve host name *:443 --- ignoring![Thu Nov 09 16:00:08 2006] [error] (EAI 2)Name or service not known: Cannot resolve host name *:443 --- ignoring!apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName(98)Address already in use: make_sock: could not bind to address [::]:443
no listening sockets available, shutting down
Unable to open logs



I'll be testing the new Ubuntu 6.10 release latter ..(new installation)

I'll come back and edit most of this post away after I have reinstalled my Thinkpad ...

tristanbob - November 9, 2006 08:17 PM (GMT)
Owen,

You will need internet access to install the additional packages necessary for Nedi. My install script should setup your repositories correctly to get the packages from the internet.

That said, you made a good point that I should test that the dependancies were installed and let the user know. I will have to think of a good way to test that. Any ideas?

Tristan

oxo - November 9, 2006 09:23 PM (GMT)
CUT and PASTE seems unsafe
= goes to == when I did it in the [ ] areas ...

Give possiblity for SNMP only (no backup vty username etc)
If you are trying a proram don't give all the rights ...

(Internet to add packages: Ubuntu is strange, cd in repository list and not in tray gives strange results).

You've been busy since I was last on: I'll look thru what you've written.

I hope to be back on nedi again as I now have code that can save in a DB2 database

AND I HOPE RIKKI WILL SOON START WITH CVS (or SVN)... :)

I've had a lot of work with supporting Netview (~HP OV) but I think I'm on top of it now

Are you on irc ...
Anyone want to make a #nedi on freenode...

ob@net-ob-t43:~$ sudo apt-get install bad-package
Password:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package bad-package
ob@net-ob-t43:~$ echo $?
100

ie check for return code = 0

The choice of nedi should be Nedi 1.0 or bleeding edge where there are contstant availabe via download (had to alter code to get R3 ..)

oxo - November 13, 2006 02:21 PM (GMT)
Seems to work for edubuntu 6.10

firstnamelastname - November 13, 2006 04:46 PM (GMT)
Has anyone modified the above script to handle RC3?

I've installed RC3 by manually typing most of the the above to see output or errors

RC3 works great except for missing graphs on all pages - shows a broken link icon

if anyone has any insight please post

thanks

tristanbob - November 13, 2006 05:42 PM (GMT)
You will find the latest version of this file is already included in RC3! Just download RC3, untar the archive, and then look in the contrib directory.

I have successfully installed RC3 using that script, but I have not tested every aspect of Nedi. It does look like the graphs are broken... I will have to see why that is.

If you have more information, or can help me improve it, please post again.

Tristan

rickli - November 14, 2006 07:45 AM (GMT)
I probably forgot to mention this. You'll need a ln -s in html/inc to your rrd folder...

firstnamelastname - November 15, 2006 02:15 AM (GMT)
That Worked!!!

Linking the RRD directory worked - We've also had some other problems

1 - Export tool not working - (Fixed by our resident Linux guy) error in a file
2 - Clicking on tables results in errors
3 - Custom maps don't seem to work or render right (not a big deal in my book)
4 - Get the error about line 91 snmp.pl - I've seen this in other post and seems to be a common error - I haven't seen it adversely affect things though

Can't say enough about your application - it's wonderful - can't wait for future releases.

We also have some devices not showing right (Cisco 2970, Cisco 2924) I'm assuming no dev file for these devices.

Is there a way to manually remove devices and or use the filter portion of the nedi.conf file - we've had printers (zebra, hp) show up when using the public snmp string - no big deal here either but would like the ability to remove a single device.

Thanks for everything

tristanbob - November 17, 2006 04:25 PM (GMT)
Yup, it looks like there was a bad link to the rrd directory, and will be fixed in future versions of Nedi. See this post to read more about it:
http://z11.invisionfree.com/Nedi/index.php?showtopic=394

1. What did this "guru" do to fix it? (So that we can fix it for everyone)

2. I assume you mean clicking on the icons in the "Device>Table" page? I get this error too, but I have not setup my devices with the proper SNMP location strings yet.

3. This is related to the SNMP location string as well.

4. I think this is related to some of the def files being in DOS format. See this post to fix the problem:
http://z11.invisionfree.com/Nedi/index.php?showtopic=392

We have added several def files, and they should be available in the next version of Nedi. (Including several types of 2924 switches)

Thanks for the positive review!

Tristan

oxo - November 18, 2006 05:45 PM (GMT)
It could be an idea to add:
mysql-admin

oxo - November 21, 2006 09:45 AM (GMT)

startnedi.sh should have

$($CMD >> $LASTRUN 2>&1)

tristanbob - November 21, 2006 09:03 PM (GMT)
Owen,

I have made the change in the install script. That should put both standard output AND error output into the lastrun file.

Have you tested it with that change?

Tristan

oxo - November 22, 2006 03:17 PM (GMT)
It is running ok with 2>>&1

mercurysys - February 8, 2007 08:15 PM (GMT)
Help! I continually get [ : 49: ==: unexpected operator error and asks me to select a version to install when I select a version to install. This is on Ubuntu server 6.10 using the install.sh version 1.2 that is in the contrib folder.

tristanbob - February 8, 2007 09:47 PM (GMT)
mercurysys,

I am creating a new version of the installer that will be ready by this week.

The first thing you can try is change the first line to use /bin/bash instead of /bin/sh.

Keep you eyes posted to this thread. (You can subscribe to it as well)

Tristan

mercurysys - February 9, 2007 02:02 PM (GMT)
To quote the Toyota commercial "Saweet". I will be waiting.

tristanbob - February 9, 2007 04:32 PM (GMT)
I have updated this thread with the newest version of my install script, which is version 2.0. See the first post in this thread for more information.




* Hosted for free by InvisionFree