How to configure SNMP versions 2 and 3?

How to configure SNMP versions 2 and 3?