Showing posts with label leopard. Show all posts
Showing posts with label leopard. Show all posts

Tuesday, April 12, 2016

Mutt Integration With Abook in Mac OS X

This post assume that you already have Mutt running on your Mac OS X.

I choose Abook to manage my address book because it's very simple and suitable for my need.

If you don't have Abook yet, you can install it. I'm using MacPorts, so just execute this command:
$ sudo port install abook

And then, add these lines to your .muttrc config file:
set query_command = "abook --mutt-query '%s'"macro generic,index,pager \ca "<shell-escape>abook<return>" "launch abook"macro index,pager A "<pipe-message>abook --add-email<return>" "add the sender address to abook" 
A little explanation for above script:
1. set query_command (pressing ctrl-t) on Mutt - Compose view, will execute abook to look for match address based on the few letter(s) you already type in.
2. pressing ctrl-a on Mutt, will execute abook to input manually
3. pressing shift-a (or A capital) on Mutt - Index view, will add the sender from any highlight email

Just save your .muttrc and reload the config on Mutt, and you're good to go :)

*full reference see here

Thursday, October 13, 2011

BingMaps go forth and back to Google Maps

If you haven't know yet, there's an update for Google Maps on your webOS smartphone (Pre, Pixi, Veer), not to another version, but to BingMaps, which is the Maps apps pre-installed in TouchPad.

Like the HP Palm Blog says, you just open App Catalog and download Maps apps from there in order to update your Google Maps.

I did that myself, and not too long after that I decided to get my old Google Maps back. So I open up webOS doctor file and look for Maps application. With the help from #webos-internals on freenode, I found it under /usr/palm/applications in com.palm.app.maps folder. So I re-package it using IPK Packager from Jason Robbitaile.

After deleting Maps apps, I installing this file using webOS Quick Install (wOSQI), again from Jason, and I've got my Google Maps back :)

Friday, July 8, 2011

How to Make MacPorts vim default in Mac OS X Terminal

If you, like I did, ever wanted to use vim with more option, e.g. support for python, or ruby.. then you have to re-compile vim in order to use it in your Mac OS X. You can compile from source, or using Macports like me. You can also view several daily used command for macports in my blogpost here.

First, you can check what version of vim you have by typing "vim" in your Terminal apps. Then, using macports, you just execute this command:
$ sudo port -v install vim +python
After finished, you can find that newest version of vim (compare to built-in version of vim), is located in: /opt/local/share/vim/ directory

Or you can find it using find command:
$ sudo find / -name "vim"
After that, you need to put the path into $PATH, because if you're not doing that, Terminal apps in Mac OS X will execute the default built-in vim. Also, you need to put it in the beginning of your path:
PATH=/opt/local/share:/opt/local/bin:/opt/local/sbin:$PATH
That's it. Close your Terminal window/ tab, and start a new one. Type "vim" on your shell, and you'll see that you already have the new version of vim. Enjoy! :)

Show hidden files in Mac OS X Finder

While accessing my #webOS device, there comes a time when I need to show hidden files. But you can't find anywhere in the menu, just like you did with Folder Properties in Windows operating system. All you have to do is simple, using Terminal apps. Here's what you have to do:

1. Open Terminal apps
2. Type this command:
$ defaults write com.apple.finder AppleShowAllFiles TRUE
$ killall Finder
And suddenly you'll find changes in your Finder. If you ever want to get the already-revealed hidden files to default, just type the same command as above and change TRUE to FALSE:
$ defaults write com.apple.finder AppleShowAllFiles FALSE
$ killall Finder


Tuesday, June 21, 2011

Using tcpdump in Mac OS X

This is just notes taken for personal use on which options used in tcpdump command:
# sudo tcpdump -i en0 -vvv -K -n -s 0 -w ~/Desktop/DumpFile.dmp

or without -K option:
# sudo tcpdump -i en0 -vvv -n -s 0 -w ~/Desktop/DumpFile.dmp
If you want to stop it from capturing, just press control-c. And to view the file:
# sudo tcpdump -s 0 -n -e -x -vvv -r ~/Desktop/DumpFile.dmp

Here's options explanation using in command above:
-i     interface
-vvv     even more verbose output
-K     don't attempt to verify TCP, UDP and IP checksums
-n     don't convert addressed to names
-s     snaplen settings. setting snaplen to 0 means use the required length to catch whole packets
-w     write the raw packets to file rather than parsing and printing them out
-x     when parsing and printing, in addition to printing header of each packet, print the data of each packet (minus its link level header) in hex
-r     read packets from file

Tuesday, June 14, 2011

Running Winbox in Snow Leopard

My everyday work are sometime using winbox to configure and manage routerboard device which running MikroTik OS, while using MacBook Pro, I need to prepare the environment since winbox are meant to be run on Windows environment. I can use either Darwine or wine package from macports, and I chose to use macports, since I'm more used to CLI environment.

All you need to do is:
1. choose the package according to Mac OS X version, download and install from here
2. for snow leopard (64-bit), you should install wine-devel instead of wine package, and add +universal
#  sudo port -v install wine-devel +universal

3. then you should be able to run winbox.exe from terminal
# /opt/local/bin/wine winbox.exe

4. you can also download this package, put it in your Applications and just double-click to run it

For complete references on other Mac OS X version, see here

Wednesday, June 8, 2011

Hardcoded .srt Subtitle Into A Video Files in Mac OS X

The situation is like this, I have a bunch of download movie (in .avi format) and .srt (subtitles) files along with all of those movie files. Since I don't have much time to watch the movies in my Mac/ PC or player, I want to keep it in my Palm Pre, so I can play it any moment I have some times (while waiting, perhaps). But since video player in Palm Pre doesn't support displaying .srt file while playing the video files, I have to convert it and hardcoded the .srt file so it could "attach" to the converted video files (.mp4 or .m4v, the same format that can be played in iPhone's or Palm Pre's video player).

Here's what you need:
1. Perian (go here to download and install if you haven't already installed it)
2. Quick Time (already installed in any Mac OS X)
3. .avi and .srt files (of course! :D )

And here's what you've got to do:
1. Install Perian
2. Go to System Preferences, open up the Perian and make sure you check "Load External Subtitles" on Subtitle Options section
3. Launch Quick Time and open up .avi file
4. If it plays well and your subtitle can show up then Perian works well
5. File - Save as.. and you can choose the directory where to save the file and file format



6. I choose iPhone format, so it saved as .m4v file
7. Done :)

Friday, May 27, 2011

Accesing #webOS Device via WiFi using SFTP Client

I'm using this because I'm tired of connecting USB cable everytime I want to copy files between my Palm Pre and my MacBookPro. Actually there's only 5 simple steps to follow:

  1. Install Preware
  2. Use Preware to install SFTP and terminal application
  3. Use terminal application to generate keys for OpenSSH
  4. Transfer SSH keys to desktop via USB
  5. Configure SFTP client (I'm using Cyberduck on Mac OS X) on desktop and connect
1. Install Preware
You can see here for complete reference

2. Using Preware to install SFTP and Terminal application
Still, you can refer to previous link for usage guide. FYI, I'm using SDL Terminal, other options is Terminal and Terminus

3. Use terminal application to generate keys for openSSH
I just did these steps:
# cd /
# /opt/bin/ssh-keygen (press Enter key once to accept default filename, then Enter key twice for blank password)
# mv /home/root/.ssh/id_rsa.pub /home/root/.ssh/authorized_keys

Or you can read from wiki here

4. Transfer SSH keys to desktop via USB
First, run this command:
# mv /home/root/.ssh/id_rsa /media/internal/

Then connect your Pre to your desktop station via USB cable, and put it in Drive mode. Copy and save id_rsa file you've just copied to any safe place in your desktop station

5. Configure SFTP client on desktop and connect
First,you need to know your IP address on your Pre. Open Wifi and tap on current Wifi connection (SSID) to view the IP address.
Then, open your SFTP client. Since I'm using Cyberduck, for now I'm just explaining about how to use it on Cyberduck only. But, actually the steps are very similar on any SFTP client. 
1. Click on Open Connection
2. Choose SFTP (SSH File Transfer Protocol).
3. Fill in username: root
4. Leave the password blank
5. More options -> check "Use Public Key Autentication"
6. Click Connect

Just wait and see :D

Sunday, May 22, 2011

Installing JRE1.5 on Snow Leopard

This JRE workaround was I did to make SPSS 17 runs well on Snow Leopard, in order to make things clearer, I divide those 2 things and put each of them on separate blog post. So let's get started! :)


Just follow this simple steps, and in the end you'll get JRE1.5 installed. Please keep in mind that this steps will not remove JRE1.6, but add the option to choose with JRE you'd like to use. First you can go to Finder -> Utilities -> Java Preferences, and check to make sure you only have Java SE 6 there (32-bit and 64-bit version). If you already have J2SE 5.0 (32-bit and 64-bit), just move 32-bit version to top of the list and you're done. No need to follow these steps below :D


1. Check your current version of JRE installed:
# java -version
2. change directory to home directory
# cd ~/
3. retrieve JRE version for Leopard (OS X 10.5.x)
# curl -o java.1.5.0-leopard.tar.gz http://www.cs.washington.edu/homes/isdal/snow_leopard_workaround/java.1.5.0-leopard.tar.gz
4. extract the file you just downloaded

# tar -xvzf java.1.5.0-leopard.tar.gz
5. remove existing 1.5 version file on Snow Leopard

# sudo rm /System/Library/Frameworks/JavaVM.framework/Versions/1.5
6. remove existing 1.5.0 version file on Snow Leopard

# sudo rm /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0
7. move current extracted JRE1.5 for Leopard to existing System directory

# sudo mv 1.5.0 /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0-leopard
8. make link from currently moved folder to previously removed file

# sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0-leopard /System/Library/Frameworks/JavaVM.framework/Versions/1.5
9. same usage as no. 8
# sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0-leopard /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0
And after you done with all 9 steps above, just go to Finder -> Utilities -> Java Preferences.



There you'll see additional J2SE 5.0 (32-bit and 64-bit), move J2SE 5.0 32-bit version to top of the list, close the preferences, then go back to Terminal apps to execute this command:
# java -version
Notice the differences? You'll now get the "java version 1.5.0_19" (in my MacBook Pro). And you're done :)

Friday, May 20, 2011

Jailbreaking FU iOS Device

I put the title, so I am aware that what I'm about to write here works on almost any iOS device (which I already tried the same way for iPhone 3G/s and 1st generation of iPad). After reading on several blogs, and tried it on my iOS device myself, I choose the method using redsn0w. All you need to do first is make sure that newest update iOS version already been able to jailbreak, and all requirement files are downloaded and ready to use.

Actually you only need 2 files, redsn0w (mac and/or windows) and .ipsw files according to which version of iOS device you want to jailbreak. After you get those two files, execute redsn0w, choose the .ipsw files, check only at "Install Cydia", then just follow onscreen instruction at redsn0w window. That's it! :) And after rebooted, you'll find Cydia icon in your launcher.

Here are some of the snapshot I took, when jailbreak iPhone 3G:




Sunday, September 19, 2010

Nokia 6300 iSync with Mac OS X

I still keep my old Nokia 6300 for backup purpose and periodically sync to my MacBook Pro to keep the calendar and contact updated. Luckily Mac OS X provide iSync, but I have to install additional plugin to make it recognize my Nokia 6300. All you have to do is get the plugin from here, and just installed it. Or you could download this package, and extract it to /Library/PhonePlugins folder (you must create manually if PhonePlugins folder haven't exist already)

After that, you can launch iSync apps, Add Device, and just follow the instructions. Don't forget to backup your data before syncing the device.

Credit goes to ZealousPost.com

Monday, August 9, 2010

Using Mutt for Gmail on Mac OS X

First, you have to install Macports, then install mutt with all these compile options:
# sudo port -v install mutt-devel +ssl +smtp +date_conditional +deepif +gdbm +gpgme +headercache +idn +sidebar +trash +sasl
Then, on your .muttrc file, add these config:








--- begin of configuration ---

#account settings
set from="YOUR_GMAIL_ADDRESS"
set realname = "REAL_NAME"
set imap_user = "YOUR_GMAIL_ADDRESS"
set imap_pass = "PASSWORD"
set smtp_url = "smtp://GMAIL_USERNAME@smtp.gmail.com:587"
set smtp_pass = "GMAIL_PASSWORD"
 
set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"
set postponed = "+[Gmail]/Drafts"
set trash = "imaps://imap.gmail.com/[Gmail]/Trash"
set record = "+[Gmail]/Sent Mail"
set header_cache =~/.mutt/cache/headers
set message_cachedir =~/.mutt/cache/bodies
set certificate_file =~/.mutt/certificates
 
set move = no  #Stop asking to "move read messages to mbox"!
set imap_keepalive = 900
 
# Header related stuff
ignore "Authentication-Results:"
ignore "DomainKey-Signature:"
ignore "DKIM-Signature:"
hdr_order Date From To Cc
 
ignore *
unignore from: date subject to cc
unignore x-mailing-list: posted-to:
unignore x-mailer:
 
# Sorting, Markers etc.
set markers=no # don't put '+' at the beginning of wrapped lines
set pager_index_lines= 10 # how large is the index window?
set sort = 'threads'
set sort_aux = 'last-date-received'
 
# Set which Editor to use for composing Emails.
set editor= '/usr/bin/emacs'
 
# set up the sidebar
set sidebar_width=24
set sidebar_visible=yes
set sidebar_delim='|'
set sidebar_sort=no
 
# which mailboxes to list in the sidebar,
# you can add your Labels in Gmail to the Sidebar.
mailboxes =All\ Mail =INBOX =Drafts =Sent\ Mail  =Trash
 
# color of folders with new mail
color sidebar_new yellow default
 
#Sidebar Navigation
bind index \CP sidebar-prev
bind index \CN sidebar-next
bind index \CO sidebar-open
bind pager \CP sidebar-prev
bind pager \CN sidebar-next
bind pager \CO sidebar-open
 
# b toggles sidebar visibility
macro index b 'toggle sidebar_visible'
macro pager b 'toggle sidebar_visible'
 
# Remap bounce-message function to "B"
bind index B bounce-message
 
#make mutt colorful!
color attachment brightmagenta default
color error      brightred    default
color hdrdefault red          default
color indicator  brightyellow red
color markers    brightcyan   default
color message    brightcyan   default
color normal     default      default
color quoted     brightblue   default
color search     default      green
color signature  red          default
color status     yellow       blue
color tilde      magenta      default
color tree       magenta      default
--- end of configuration ---











On these line, you can customize it to use other file editor such as vi or vim. Since I'm not familiar with emacs, I'm using vi :)

# Set which Editor to use for composing Emails.
set editor= '/usr/bin/emacs'




And in these line, you can add/ remove any IMAP folders you already set on Gmail, prefix it with '=' :







# which mailboxes to list in the sidebar,
# you can add your Labels in Gmail to the Sidebar.
mailboxes =All\ Mail =INBOX =Drafts =Sent\ Mail  =Trash













You will be prompted to accept 2 certificates when first firing up mutt, just accept it. Here's a screenshoot of my mutt interface:




Sunday, August 8, 2010

Several MacPorts Commands

Here is several MacPorts commands that I often used, with little description on every command. I always use -v option (as in verbose), to look at the detail downloading and compiling process.


1. sudo port -v selfupdate
- removing and downloading new file repository list, often updated

2. sudo port -v upgrade outdated
- upgrade outdate port, according to newest file repository list

3. sudo port -v uninstall inactive
- even after update, macports still kept the outdated version, you can execute this command to automatically vanish outdated version immediately

3. sudo port -v search [port]
- used for looking certain port

4. sudo port -v install [port]
- install certain port

5. sudo port -v uninstall [port]
- uninstall certain port

6. sudo port -v clean --all [port]
- clean up all port build and dependencies

7. sudo port -v activate [port@version]
- activate certain port version

8. sudo port -v installed
- shows up all port installed

Monday, August 2, 2010

Test AUTH SMTP Connection

Lengkapnya bisa diliat di link ini: http://qmail.jms1.net/test-auth.shtml. Saya coba summaries cara mudahnya sbb:

1. Create dulu base64 encode dari email address dan password kita:

$ perl -MMIME::Base64 -e 'print encode_base64("\000[mailbox]\@[domain]\000[password]")'

contoh:
$ perl -MMIME::Base64 -e 'print encode_base64("\000kostka\@cbn.net.id\000passkostka")'
AGtvc3RrYUBjYm4ubmkAGNibm00MWxndTM=


2. menggunakan telnet-ssl

$ telnet-ssl -z ssl smtps.cbn.net.id 465
Trying 210.210.145.21...
Connected to smtps.cbn.net.id.
Escape character is '^]'.
220 mx-corp3b.int.cbn.net.id ESMTP
ehlo cbn.net.id
250-mx-corp3b.int.cbn.net.id Hello cheyenne.cbn.net.id [202.158.50.81]
250-SIZE 10485760
250-PIPELINING
250-AUTH PLAIN LOGIN
250 HELP
auth plain AGtvc3RrYUBjYm4ubmkAGNibm00MWxndTM=
235 Authentication succeeded
mail from: kostka@cbn.net.id
250 OK
rcpt to: tslan@cbn.net.id
250 Accepted
data
354 Enter message, ending with "." on a line by itself
test ke-2 :)
.
250 OK id=1Obqkv-0004Qq-Nf


3. menggunakan openssl

$ openssl s_client -connect smtps.cbn.net.id:465
CONNECTED(00000003)
--- edited for security purposes ---
---
220 mx-corp3e.int.cbn.net.id ESMTP
ehlo cbn.net.id
250-mx-corp3e.int.cbn.net.id Hello cheyenne.cbn.net.id [202.158.50.81]
250-SIZE 10485760
250-PIPELINING
250-AUTH PLAIN LOGIN
250 HELP
auth plain AGtvc3RrYUBjYm4ubmkAGNibm00MWxndTM=
235 Authentication succeeded
mail from: kostka@cbn.net.id
250 OK
rcpt to: tslan@cbn.net.id
250 Accepted
data
354 Enter message, ending with "." on a line by itself
test kirim email via telnet ke smtps cbn :)
.
250 OK id=1ObqiT-000103-Kk

Tuesday, June 15, 2010

Concurrent Remote Desktop Connection On XP SP2 With Single Login

All you have to do is go to this website, then download the file specifically made for your system, then you'll enable two or more concurrent remote desktop connection to Windows XP Pro SP2 and SP3, as long as you have "fast user switching" active and you're not in a domain.

I need to add something here. This method allow you to be able to do remote desktop connection concurrently using different user account. If you want to use the same user account to concurrently remote desktop, that's another method and I'm not include it in this post :)

Wednesday, June 2, 2010

RRDTool & snmpd (net-snmp) on Linux, Windows and Mac

crucial dependencies for Cacti and Zenoss

* snmpd (net-snmp)
linux: snmpd, snmpwalk, snmp

on Ubuntu:
$ sudo apt-get install snmpd snmp
$ sudo vi /etc/snmp/snmpd.conf (configuration file for net-snmp snmp agent)
snmpd.conf#---------------------------------------------------------------
######################################
# Map the security name/networks into a community name.
# We will use the security names to create access groups
######################################

# sec.name               source                      community

com2sec my_sn1     localhost                   my_comnt
com2sec my_sn2     192.168.10.0/24     my_comnt

####################################
# Associate the security name (network/community) to the
# access groups, while indicating the snmp protocol version
####################################

# sec.model sec.name
group MyROGroup v1 my_sn1
group MyROGroup v2c my_sn1
group MyROGroup v1 my_sn2
group MyROGroup v2c my_sn2


group MyRWGroup v1
my_sn1
group MyRWGroup v2c my_sn1
group MyRWGroup v1 my_sn2
group MyRWGroup v2c my_sn2

#######################################
# Create the views on to which the access group will have access,
# we can define these views either by inclusion or exclusion.
# inclusion - you access only that branch of the mib tree
# exclusion - you access all the branches except that one
#######################################

# incl/excl subtree mask (opcional)
view my_vw1 included .1 80
view my_vw2 included .iso.org.dod.internet.mgmt.mib-2.system

#######################################
# Finaly associate the access groups to the views and give them
# read/write access to the views.
#######################################

# context sec.model sec.level match read write notif
access MyROGroup "" any noauth exact my_vw1 none none
access MyRWGroup "" any noauth exact my_vw2 my_vw2 none
# -----------------------------------------------------------------------------


