2011年12月7日 星期三

Munin installation

# yum install munin munin-node

# chkconfig munin-node on

# service munin-node start

# vim /etc/munin/munin.conf

dbdir   /var/lib/munin
htmldir /var/www/html/munin 
logdir  /var/log/munin
rundir  /var/run/munin
# Where to look for the HTML templates
tmpldir /etc/munin/templates
# a simple host tree [xxx.xx.xx]           ← domain name     
address 127.0.0.1
use_node_name yes

# mkdir /var/www/html/munin

# chown munin:munin /var/www/html/munin/

# service munin-node restart

# vim /var/www/html/munin/.htaccess


AuthUserFile /etc/munin/munin-htpasswd
AuthName "Munin"
AuthType Basic
<limit GET PUT POST>
require valid-user
</limit>

# htpasswd -c /etc/munin/munin-htpasswd admin

2011年10月17日 星期一

Firefox supports multi gesture on mac OSX

1.
   Key-in about:config on your Firefox URL field.
   And key-in gesture on search field.
2.
   edit

   Tree fingers switches web pages.



   browser.gesture.twist.right      Browser:NextTab
   browser.gesture.twist.left       Browser:PrevTab
 
 
  
  Two fingers zooms web pages.
 
browser.gesture.pinch.in         cmd_fullZoomReduce
  browser.gesture.pinch.in.shift   cmd_fullZoomReset
  browser.gesture.pinch.out        cmd_fullZoomEnlarge
  browser.gesture.pinch.out.shift  cmd_fullZoomReset

2011年10月13日 星期四

How to update your iPhone or iPad to iOS5 and sign up a iCloud account including me.com mail service

Step 1.

Plug your iDevices on computer with connecting line.

Step 2.

The iTune will sync your iDevice data and display it can upgrade to iOS 5.

Note: if you use laptop, please hand up your adapter.

Step 3.

Updating until the iTune finished all recover.

Note: The iDevice will power restart many times, please be patient and waiting all process done.

Step 4.

Use your iDevice to sign a iCloud account with your Apple ID, the one is that can purchase App on App Store, and step by step what you need to setup the iCloud service.

Note: iCloud account must be authorized on you iDevice including your iphone or ipad.

Step 5.

When you finish the register, the iCloud services provide you brand new experience, but the mail does

not work. It will need to registered a me.com email address. To log in your iCloud and chose the "Mail".

After that, you can sign up a <YourMail>@me.com address that can use iCloud Mail.

So, you have two account. One is AppleID, the other is me.com mail address.

2011年8月11日 星期四

Wireless connection command on Linux

#ifconfig

Show your network card interface. Mine is wlan0

#iwlist wlan0 scan

This will scan the wireless area to find the AP and essid

#iwconfig wlan0 essid XXXAP key s:PASSWORD


ping a IP to make sure the network on connection.

2011年8月3日 星期三

Nvidia Linux 64 bit driver installation on Fujitsu SH561 with CentOS 6

My office give me a new Fujitsu SH561 laptop. The preinstallation OS is Windows 7 profession. So I take the free HD space to make CentOS 6 installation. To build a twin system laptop.

But when the CentOS is installed, the display driver is set by the CentOS official's. The resolution is only 800x600 and make me bad view. So, I decide to take the Nvidia official drivers.

First, to go the Nvidia official site and the driver download page.
http://www.nvidia.com/Download/index.aspx?lang=en-us
Choosing your display card series,ex. GeForce 500M, card name, mine GT520M, operation system, mine Linux 64 bit, and the language.

Second, you need to close the GUI level 5 and run level 3 on the text mode. System calls close X server.

2011年7月12日 星期二

Karesansui (KVM, XEN web interface management tools) installation on Scientific Linux 5

To edit the install python file
[root@vt-121 ~]# vim Karesansui/installer/install.py



   # distribution check
    if ret is True:
        from installer.utils import get_distrubution
        type,version = get_distrubution()

        supported_os = False
        for _d,_v in SUPPORTED_DISTROS:
            #if type == "%s-release" % _d and version[0:len(_v)] == _v:
            #if type == "%s-release" % _d and re.compile(_v).search(version):
            supported_os = True
                #break
        #if supported_os is False:
            #print >>sys.stderr, _("ERROR: Your distribution is not supported by Karesansui.")
            #ret = False


2011年6月9日 星期四

homebrew uninstallation commands on mac OSX


cd `brew --prefix`
rm -rf Cellar
brew prune
rm -rf Library .git .gitignore bin/brew README.md share/man/man1/brew
rm -rf ~/Library/Caches/Homebrew

2011年6月8日 星期三

Git Newbie command

Global setup:

Download and install Git
  git config --global user.name "Your Name"
  git config --global user.email losehole@gmail.com
        

Next steps:

mkdir test
  cd test
  git init
  touch README
  git add README
  git commit -m 'first commit'
  git remote add origin git@github.com:YOURNAME/test.git
  git push -u origin master
      

Existing Git Repo?

cd existing_git_repo
  git remote add origin git@github.com:YOURNAME/test.git
  git push -u origin master
      

Add and Commit your new file

    git add NEWFILENAME
git commit -m 'NEW commit'  
    git push -u origin master

Gravatar- an avatar in your web account management


Maybe after the Avatar fever, the Gravatar is an avatar that can use the one avatar to log in or sign up different website service.

2011年6月3日 星期五


What is lxml?
lxml is a python tool that can process XML and HTML.
For the reason that I need to use the XMLRPC function, I use the lxml to process 
the requests and responses to call server function and feedback message.   
There are lazy script here:

#sudo port install libxml2 libxslt
#export PATH=/opt/local/bin:$PATH
#export CFLAGS='-flat_namespace'
#sudo easy_install lxml

2011年5月23日 星期一

Ubuntu install ganglia easy steps

At first, you need to build a LAMP architecture in your ubuntu server.

Luckily, we can easy install LAMP step by step and click option when the

Ubuntu installation.  LAMP = Linux Apache MySQL PHP


#sudo apt-get install ganglia-monitor ganglia-webfrontend
#sudo service gmetad start
#sudo service ganglia-monitor start


#sudo ln -s /usr/share/ganglia-webfrontend/ /var/www/ganglia


or


#sudo mv /usr/share/ganglia-webfrontend/ /var/www/ganglia

open browser and type URL   YOURIPorDOMAIN/ganglia


It work~!

2011年5月19日 星期四

GCC Using command

gcc is a GNU project compiler, and you can see it on many Unix like system.

I'll note some using way.

#gcc -O foo.c -o bar.out
#./bar.out

Compile a C program file to a execution file.

-O -> Optimization parameter

-O3 -O2 -O1 -O0    -> 0 do not optimize, 3 is best optimization.


#gcc -Wall -g foo.c -o bar.out

-Wall  -> displayed the warning message  
-g  -> Using gdb debugging and show error message

#gcc -I/usr/include -L/usr/lib -lm test.c -o test 

-Idir_name -> find the header file in directory
-Ldir_name -> find the linrary file in directory
-llibfile_name -> join a library file "libm.so" overpass lib & .so


2011年5月2日 星期一

Mac homebrew git & Aptana Studio 3.0 ruble installation

# ruby -e "$(curl -fsSLk https://gist.github.com/raw/323731/install_homebrew.rb)"


install Xcode

# brew install git


# cd /Users/losehole/Documents/Aptana Rubles
# git clone git://github.com/aptana/YOURPACK.ruble.git


YUI javascript library support: Drop the SDOCML file into your Web Project.

2011年4月28日 星期四

Mac mini server be a wireless AP

1.
Open serveradmin 

select overview => Gateway Setup Assistant


press ethernet => continue => and check the airport to combine the to network interface via NAT.

if you do not need the proxy server then press continue to skip the step.


2.
Open network preferences


Create Network


And the icon will appear like this




OSX snowleopard server mailserver Clamav issue

when I used the serveradmin to watch the System log.

I saw the error message log :

Apr 28 00:30:07 macminiserver org.clamav.clamd[11273]: LibClamAV Warning: **************************************************
Apr 28 00:30:07 macminiserver org.clamav.clamd[11273]: LibClamAV Warning: ***  The virus database is older than 7 days!  ***
Apr 28 00:30:07 macminiserver org.clamav.clamd[11273]: LibClamAV Warning: ***   Please update it as soon as possible.    ***
Apr 28 00:30:07 macminiserver org.clamav.clamd[11273]: LibClamAV Warning: **************************************************
Apr 28 00:30:07 macminiserver org.clamav.clamd[11273]: LibClamAV Error: cli_loadinfo: Digital signature not found
Apr 28 00:30:07 macminiserver org.clamav.clamd[11273]: LibClamAV Error: Can't load daily.info: Malformed database
Apr 28 00:30:07 macminiserver org.clamav.clamd[11273]: LibClamAV Error: cli_tgzload: Can't load daily.info
Apr 28 00:30:07 macminiserver org.clamav.clamd[11273]: LibClamAV Error: Can't load /var/clamav/daily.cvd: Malformed database
Apr 28 00:30:07 macminiserver org.clamav.clamd[11273]: ERROR: Malformed database
Apr 28 00:30:07 macminiserver com.apple.launchd[1] (org.clamav.clamd[11273]): Exited with exit code: 1
Apr 28 00:30:07 macminiserver com.apple.launchd[1] (org.clamav.clamd): Throttling respawn: Will start in 10 seconds

then I restart my clamav freshclam and update clamav

#sudo launchctl unload -w /System/Library/LaunchDaemons/org.clamav.freshclam.plist
#sudo launchctl load -w /System/Library/LaunchDaemons/org.clamav.freshclam.plist

