Skip to content

Instantly share code, notes, and snippets.

@donnitriosa
Last active March 4, 2021 02:06
Show Gist options
  • Save donnitriosa/ac4ae98960c6c244c0f4964015141d1b to your computer and use it in GitHub Desktop.
Save donnitriosa/ac4ae98960c6c244c0f4964015141d1b to your computer and use it in GitHub Desktop.
step by step to install an configure snmp

Install & setup SNMP di ubuntu

  1. Install

    sudo apt-get update
    sudo apt-get install -y snmpd
    
  2. Cek Status

    sudo systemctl status snmpd
    
  3. Setup snmp

  • copy configurasi default menjadi backup

     sudo cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.backup
    
  • siapkan username, password dan encription

  • edit file /etc/snmp/snmpd.conf menggunakan vi atau nano

     sudo vi /etc/snmp/snmpd.conf
    
  • tambahkan di file /etc/snmp/snmpd.conf

      createUser <username> MD5 <passwort> DES <encription>
      rouser <user> priv
    

    setelah ditambahkan bagian snmpv3 menjadi:

       ##############################################################
      
      # SNMPv3 AUTHENTICATION
      # Note that these particular settings don't actually belong here.
      # They should be copied to the file /var/lib/snmp/snmpd.conf
      # and the passwords changed, before being uncommented in that file *only*.
      # Then restart the agent
      
      # createUser authOnlyUser MD5 "remember to change this password"
      # createUser authPrivUser SHA "remember to change this one too" DES
      # createUser internalUser MD5 "this is only ever used internally, but still change the password"
      
      createUser <username> MD5 <passwort> DES <encription>
      rouser <user> priv
      
      # If you also change the usernames (which might be sensible),
      # then remember to update the other occurances in this example config file to match.
         ##############################################################
    
  1. restart service snmpd

    systemctl restart snmpd
    systemctl status snmpd
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment