How to instasll SNMP

August 14th, 2008 by admin

First, download the file from http://ftp.yz.yamagata-u.ac.jp/pub/network/net-snmp/

Now, tar the file, using this command (this example use ver 5.1, but you may use it for other version).

#tar -zxvf net-snmp-5.1.4.tar.gz

#cd net-snmp-5.1.4

# ./configure –prefix=/usr/local/snmp

#make

#make install

# ee /usr/local/snmp/share/snmp/snmpd.conf

*******the content************

com2sec public HOSTNAME public

group public v1 public

group public v2c public

group public usm public

view all included .1

access public “” any noauth exact all none none

**** Change the HOSTNAME (or IP ADDRESS)***

After snmpd.conf created, now actiavate snmp using commands below:

# /usr/local/snmp/sbin/snmpd -c /usr/local/snmp/share/snmp/snmpd.conf

checking whether snmp daemon runs flawlessly?

# /usr/local/snmp/bin/snmpwalk -v 1 -c public HOSTNAME system

change the HOSTNAME with a hostname or IP Address you entered on “snmpd.conf”, if it works, you’ll get a message like this.

———

…….

SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.8072.3.2.255

SNMPv2-MIB::sysUpTime.0 = Timeticks: (7256) 0:01:12.56

SNMPv2-MIB::sysContact.0 = STRING: root@

SNMPv2-MIB::sysName.0 = STRING: host.hostname.org

SNMPv2-MIB::sysLocation.0 = STRING: Unknown

SNMPv2-MIB::sysORLastChange.0 = Timeticks: (0) 0:00:00.00

SNMPv2-MIB::sysORID.1 = OID: SNMPv2-MIB::snmpMIB

SNMPv2-MIB::sysORID.2 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup

SNMPv2-MIB::sysORID.3 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance

SNMPv2-MIB::sysORID.4 = OID: SNMP-MPD-MIB::snmpMPDCompliance

SNMPv2-MIB::sysORID.5 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance

SNMPv2-MIB::sysORDescr.1 = STRING: The MIB module for SNMPv2 entities

SNMPv2-MIB::sysORDescr.2 = STRING: View-based Access Control Model for SNMP.

SNMPv2-MIB::sysORDescr.3 = STRING: The SNMP Management Architecture MIB.

SNMPv2-MIB::sysORDescr.4 = STRING: The MIB for Message Processing and Dispatching.

SNMPv2-MIB::sysORDescr.5 = STRING: The management information definitions for the SNMP User-based Security Model.

SNMPv2-MIB::sysORUpTime.1 = Timeticks: (0) 0:00:00.00

SNMPv2-MIB::sysORUpTime.2 = Timeticks: (0) 0:00:00.00

SNMPv2-MIB::sysORUpTime.3 = Timeticks: (0) 0:00:00.00

SNMPv2-MIB::sysORUpTime.4 = Timeticks: (0) 0:00:00.00

SNMPv2-MIB::sysORUpTime.5 = Timeticks: (0) 0:00:00.00

Next, you can set the snmpd to dun from startup automatically by executing:

# echo “usr/local/snmp/sbin/snmpd -c /usr/local/snmp/share/snmp/snmpd.conf” >> /etc/rc.local

Tags: ,

Easy, you just have to install wine first:

$ sudo apt-get install wine

Then execute wine statement followed by the executable (.exe) file name you want to launch.

For example:

$wine photoshop.exe

Tags: , ,

For some people, ubuntu system sounds is not good, you could stop it by first executing:

$ sudo vi /etc/modprobe.d/blacklist

Now, add these lines:

#irritating speaker’s sounds
blacklist pcspkr

You may reboot, or you may also executing $ sudo rmmod pcspkr to implement your change without reboot.

Tags: , , ,

Useful SFTP Commands

August 3rd, 2008 by admin

SFTP is a method to let you transfer files between linux computers easily using SSH protocol. Here’s some important sftp commands that you could use:

cd path Changes remote directory to path.

lcd path Changes local directory to path.

chgrp grp path Changes group of file path to grp. grp must be a numeric GID.

