Difference between revisions of "NeDI: Instalasi di Ubuntu"

From OnnoWiki
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
1. Install dependencies:
+
==Install dependency==
  
 
  sudo apt-get install apache2 libapache2-mod-php5 mysql-server libnet-snmp-perl php5-mysql \
 
  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 librrds-perl
 
  libnet-telnet-cisco-perl php5-snmp php5-gd libalgorithm-diff-perl rrdtool librrds-perl
  
Note: The command listed above needs to be on one line
 
  
2. Setup SSL on the Apache2 webserver:
+
==Setup SSL di 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
+
PENTING _ Sebaiknya anda menggunakan SSL karena NeDi membawa banyak informasi tentang jaringan anda.
  
3. Download Nedi:
+
 
 +
==Download NeDi==
  
 
  wget http://www.nedi.ch/pub/nedi-1.0.8.tgz
 
  wget http://www.nedi.ch/pub/nedi-1.0.8.tgz
  
4. Uncompress and extract the archive:
+
==Uncompress dan extract==
  
 
  tar -xzf nedi-1.0-rc6.tgz
 
  tar -xzf nedi-1.0-rc6.tgz
  
5. Move Nedi directory to /opt and fix permissions:
+
==Move Nedi ke directory /opt dan perbaiki permissions==
  
 
  sudo mv nedi /opt/
 
  sudo mv nedi /opt/
Line 24: Line 24:
 
  sudo chmod 775 /opt/nedi/html/log/
 
  sudo chmod 775 /opt/nedi/html/log/
  
6. Create a link to the webserver root:
+
==Buat link ke webserver root==
  
 
  sudo ln -s /opt/nedi/html/ /var/www/
 
  sudo ln -s /opt/nedi/html/ /var/www/
  
7. Create a link to the configuration file:
+
==Buat link ke file konfigurasi==
  
 
  sudo ln -s /opt/nedi/nedi.conf /etc/nedi.conf
 
  sudo ln -s /opt/nedi/nedi.conf /etc/nedi.conf
  
8. Create a MySQL database password:
+
==Buat MySQL database password==
  
 
  sudo mysqladmin -u root -p password "YourPasswordGoesHere"
 
  sudo mysqladmin -u root -p password "YourPasswordGoesHere"
  
9. Initialize the Nedi database:
+
==Inisialisasi database NeDi==
  
 
  cd /opt/nedi/
 
  cd /opt/nedi/
 
  ./nedi.pl -i
 
  ./nedi.pl -i
  
10. Answer these prompts:
+
==Jawab prompts berikut==
  
    MySQL admin user: root
+
MySQL admin user: root
 +
MySQL admin pass: <masukan password di step #8>
  
    MySQL admin pass: <enter the password you created in step #8>
+
==Edit /opt/nedi/nedi.conf==
  
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)
  
    List your SNMP read-only passwords (one per line)
+
==Optional - Edit /opt/nedi/seedlist dan tambahkan network device anda==
    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)
 
  List the IP addresses of your devices (one per line)
  
13. Restart the webserver (Apache2):
+
==Restart webserver (Apache2)==
  
 
  sudo /etc/init.d/apache2 restart
 
  sudo /etc/init.d/apache2 restart
  
14. Run a discovery of your network and gather your device configurations
+
==Run discovery dari network anda dan kumpulkan konfigurasi device==
  
 
  cd /opt/nedi/
 
  cd /opt/nedi/
 
  ./nedi.pl -pob
 
  ./nedi.pl -pob
  
15. Login to your Nedi website:
+
==Login ke NeDi website==
  
 
  http://localhost/html/
 
  http://localhost/html/
 
  User: admin
 
  User: admin
 
  Password: admin
 
  Password: admin
  IMPORTANT - Change the admin password NOW!
+
  PENTING - ubah admin password SEKARANG JUGA!
  
16. Create a script to start/stop Nedi:
+
==Buat script untuk start/stop Nedi:
  
 
  nano /opt/nedi/startnedi.sh
 
  nano /opt/nedi/startnedi.sh
  
17. Paste this text into that file:
+
Masukan
  
 
  #start nedi from crontab. Creates logfiles
 
  #start nedi from crontab. Creates logfiles
Line 94: Line 93:
 
  echo "#$now stop" >> $LASTRUN'
 
  echo "#$now stop" >> $LASTRUN'
  
Press “Control-O” and then “Enter” to save these changes.
+
Tekan “Control-O” dan “Enter” simpan perubahan
  