$ sudo vi /etc/default/snmpd

find the line:

SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1'
and change it to:

SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid'


win: net-snmp
1. Download the binary of your windows version then install. Usually it will install to c:\usr
2. To check the installation, run this command from command prompt
c:\usr\bin>snmpd -v

3. Run snmp-agent as service
c:\usr>registeragent.bat


4. Create snmpd.conf file on c:\usr\etc\snmp\ and fill with this configuration:

## Of the following Net-SNMP agent features
## NONE are supported on Net-SNMP-5.1.1 Win32 platforms
## Process checks “proc” config token
## Executable scripts “exec” config token
## Disk checks “disk” config token
## Load average checks “load” config token
## Extensible sections “exec” config token with shelltest
## Pass-through control “pass” config token

#############################################################
#
# EXAMPLE.conf:
# An example configuration file for configuring the ucd-snmp snmpd agent.
#
#############################################################
#
# This file is intended to only be an example. If, however, you want
# to use it, it should be placed in c:/usr-mingw/etc/share/snmp/snmpd.conf.
# When the snmpd agent starts up, this is where it will look for it.
#
# You might be interested in generating your own snmpd.conf file using
# the “snmpconf” program (perl script) instead. It’s a nice menu
# based interface to writing well commented configuration files. Try it!
#
# Note: This file is automatically generated from EXAMPLE.conf.def.
# Do NOT read the EXAMPLE.conf.def file! Instead, after you have run
# configure & make, and then make sure you read the EXAMPLE.conf file
# instead, as it will tailor itself to your configuration.

# All lines beginning with a ‘#’ are comments and are intended for you
# to read. All other lines are configuration commands for the agent.

#
# PLEASE: read the snmpd.conf(5) manual page as well!
#

####################################################################
# Access Control
####################################################################

# YOU SHOULD CHANGE THE “COMMUNITY” TOKEN BELOW TO A NEW KEYWORD ONLY
# KNOWN AT YOUR SITE. YOU *MUST* CHANGE THE NETWORK TOKEN BELOW TO
# SOMETHING REFLECTING YOUR LOCAL NETWORK ADDRESS SPACE.

# By far, the most common question I get about the agent is “why won’t
# it work?”, when really it should be “how do I configure the agent to
# allow me to access it?”
#
# By default, the agent responds to the “public” community for read
# only access, if run out of the box without any configuration file in
# place. The following examples show you other ways of configuring
# the agent so that you can change the community names, and give
# yourself write access as well.
#
# The following lines change the access permissions of the agent so
# that the COMMUNITY string provides read-only access to your entire
# NETWORK (EG: 10.10.10.0/24), and read/write access to only the
# localhost (127.0.0.1, not its real ipaddress).
#
# For more information, read the FAQ as well as the snmpd.conf(5)
# manual page.

####
# First, map the community name (COMMUNITY) into a security name
# (local and mynetwork, depending on where the request is coming
# from):

# sec.name source community —-> **edit this part to match your requirement** com2sec local localhost [comm name]
com2sec mynetwork 192.168.13.0/24 [comm name]

####
# Second, map the security names into group names:

# sec.model sec.name
group MyRWGroup v1 local
group MyRWGroup v2c local
group MyRWGroup usm local
group MyROGroup v1 mynetwork
group MyROGroup v2c mynetwork
group MyROGroup usm mynetwork

####
# Third, create a view for us to let the groups have rights to:

# incl/excl subtree mask
view all included .1 80

####
# Finally, grant the 2 groups access to the 1 view with different
# write permissions:

# context sec.model sec.level match read write notif
access MyROGroup “” any noauth exact all none none
access MyRWGroup “” any noauth exact all all none

# —————————————————————–
##################################################################
# System contact information
#

# It is also possible to set the sysContact and sysLocation system
# variables through the snmpd.conf file. **PLEASE NOTE** that setting
# the value of these objects here makes these objects READ-ONLY
# (regardless of any access control settings). Any attempt to set the
# value of an object whose value is given here will fail with an error
# status of notWritable.

syslocation Solo.
syscontact Tunggul