after this command, we can check the log in the serveradmin and it will start to update the virus database. And the error log does not appear again.


2011年4月7日 星期四

MAC OSX cpuinfo flags command

SHOW you CPU info like Linux command #cat /proc/cpuinfo | grep flags

#sysctl -a machdep.cpu | grep VMX

machdep.cpu.features:  FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM SSE3 MON DSCPL VMX SMX EST TM2 SSSE3 CX16 TPR PDCM SSE4.1
 

 

2011年3月30日 星期三

test

#!/usr/local/bin/python
for i in range(1,10):
  for j in range(1,10):
    print "%d*%d=%s" % (i,j,i*j),
  print ""


for i in range(1,10):
for j in range(1,10):
print "%d*%d=%s" % (i,j,i*j),
print ""

2011年3月28日 星期一

Synergy KVM software control on MAC OSX & UNIX by MacBook Air to Mac Mini Server

download & convert file => Synergy Download

you will find synergy-x.x.x-MacOSX-Universal folder

Server (MacBook Air keyboard & touchpad)

open and cp doc/synergy.conf.sample synergy.conf

vi the conf file like this


section: screens
        foo.local:
        bar.local:
end


section: links
        foo.local:
                right = bar.local


        bar.local:
                left  = foo.local
end

execute the synergy server by configure and listen client connection

#sudo ./synergys -f --config synergy.conf




Client (Mac Mini Server + screen)


#./synergyc -f "HostName or IP"




The result is that can use Air's keyboard and touchpad to remote control the 


Mini Server screen and key-in.


And I have more efficiencies to do my job by the one keyboard and touchpad with two Macs.   







2011年3月25日 星期五

putty ppk convert to OpenSSH key on MAC

First, open the puttygen.exe in windows.

you can download here => PuTTYgen

find the conversion toolbar item and select submenu export the ppk to the OpenSSH

ex.   foo_rsa

2011年3月13日 星期日

Mac OSX 32 64 bit kernel boot command

last week, I launch a article about 64 bit kernel booting.

But I found a command today to set up kernel easily form the Apple official site.

#sudo systemsetup -setkernelbootarchitecture x86_64 


#sudo systemsetup -setkernelbootarchitecture i386

2011年3月9日 星期三

MAC OSX boot 64 bit kernel mode default

1. power on your MAC and push keys 4 & 6 on your keyboard until inter your desktop.

2. open the terminal 

     # uname -a

    if it displays ........X86_64 , and you are in the 64 bit kernel.

2011年3月8日 星期二

Linux OSX Windows Web Programming Editors

My project need to develop web UI nearly.

In this project that can use HTML, CSS, JavaScript & library like prototype YUI Ext-JS and  

Dynamic webpage Script(JSP,PHP etc)

First, I need a tool that can code convenient and speed up.

So, I try to find some Editors and IDEs on web site.

2011年2月18日 星期五

MAC R/W NTFS by using terminal

step 1 Check you do not install any NTFS R/W application tool.

#sudo find / -name 'ntfs'  

step 2 copy your /sbin file

#sudo cp /sbin/mount_ntfs /sbin/mount_ntfs.orig 

2011年2月13日 星期日

4 steps upgrade firmware for your Amazon Kindle 3rd

1.Go to this link http://www.amazon.com/gp/help/customer/display.html/ref=hp_navbox_top_kindlelgi?nodeId=200529700
download Kindle 3G (Free 3G + Wi-Fi) - U.S. and Canadian Customers*:  Download 3.1 (Early Preview Release)
Your serial number will start with "B006" (My Kindle bought for US Amazon & chose this version)



if your Kindle is wifi, please select this 
Your serial number will start with "B008"

2011年1月10日 星期一

Linux Notebook purchasing guide(Linux筆電採購指南)

目前幾乎主要的硬體都支援Linux了,但是我們在為Linux採購筆電時還是充滿著許多疑問,怕不相容,買的規格不是自己要的之類等等.就提夠一些採購的方法給大家做為購買時的參考吧.

用途
可以先想一想你打算拿這台筆電來作哪些事,再看自己的用途去選擇規格.
提供一下購買的思考流程給大家做參考吧

1. 預算有多少呢?
2. 打算買幾吋的(11" 13 " 15" 17" 越大當容越重越難攜帶啦)
3. 使用用途是上網文書,系統管理,軟體開發,玩遊戲可能用到windows等...?
4. 需要多少小時的電池使用時間呢?
5. 光碟機是否需要,或者需要藍光或燒錄DVD?
6. 要玩遊戲的話,可能需要雙系統或者開虛擬機器RAM,CPU跟顯示可必須都有不錯的規格.權衡之後可以想一下用桌電是否CP值更高?

這些網站可以看到有哪些牌子的筆電跟相容哪些版本
http://www.linux-laptop.net/
http://www.linuxcertified.com/
當然是大家已經測試過的,自己也可以動手裝裝看發表在上面

 
創用 CC 授權條款