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

Another PHP tutorials

August 8th, 2008 by admin

To escape php from html, a PHP code block starts with “<?php” and ends with “?>”. A PHP code block can be placed anywhere in the HTML document. You may also use <? ?> but it’s not available on every servers.

To separate instructions, each instruction must end with a semicolon. The PHP closing tag also implies the end of the instruction.

This is an example on how to write PHP between html tags:

<html>

<head>

<title>PHP is fun</title>

</head>

<body>

<?php echo “This text is generated using PHP”; ?>

</body>

</html>

Tags: ,

It’s an amazing link, check it out. A complete guide on how to internet privately although you are firewalled.

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

Although it’s based on Onenote 2003, it still can be implemented on Onenote 2007. check http://safari.oreilly.com/0735621098?tocview=true

It’s very easy, you can do it by entering text below, between <head> and </head> tags.

<meta name=’Content-Type’ Content=’text/html; charset:UTF-8? />

Content type is very important for SEO (search engine optimizations).

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