chmod mode path Changes permisssion of file path to mode.

chown own path Changes owner of file path to own. own must be a numeric UID.

exit Quits sftp

get remote-path [local-path] Retrieves the remote-path and stores in on the local machine. If the local-path name is not specified, it is given the same name that it has on the remote machine.

help Displays help text.

lmkdir path Creates local directory specified by path.

ln oldpath newpath Creates a symbolic link from oldpath to newpath.

lpwd Prints local working directory.

ls [path] Displays remote directory listing of either path or current directory (if path is not specified).

mkdir path Creates remote directory in location specified by path.

put local-path [remote-path] Uploads local-path and stores it on the remote machine. If the remote-path name is not specified, it is given the same name as it has on the local machine.

pwd Displays remote working directory.

quit Quits sftp

rename oldpath newpath Renames remote file from oldpath to newpath.

rmdir path Removes remote directory specified by path.

rm path Deletes remote file specified by path.

symlink oldpath newpath Create a symbolic link from oldpath to newpath.

While the syntax for scp is:

scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1 […] [[user@]host2:]file2

Tags: ,

????Ÿ?Ÿ?h-client.

  • To test, whether your computer already can be ssh-ed, execute # ssh localhost user@192.168.0.10
    Connecting to 192.168.0.107…
    vhazrati@192.168.0.10
    password: <enter the password>
    sftp>
  • To get the files, you could execute sftp> get file_name /home/user/documents
  • Tags: , , ,

    In ubuntu, sometimes touchpad is irritating, especially when you are typing and sudddenly touchpad screws everything you typed. You can disable tuchpad in Ubuntu by clicking System > Preferences > Mouse, click on Touchpad tab. Then Remove the check on Ennable mouse clicks with touchpad.

    This will make touchpad click won’t be considered as an input in Linux.

    Tags: , , , ,

    There are many tutorials on this subject, but you can use the CLI (command line interface) that is easier and simpler. For Java 5, you jsut have to execute:

    sudo apt-get install sun-java5-jdk

    And for java6, you can execute

    sudo apt-get install sun-java6-jdk

    Simple isn’t it. You can also Update the JDK (java development kit) by executing.

    sudo update-alternatives –config java

    I did finding those command beneficial when i was installing OpenBravo. An open source Point of Sales software that is cross platform build with Java.

    Tags: , , ,

    As you know, open suse 11 is already released. Now i would like to try to install java on OpenSuse. Here’s the steps:

    1. Download Java, you can find it from here.
    2. Open command line interface on your linux (eg: konsole, xterm etc) and change yourself as root.
    3. Copy the jdk you have downloaded to /opt directory # cp jdk-version-linux-i586.bin /opt
    4. Chmod the file so you could execute it.# chmod +x /opt/jdk-version-linux-i586.bin
    5. Execute the installer. ./opt/jdk-version-linux-i586.bin

    If you found mistakes on your installation, probably you should remove the as-is /usr/bin/java by executing # rm /usr/bin/java. After that force the path by executing # ln -s /opt/jdk1.6.0_05/bin/java /usr/bin/java.

    TAgs: , , ,

    sometimes, you, undeliberately, removing an icon on your start bar on your Linux desktop, eg: wifi icon or another icon. Here’s a techniques to recover it:

    1. Right click on your startbar/startbar.
    2. Click add to panel > notification area > Add
    3. Log out or by clicking ctrl+alt+backspace
    4. After login, you could see the added icon will emerge.

    Tags: ,

    I have written a tutorial on how to create an ISO using visual software before, And i have just browse online knowing that there is a tool on Linux that let you copy DVD or CD as an ISO image so that you could copy CD or DVD movie by only utilizing command line on Linux. Yes, it’s using cat statement.

    Just execute:

    cat /dev/dvdrw > ~/iso_files.iso

    After you execute command above, linux will copy the cd as ISO files. You have to note that the /dev/dvdrw path might be different on your computer, for example it may be /dev/cdrom.

    After you have created a perfect iSO, then you could utilize any iso burning softwares to burn the iso….

    Tags: ,