18. Make “startnedi.sh” an executable file, and create a directory to hold Nedi log files:
+
==Buat “startnedi.sh” dan directory Nedi log==
  
 
  chmod +x /opt/nedi/startnedi.sh
 
  chmod +x /opt/nedi/startnedi.sh
Line 102: Line 101:
 
  me=`whoami`;sudo chown $me:$me /var/log/nedi
 
  me=`whoami`;sudo chown $me:$me /var/log/nedi
  
19. Schedule Nedi to run periodically (every 4 hours) using cron:
+
==Jadwalkan Nedi untuk jalan secara periodik (setiap 4 jam) menggunakan cron:==
  
 
  crontab -e
 
  crontab -e
 
  15 */4 * * * /opt/nedi/startnedi.sh  # Discover and gather device configurations
 
  15 */4 * * * /opt/nedi/startnedi.sh  # Discover and gather device configurations
  
Press “Control-O” and then “Enter” to save these changes.
+
Tekan “Control-O” dan “Enter” untuk menyimpan.
  
-or-
+
-atau-
  
Create a file in /etc/cron.d/ containing this information:
+
Buat sebuah file di /etc/cron.d/ berisi informasi berikut:
  
 
  15 */4 * * *    root  /opt/nedi/startnedi.sh  # Discover and gather device configurations
 
  15 */4 * * *    root  /opt/nedi/startnedi.sh  # Discover and gather device configurations
  
Both of these methods will cause the script to run every 4 hours at :15 past the hour beginning with 4:00am.  
+
Kedua cara ini akan menyebabkan script di jalankan setiap 4 hour pada menit ke :15 mulai jam 4:00 pagi.
 
 
 
 
 
 
  
 
==Referensi==
 
==Referensi==

Latest revision as of 07:03, 27 July 2015

Install dependency

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 librrds-perl


Setup SSL di Apache2 webserver

PENTING _ Sebaiknya anda menggunakan SSL karena NeDi membawa banyak informasi tentang jaringan anda.


Download NeDi

wget http://www.nedi.ch/pub/nedi-1.0.8.tgz

Uncompress dan extract

tar -xzf nedi-1.0-rc6.tgz

Move Nedi ke directory /opt dan perbaiki permissions

sudo mv nedi /opt/
sudo chown -R www-data:www-data /opt/nedi
sudo chmod 775 /opt/nedi/html/log/

Buat link ke webserver root

sudo ln -s /opt/nedi/html/ /var/www/

Buat link ke file konfigurasi

sudo ln -s /opt/nedi/nedi.conf /etc/nedi.conf

Buat MySQL database password

sudo mysqladmin -u root -p password "YourPasswordGoesHere"

Inisialisasi database NeDi

cd /opt/nedi/
./nedi.pl -i

Jawab prompts berikut

MySQL admin user: root
MySQL admin pass: <masukan password di step #8> 

Edit /opt/nedi/nedi.conf

List your SNMP read-only passwords (one per line)
List your telnet usernames and passwords (one pair per line) 

Optional - Edit /opt/nedi/seedlist dan tambahkan network device anda

List the IP addresses of your devices (one per line)

Restart webserver (Apache2)

sudo /etc/init.d/apache2 restart

Run discovery dari network anda dan kumpulkan konfigurasi device

cd /opt/nedi/
./nedi.pl -pob

Login ke NeDi website

http://localhost/html/
User: admin
Password: admin
PENTING - ubah admin password SEKARANG JUGA!

==Buat script untuk start/stop Nedi:

nano /opt/nedi/startnedi.sh

Masukan

#start nedi from crontab. Creates logfiles
opts="-pob"
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'

Tekan “Control-O” dan “Enter” simpan perubahan

Buat “startnedi.sh” dan directory Nedi log

chmod +x /opt/nedi/startnedi.sh
sudo mkdir /var/log/nedi
me=`whoami`;sudo chown $me:$me /var/log/nedi

Jadwalkan Nedi untuk jalan secara periodik (setiap 4 jam) menggunakan cron:

crontab -e
15 */4 * * * /opt/nedi/startnedi.sh  # Discover and gather device configurations

Tekan “Control-O” dan “Enter” untuk menyimpan.

-atau-

Buat sebuah file di /etc/cron.d/ berisi informasi berikut:

15 */4 * * *    root   /opt/nedi/startnedi.sh  # Discover and gather device configurations

Kedua cara ini akan menyebabkan script di jalankan setiap 4 hour pada menit ke :15 mulai jam 4:00 pagi.

Referensi