# Example output of snmpwalk:
# % snmpwalk -v 1 -c public localhost system
# system.sysDescr.0 = “Windows NT 2000 SP4″
# system.sysObjectID.0 = OID: enterprises.ucdavis.ucdSnmpAgent.win32
# system.sysUpTime.0 = Timeticks: (595637548) 68 days, 22:32:55
# system.sysContact.0 = “Me ”
# system.sysName.0 = “name”
# system.sysLocation.0 = “Right here, right now.”
# system.sysServices.0 = 72

# —————————————————————
#################################################################
# Subagent control
#

# The agent can support subagents using a number of extension mechanisms.
# From the 4.2.1 release, AgentX support is being compiled in by default.
# However, this is still experimental code, so should not be used on
# critical production systems.
# Please see the file README.agentx for more details.
#
# If having read, marked, learnt and inwardly digested this information,
# you decide that you do wish to make use of this mechanism, simply
# uncomment the following directive.
#
# master agentx
#
# I repeat - this is *NOT* regarded as suitable for front-line production
# systems, though it is probably stable enough for day-to-day use.
# Probably.
#
# No refunds will be given.

############################################################
# Further Information
#
# See the snmpd.conf manual page, and the output of “snmpd -H”.
# MUCH more can be done with the snmpd.conf than is shown as an
# example here.



mac: net-snmp - through macports

Details installation and configuration on Mac OS X are on separate post.


* RRDTool
linux: rrdtool

win: 
We all have an impressions that it is very difficult to install RRDTool on a Windows Server (including Windows XP, Windows Vista, Windows NT and Windows 2003/ 2008 Server) but that is not the case. There are few very Simple Steps to install RRDTool:
1. Create a Folder on any of your drives with name RRDTool.
2. Download the latest version of RRDTool from here
3. Extract the ZIP in RRDTool folder.
4. Open START >> Run >> type cmd to open Windows command prompt.
5. Type following command on prompt to use the RRDTool.
cd C:\RRDTool\

mac: rrdtool - through macports

Tuesday, June 1, 2010

Nimbuzz On iChat

Actually the concept is similar to my other posting about using Nimbuzz account through Chatopus in PalmOS. First, you have to create nimbuzz account, then all you need is setting up the nimbuzz parameter in iChat.

Create new account in iChat:
Account Type: Jabber Account
Account Name: [your-username]@nimbuzz.com
Password: [your-password]
Server Options
Server: 194.229.27.7
Port: 5222


then, click 'Done'. After that, check 'Automatically discover server & port' in Server Settings under Account preferences.


And now you can chat with whatever protocol you've registering in your nimbuzz account (even if iChat doesn't support it).. Yahoo Messenger, Live Messenger and Facebook Chat :))

Monday, May 31, 2010

GTalk Setup Using Centerim

If you are spending most of your time using CLI like I do, you could try this tricks to enabling GTalk on centerim. Basically, GTalk is using jabber protocol. What you need to know is only the right parameter to fill in.

server: talk.google.com:5223
secured: yes
login: [your-account]@gmail.com
password: [your-password]

And leave all other settings as it is :)

Cacti Setup Guide on Mac OS X

1) Install PHP and MySQL 5 (not covered).  These instructions assume MySQL 5 was installed from MacPorts.

Check to make sure the PHP variable "mysql.default_socket" is set to path
   /opt/local/var/run/mysql5/mysqld.sock by viewing the output of this terminal command:
# php -i

If not, locate the php.ini file for your version of PHP and type the path there.

2) Set Cacti permissions.
# sudo chown -R : /opt/local/share/cacti/
3) Setup MySQL and prepare it for Cacti. Configure MySQL (new MySQL installs)
# sudo -u mysql /opt/local/lib/mysql5/bin/mysql_install_db
###########################################################
# A startup item has been generated that will aid in
# starting mysql5-server with launchd. It is disabled
# by default. Execute the following command to start it,
# and to cause it to launch at startup:
#
# sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist
###########################################################
--->  Installing mysql5-server @5.1.45_0
******************************************************
* In order to setup the database, you might want to run
* sudo -u _mysql mysql_install_db5
* if this is a new install
******************************************************

