特殊:Badtitle/NS100:NediHowTo
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/NediHowTo }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/af | • {{#if: UbuntuHelp:NediHowTo|Afrikaans| [[::NediHowTo/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/ar | • {{#if: UbuntuHelp:NediHowTo|العربية| [[::NediHowTo/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/az | • {{#if: UbuntuHelp:NediHowTo|azərbaycanca| [[::NediHowTo/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/bcc | • {{#if: UbuntuHelp:NediHowTo|جهلسری بلوچی| [[::NediHowTo/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/bg | • {{#if: UbuntuHelp:NediHowTo|български| [[::NediHowTo/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/br | • {{#if: UbuntuHelp:NediHowTo|brezhoneg| [[::NediHowTo/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/ca | • {{#if: UbuntuHelp:NediHowTo|català| [[::NediHowTo/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/cs | • {{#if: UbuntuHelp:NediHowTo|čeština| [[::NediHowTo/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/de | • {{#if: UbuntuHelp:NediHowTo|Deutsch| [[::NediHowTo/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/el | • {{#if: UbuntuHelp:NediHowTo|Ελληνικά| [[::NediHowTo/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/es | • {{#if: UbuntuHelp:NediHowTo|español| [[::NediHowTo/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/fa | • {{#if: UbuntuHelp:NediHowTo|فارسی| [[::NediHowTo/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/fi | • {{#if: UbuntuHelp:NediHowTo|suomi| [[::NediHowTo/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/fr | • {{#if: UbuntuHelp:NediHowTo|français| [[::NediHowTo/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/gu | • {{#if: UbuntuHelp:NediHowTo|ગુજરાતી| [[::NediHowTo/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/he | • {{#if: UbuntuHelp:NediHowTo|עברית| [[::NediHowTo/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/hu | • {{#if: UbuntuHelp:NediHowTo|magyar| [[::NediHowTo/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/id | • {{#if: UbuntuHelp:NediHowTo|Bahasa Indonesia| [[::NediHowTo/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/it | • {{#if: UbuntuHelp:NediHowTo|italiano| [[::NediHowTo/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/ja | • {{#if: UbuntuHelp:NediHowTo|日本語| [[::NediHowTo/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/ko | • {{#if: UbuntuHelp:NediHowTo|한국어| [[::NediHowTo/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/ksh | • {{#if: UbuntuHelp:NediHowTo|Ripoarisch| [[::NediHowTo/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/mr | • {{#if: UbuntuHelp:NediHowTo|मराठी| [[::NediHowTo/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/ms | • {{#if: UbuntuHelp:NediHowTo|Bahasa Melayu| [[::NediHowTo/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/nl | • {{#if: UbuntuHelp:NediHowTo|Nederlands| [[::NediHowTo/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/no | • {{#if: UbuntuHelp:NediHowTo|norsk| [[::NediHowTo/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/oc | • {{#if: UbuntuHelp:NediHowTo|occitan| [[::NediHowTo/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/pl | • {{#if: UbuntuHelp:NediHowTo|polski| [[::NediHowTo/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/pt | • {{#if: UbuntuHelp:NediHowTo|português| [[::NediHowTo/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/ro | • {{#if: UbuntuHelp:NediHowTo|română| [[::NediHowTo/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/ru | • {{#if: UbuntuHelp:NediHowTo|русский| [[::NediHowTo/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/si | • {{#if: UbuntuHelp:NediHowTo|සිංහල| [[::NediHowTo/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/sq | • {{#if: UbuntuHelp:NediHowTo|shqip| [[::NediHowTo/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/sr | • {{#if: UbuntuHelp:NediHowTo|српски / srpski| [[::NediHowTo/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/sv | • {{#if: UbuntuHelp:NediHowTo|svenska| [[::NediHowTo/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/th | • {{#if: UbuntuHelp:NediHowTo|ไทย| [[::NediHowTo/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/tr | • {{#if: UbuntuHelp:NediHowTo|Türkçe| [[::NediHowTo/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/vi | • {{#if: UbuntuHelp:NediHowTo|Tiếng Việt| [[::NediHowTo/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/yue | • {{#if: UbuntuHelp:NediHowTo|粵語| [[::NediHowTo/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/zh | • {{#if: UbuntuHelp:NediHowTo|中文| [[::NediHowTo/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/zh-hans | • {{#if: UbuntuHelp:NediHowTo|中文(简体)| [[::NediHowTo/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:NediHowTo | UbuntuHelp:NediHowTo | {{#if: | :}}NediHowTo}}/zh-hant | • {{#if: UbuntuHelp:NediHowTo|中文(繁體)| [[::NediHowTo/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:NediHowTo|:NediHowTo|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :NediHowTo/zh | | {{#ifexist: NediHowTo/zh | | {{#ifeq: {{#titleparts:NediHowTo|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:NediHowTo|1|-1|}} | zh | | }}
0. Enable the extra software repositories:
- Go to: System > Administration > Software Properties
- Click on all the empty checkboxes to enable the additional software repositories
1. Install dependencies:
sudo apt-get install apache2 libapache2-mod-php5 mysql-server libnet-snmp-perl php5-mysql libnet-telnet-cisco-perl php5-snmp php5-gd libalgorithm-diff-perl rrdtool
Note: The command listed above needs to be on one line
2. Setup SSL on the Apache2 webserver:
IMPORTANT – You should always use SSL because Nedi contains a great amount of information about your network. Here is a great step-by-step tutorial on How|to setup SSL in Ubuntu
3. Download Nedi:
wget http://nedi.ch/lib/exe/fetch.php?id=files%3Adownload&cache=cache&media=files:nedi-1.0-rc6.tgz
4. Uncompress and extract the archive:
tar -xzf nedi-1.0-rc6.tgz
5. Move Nedi directory to /opt and fix permissions:
sudo mv nedi /opt/ sudo chgrp www-data /opt/nedi/html/log/ sudo chmod 775 /opt/nedi/html/log/
6. Create a link to the webserver root:
sudo ln -s /opt/nedi/html/ /var/www/
7. Create a link to the configuration file:
sudo ln -s /opt/nedi/nedi.conf /etc/nedi.conf
8. Create a MySQL database password:
sudo mysqladmin -u root password "YourPasswordGoesHere"
9. Initialize the Nedi database:
cd /opt/nedi/ ./nedi.pl -i
10. Answer these prompts:
- MySQL admin user: root
- MySQL admin pass: <enter the password you created in step #8>
11. Edit /opt/nedi/nedi.conf:
- List your SNMP read-only passwords (one per line)
- List your telnet usernames and passwords (one pair per line)
12. Optional - Edit /opt/nedi/seedlist and add your network devices:
List the IP addresses of your devices (one per line)
13. Restart the webserver (Apache2):
sudo /etc/init.d/apache2 restart
14. Run a discovery of your network and gather your device configurations
cd /opt/nedi/ ./nedi.pl -cob
15. Login to your Nedi website:
http://localhost/html/ User: admin Password: admin IMPORTANT - Change the admin password NOW!
16. Create a script to start/stop Nedi:
nano /opt/nedi/startnedi.sh
17. Paste this text into that file:
#!/bin/sh #start nedi from crontab. Creates logfiles opts="-cob" CMD="./nedi.pl $opts" LOGPATH="/var/log/nedi" LOGFILE="$LOGPATH/nedi.log" LASTRUN="$LOGPATH/lastrun.log" cd /opt/nedi now=`date +%Y%m%d:%H%M` echo "#$now start # $CMD" > $LASTRUN echo "#$now start" >> $LOGFILE $($CMD >> $LASTRUN) tail -8 $LASTRUN >> $LOGFILE now=`date +%Y%m%d:%H%M` echo "#$now stop" >> $LOGFILE echo "#$now stop" >> $LASTRUN'
Press “Control-O” and then “Enter” to save these changes.
18. Make “startnedi.sh” an executable file, and create a directory to hold Nedi log files:
chmod +x /opt/nedi/startnedi.sh sudo mkdir /var/log/nedi me=`whoami`;sudo chown $me:$me /var/log/nedi
19. Schedule Nedi to run periodically (every 4 hours) using cron:
crontab -e 15 0,4,8,12,16,20 * * * /opt/nedi/startnedi.sh # Discover and gather device configurations
Press “Control-O” and then “Enter” to save these changes.