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: , ,

Check it out, very interesting. http://www.redhatmagazine.com/2007/12/04/hacking-rpms-with-rpmrebuild/. The point is, you could customize the content file inside an rpm on the fly, or you may also rebuild a package from the existing files on your system (and adding your customized settings files, for example).

Tags: , ,

An introduction to PHP

August 7th, 2008 by admin

PHP stands for Hypertext Preprocessor”, it is a server-side, HTML embedded scripting language used to create dynamic Web pages.

Most of it’s syntax is borrowed from C, Java and Perl with some unique features thrown in. What is the goal of this programing language? The answer is to allow Web developers to write dynamically generated pages quick.

How to write php ? Millons of softwares are available to help you write PHP. You may use Dreamweaver, notepad, notepad++ and netbeans php early access.

Tags: ,

What programming category you used? A survey shows that object oriented programming language is still more preferable than procedural or functional language.

Here’s the table that shows programming language category ratings.



Category Ratings July 2008 Delta July 2007
Object-Oriented Languages 56.6% +3.9%
Procedural Languages 41.1% -2.3%
Functional Languages 1.7% -0.3%
Logical Languages 0.7% -1.2%

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: , , , ,

    The location was defined in /etc/fonts/fonts.conf file (an plain text file). So open it first by using gedit by executing gedit /etc/fonts/fonts.conf. The locations is /usr/share/fonts and /usr/local/share/fonts and /home/username/.fonts (a dot previous a folder’s name means that is a hidden folder).

    If you use WIndows Explorer Nautilus, you could click Places > Home Folder > View > Show Hidden Files to shows the hidden folders and files on your Hard disk.

    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: , , ,