$ sudo -u _mysql mysql_install_db5
Installing MySQL system tables...
OK
Filling help tables...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/opt/local/lib/mysql5/bin/mysqladmin -u root password 'new-password'
/opt/local/lib/mysql5/bin/mysqladmin -u root -h MacBook.local password 'new-password'
Alternatively you can run:
/opt/local/lib/mysql5/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.
See the manual for more instructions.

You can start the MySQL daemon with:
cd /opt/local ; /opt/local/lib/mysql5/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd /opt/local/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /opt/local/lib/mysql5/bin/mysqlbug script!

Start MySQL:
# sudo /opt/local/share/mysql5/mysql/mysql.server start

Set MySQL to start at system boot (optional)
# sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist

Set a root MySQL password. Follow the instructions that were given after you executed 'mysql_install_db' above.

Create a cacti MySQL user and cacti database.
# mysql5 -u root -p (login with new root password when prompted)
mysql> grant CREATE,INSERT,SELECT,DELETE,UPDATE on cacti.* to cacti@localhost;
mysql> grant CREATE,INSERT,SELECT,DELETE,UPDATE on cacti.* to cacti;
mysql> SET PASSWORD FOR cacti@localhost = OLD_PASSWORD('');
mysql> create database cacti;
mysql> exit;

Import the cacti database.
# sudo cat /opt/local/share/cacti/cacti.sql | mysql5 -u root -p cacti (cacti is the db name)

Verify the Cacti Database.
#mysql5 -u root -p
mysql> use cacti;
mysql> show tables;
mysql> exit;
4) Edit /opt/local/share/cacti/include/config.php to match your MySQL information.

        $database_type = "mysql";
        $database_default = "cacti";
        $database_hostname = "localhost";
        $database_username = "cacti";
        $database_password = "";

5) Place a symlink for Cacti inside your Apache document root.
# ln -s /opt/local/share/cacti  /cacti
6) Edit the Cacti user's crontab file.
# sudo -u crontab -e

  Insert the crontab entry below:
        */5 * * * * /opt/local/bin/php /opt/local/share/cacti/poller.php > /dev/null 2>&1


8) If you installed Cacti with the 'plugins' variant for Cacti Plugin Architecture support, you must perform these additional steps.

   a) Import the PA schema.
        # cd /opt/local/share/cacti
        # sudo cat /opt/local/share/cacti/pa.sql | mysql5 -u root -p cacti (cacti is the db name)

   b) Download the particular Cacti plugin(s) you want and copy their folders to /opt/local/share/cacti/plugins//.
      For example:
        /opt/local/share/cacti/plugins/weathermap/

   c) Edit /opt/local/share/cacti/include/global.php - modify the url_path to reflect Cacti's default URL
      and add an entry to load each plugin you install; the weathermap plugin is an example:

        $config['url_path'] = '/cacti/';

        $plugins = array();
        $plugins = 'weathermap';

   d) Enable the plugin in the Cacti web interface; this creates a top-level tab for the plugin in the Cacti interface
        Console -> User Management  (select a Cacti user and check the 'View Weathermaps' checkboxes)

7) Go to http://localhost/cacti/install/index.php.
        The default user/password is admin/admin.  Select 'New Install', enter
        the paths for SNMP / RRDtool / PHP (see below), and click 'Finish'.
        You may now use Cacti at http://localhost/cacti/index.php.

Paths:
        snmpwalk binary path: /usr/bin/snmpwalk
        snmpget binary path: /usr/bin/snmpget

        RRDtool binary path: /opt/local/bin/rrdtool
        PHP binary path: /opt/local/bin/php (if not using MacPorts PHP, use appropriate path)

Saturday, April 17, 2010

Resetting MySQL Root Password

This is what you can do to resetting your mysql root access in case you're forget it. I just copy and paste it from mysql official website. Use it wisely, guys :)

On any platform, you can set the new password using the mysql client (but this approach is less secure):
  1. Stop mysqld and restart it with the --skip-grant-tables option.
  2. Connect to the mysqld server with this command:

    shell> mysql
  3. Issue the following statements in the mysql client. Replace the password with the password that you want to use.

    mysql> UPDATE mysql.user SET Password=PASSWORD('MyNewPass')
        ->                   WHERE User='root';
    mysql> FLUSH PRIVILEGES;
You should now be able to connect to MySQL as root using the new password.