个人工具
登录
查看“UbuntuHelp:NediHowTo”的源代码 - Ubuntu中文
UbuntuHelp
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“UbuntuHelp:NediHowTo”的源代码
来自Ubuntu中文
←
UbuntuHelp:NediHowTo
跳转至:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{From|https://help.ubuntu.com/community/NediHowTo}} {{Languages|UbuntuHelp:NediHowTo}} == 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: == <pre><nowiki> 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 </nowiki></pre> 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 [[UbuntuWiki:OpenSSL#head-ef90d99537150adb4809a3b7f0e554910ddf84cd|How|to setup SSL in Ubuntu]] == 3. Download Nedi: == <pre><nowiki> wget http://nedi.ch/lib/exe/fetch.php?id=files%3Adownload&cache=cache&media=files:nedi-1.0-rc6.tgz </nowiki></pre> == 4. Uncompress and extract the archive: == <pre><nowiki> tar -xzf nedi-1.0-rc6.tgz </nowiki></pre> == 5. Move Nedi directory to /opt and fix permissions: == <pre><nowiki> sudo mv nedi /opt/ sudo chgrp www-data /opt/nedi/html/log/ sudo chmod 775 /opt/nedi/html/log/ </nowiki></pre> == 6. Create a link to the webserver root: == <pre><nowiki> sudo ln -s /opt/nedi/html/ /var/www/ </nowiki></pre> == 7. Create a link to the configuration file: == <pre><nowiki> sudo ln -s /opt/nedi/nedi.conf /etc/nedi.conf </nowiki></pre> == 8. Create a MySQL database password: == <pre><nowiki> sudo mysqladmin -u root password "YourPasswordGoesHere" </nowiki></pre> == 9. Initialize the Nedi database: == <pre><nowiki> cd /opt/nedi/ ./nedi.pl -i </nowiki></pre> == 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): == <pre><nowiki> sudo /etc/init.d/apache2 restart </nowiki></pre> == 14. Run a discovery of your network and gather your device configurations == <pre><nowiki> cd /opt/nedi/ ./nedi.pl -cob </nowiki></pre> == 15. Login to your Nedi website: == <pre><nowiki> http://localhost/html/ User: admin Password: admin IMPORTANT - Change the admin password NOW! </nowiki></pre> == 16. Create a script to start/stop Nedi: == <pre><nowiki> nano /opt/nedi/startnedi.sh </nowiki></pre> == 17. Paste this text into that file: == <pre><nowiki> #!/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' </nowiki></pre> 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: == <pre><nowiki> chmod +x /opt/nedi/startnedi.sh sudo mkdir /var/log/nedi me=`whoami`;sudo chown $me:$me /var/log/nedi </nowiki></pre> == 19. Schedule Nedi to run periodically (every 4 hours) using cron: == <pre><nowiki> crontab -e 15 0,4,8,12,16,20 * * * /opt/nedi/startnedi.sh # Discover and gather device configurations </nowiki></pre> Press “Control-O” and then “Enter” to save these changes. ---- [[category:UbuntuHelp]]
该页面使用的模板:
模板:From
(
查看源代码
)
模板:Languages
(
查看源代码
)(受保护)
模板:Languages/Lang
(
查看源代码
)(受保护)
返回至
UbuntuHelp:NediHowTo
。