自由學習的風

幽夢影 張潮 少年讀書,如隙中窺月;中年讀書,如庭中望月;老年讀書,如臺上玩月。皆以閱歷之淺深,為所得之淺深耳。

[Ubuntu] Samba (網路芳鄰) 服務效能的設定值

2014年11月29日 星期六

Samba 官方文件說明:
http://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html

網路上討論 Samba 效能的設定值:Faster Samba (SMB / CIFS) Share Performance
strict allocate = Yes
read raw = Yes
write raw = Yes
strict locking = No
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072
min receivefile size = 16384
use sendfile = true
aio read size = 16384
aio write size = 16384

[mysql] 修改mysql 的預設編碼

2014年10月14日 星期二

ubuntu linux:
/etc/mysql/my.cnf
win:
(installed path)/mysql/my.ini

[mysqld]
collation-server = utf8_unicode_ci
init-connect='SET NAMES utf8'
character-set-server = utf8

修改前


修改後

Java 存取本地電腦檔案 資料

2014年8月12日 星期二

http://jeffreyjc.pixnet.net/blog/post/13970514-java-applet%E5%AD%98%E5%8F%96%E6%9C%AC%E5%9C%B0%E9%9B%BB%E8%85%A6%E6%AA%94%E6%A1%88

http://tkcnandy.blogspot.tw/2009/12/sign-applet.html

[Ubuntu] 把 shutter 設為截圖預設程式

2014年8月3日 星期日

文章出處:http://shutter-project.org/faq-help/set-shutter-as-the-default-screenshot-tool/

寫得蠻清楚的!

Shutter as default
To configure Shutter as the default tool to take screenshots with when you press PrtSc or Alt+PrtSc, here's what you need to do:
gnomeunity
  1. Go to System Settings ▸ Keyboard
Gnome/Unity - System Settings
Gnome/Unity – System Settings
  1. Switch to the Shortcut tab and add a new custom shortcut
Gnome/Unity - Add new custom shortcut
Gnome/Unity – Add new custom shortcut
  1. Enter a Name (e.g. Shutter) and a Command (e.g. shutter -f)
Gnome/Unity - Enter command
Gnome/Unity – Enter command
  1. Click the new row and hold down the new keys in order to add/edit the accelerator
Gnome/Unity - Edit accelerator
Gnome/Unity – Edit accelerator
  1. That's it! Now the usual PrtSc keybinding will use Shutter to take the screenshots.

[ESXi] 更新至 ESXi 5.5

2014年7月25日 星期五

手邊有三台機器,4.1, 5.0, 5.1 都有,剛好這一次是 ESXi 4.1 這台出問題,就順便把它們維護一下。

5.1 可以直接下載更新套件直接下指令更新
5.0 就只能利用光碟開機後來更新了,試過用指令更新,它會重新後回復成5.0
4.1 就沒辦法,只能重新安裝了!


[esxi] Ubuntu Server 14.04 安裝 vmware-tool

2014年7月24日 星期四

1. 掛載 vmware-tools  光碟


$ sudo mount /dev/cdrom  /mnt


2.解壓縮
$ cd 
$ tar zxvf /mnt/VMwareTools-x.x.x-xxxxx.tar.gz

3. 安裝必要套件
$ sudo apt-get  linux-header-$(uname -r)  gcc

4.製作需要的連結
$ cd /lib/modules/$(uname -r)/build/include/linux
$ sudo ln -s ../generated/utsrelease.h
$ sudo ln -s ../generated/autoconf.h
$ sudo ln -s ../generated/uapi/linux/version.h 

5. 執行安裝
$ cd  ~/vmware-tools-distrib
$ sudo  ./vmware-install.pl


(幾乎都是用預設值就可以裝起來了,如果問 the path to the kernel headers 的話,就輸入「/usr/src/linux-headers-$(uname -r)/include」)


[Ubuntu] 設定多個 route

2014年7月23日 星期三

Ubuntu 中,多個 route 的網路設定:
auto eth0
iface eth0 inet static
      address 192.168.1.2
      netmask 255.255.255.0
      up route add -net 192.168.0.0 netmask 255.255.0.0 gw 192.168.1.1
      up route add -net 172.16.0.0 netmask 255.255.0.0 gw 192.168.1.1