sshlog
msgbartop
msgbarbottom

10 Jul 10 mysql 匯入問題

前陣子處理客戶 mysql 轉移問題,這是從別台主機轉過來,但是對方在編碼部份一直有問題,最後算是匯入進去,不過編碼上還是有問題。

mysql 若沒有設定的話,預設語系是 latin1 ,dump 出來資料也是用 latin1 編碼。所以在匯入資料時候,將 dump 資料之前加上 set names utf8 ,強迫指定 utf8 語系,匯入之後才是正確 utf8 編碼。

26 Nov 09 Auto Login on Fedora 12 / Windows 2003 Server

for Fedora 12

modify /etc/gdm/custom.conf

[daemon]
TimedLoginEnable=true
AutomaticLoginEnable=true
AutomaticLogin=your_account
TimedLogin=your_account
TimedLoginDelay=0


for Windows 2003 Server

Run -> Regedt32.exe

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
   DefaultUserName=your_account
   DefaultPassword=your_password
   AutoAdminLogon=1

25 Nov 09 Install Skype on Fedora 12

Install Skype on Fedora 12

sudo wget http://fedorasolved.org/multimedia-solutions/skype.repo -O /etc/yum.repos.d/skype.repo
sudo yum update
sudo yum install -y libX11.i686 libv4l.i686 skype --nogpgcheck

link: Installing Skype

02 Nov 09 Enable Sound in Windows Server 2003

1.Menu -> Administrative Tools -> Services
2.Find the “Windows Audio” -> Automatic

links:
Enable Sound in Windows Server 2003

22 Oct 09 Use Avira AntiVir Rescue System on USB Stick

Avira AntiVir Rescue System is a live cd. You can use this rescue cd boot , scan virus infections for your computer.   You download rescue iso file , brun in your cd-rw or usb stick .

I use this rescue system on my usb stick.

  1. First download rescue system iso file
  2. Don’t burn , then save file to iso file
  3. mount this iso file
    mount -o loop rescue.iso /mnt/iso
    
  4. copy file to your usb stick
    cp -a /mnt/iso/* /mnt/usbstick
    
  5. configure syslinux.conf
    label avira
      kernel /avira/vmlinuz
      append vga=769 initrd=/avira/initrd.gz ramdisk_size=133551 root=/dev/ram0 rw  console=/dev/vc/4
    

    Note: vmlinuz and initrd.gz file move avira directory , other directory keep on root directory

  6. umount usb stick and update syslinux
    sudo umount /dev/sdd1
    sudo syslinux /dev/sdd1
    
  7. if your usb stick have no boot loader , you must run this command
    cat /usr/lib/syslinux/mbr.bin > /dev/sdd
    
  8. if don’t have any problem, you can boot via this usb stick .

10 Sep 09 Install Virtualbox on CentOS 5.3

這次安裝 Virtualbox 在 CentOS 5.3 居然花很多時間,最後還是找出問題。

  1. Download Virtualbox for CentOS 5 i386 | AMD64
    wget http://download.virtualbox.org/virtualbox/3.0.6/VirtualBox-3.0.6_52128_rhel5-1.i386.rpm
  2. Install gcc , make , kernel-header
    yum install gcc make

    由於我的 Kernl 是 PAE 版本,要安裝 kernel-PAE

    yum install kernel-headers kernel-PAE

    指定 KERN_DIR 變數,以利後面 vboxdrv 安裝

    export KERN_DIR=/usr/src/kernels/2.6.18-128.7.1.el5-PAE-i686
  3. Install VirtualBox
    sudo rpm -i VirtualBox-3.xxxxx.rpm

15 Aug 09 Coscup 2009 Bof – Ubuntu Party

這次的簡報內容。

Tags:

08 Jun 09 Use SystemRescue and Clonezilla on Usb Stick

SystemRescue 和 Clonezilla 都是救援的好工具,但是卻是兩個不同的系統,往往要帶兩張 Live CD 處理。這一次試著吧這兩個系統放在 Usb Stick 上。

原理很簡單,只要修改 systemrescue cd isolinux.cfg 檔案內容,讓開機程式能找到 Clonezilla 程式。

1.下載 SystemRescureCD 1.2Clonezilla

2.掛載 systemrescuecd.iso

sudo mount -o loop systemrescuecd.iso /mnt/iso

3.解開 Clonezilla.zip

unzip clonezilla.zip

4.將隨身碟格式化 ext2

mkfs.ext2 /dev/sdc1 
mount /dev/sdc1 /mnt/usb

5.將 systemrescuecd 內容複製到 usb stick 上

rsync -av /mnt/iso/* /mnt/usb

6.而 clonezilla 內 home , live 目錄,複製到 usb stick 上

rsync -av home /mnt/usb
rsync -av live /mnt/usb

7.修改 isolinux.cfg , 加入 clonezilla label

label clonezilla
  kernel /live/vmlinuz1
  append initrd=/live/initrd1.img boot=live union=aufs    noprompt ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_keymap="" ocs_live_batch="no" ocs_lang="" vga=791 ip=frommedia nolocales

label clonezilla 800x600
  kernel /live/vmlinuz1
  append initrd=/live/initrd1.img boot=live union=aufs    noprompt ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_keymap="" ocs_live_batch="no" ocs_lang="" vga=788 ip=frommedia nolocales

label clonezilla 640x480
  kernel /live/vmlinuz1
  append initrd=/live/initrd1.img boot=live union=aufs    noprompt ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_keymap="" ocs_live_batch="no" ocs_lang="" vga=785 ip=frommedia nolocales

label clonezilla toram
  kernel /live/vmlinuz1
  append initrd=/live/initrd1.img boot=live union=aufs    noprompt ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_keymap="" ocs_live_batch="no" ocs_lang="" vga=791 toram ip=frommedia nolocales

label clonezilla without framebuffer
  kernel /live/vmlinuz1
  append initrd=/live/initrd1.img boot=live union=aufs    noprompt ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_keymap="" ocs_live_batch="no" ocs_lang="" ip=frommedia nolocales vga=normal

label clonezilla failsafe
  kernel /live/vmlinuz1
  append initrd=/live/initrd1.img boot=live union=aufs    noprompt ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_keymap="" ocs_live_batch="no" ocs_lang="" acpi=off irqpoll noapic noapm nodma nomce nolapic nosmp ip=frommedia nolocales vga=normal

8.給予 usb stick 開機功能

sudo mv /mnt/usb/isolinux/isolinux.cfg /mnt/usb/isolinux/extlinux.conf
sudo extlinux -i /mnt/usb/isolinux 
umount /mnt/usb
cat /usr/lib/syslinux/mbr.bin > /dev/sdc

最後用 fdisk 指令,將 /dev/sdc1 給予 boot 。

9.用 Usb stick 開機,在 boot 提示底下,打 clonezilla 就可以進入 clonezilla 系統。

07 Apr 09 [pkg] ssmtp

Hinet 會擋掉用 adsl 架設的 smtp server,所以此主機一直無法發信出來,像每日 logwatch 就是一直無法收到。今天看到一個套件 ssmtp ,可以指定 smtp server。
裝法很簡單:

sudo apt-get install ssmtp

另外把 postfix / sendmail 之類軟體移除。

設定 /etc/ssmtp/ssmtp.conf

mailhub=smtp.gmail.com:587
FromLineOverride=YES
AuthUser=user@gmail.com
AuthPass=gmail_password
UseSTARTTLS=YES

這樣一來,就可以透過 gmail smtp server 發信。

24 Mar 09 GNOME 2.26 Release Notes

正體中文版內容

目前新的 Linux Distributions 都會收入,例如即將發行的 Ubuntu 9.04 也收入 Gnome 2.26 ,想嘗鮮朋友,可以下載 Ubuntu 9.04 Alpha 6試用。