瀏覽模式: 普通 | 列表

DRBL server 升級

官網的建議
安裝好DRBL相關這些程式後,不建議您開您的GNU/Linux啟套件自動更新的功能,
因為有可能更新後,伺服器的檔案和用戶端的檔案版本不一致,
如果您要開啟自動更新功能的話,必須再每次更新後,再自動執行一次上述的步驟
1) 備份  /etc/drbl, /etc/dhcpd.conf, /opt/drbl, /tftpboot
2) 執行/opt/drbl/sbin/drblsrv -u 來移除所有已經安裝過的DRBL相關檔案
3) 下載新版的DRBL主程式,重新安裝一次 (/opt/drbl/sbin/drblsrv -i 與/opt/drbl/sbin/drblpush -i)
標籤: drbl update 升級

DRBL + PXE 開機使用網路方式安裝linux

一般情況下,我們要安裝linux時,會拿光碟開機,在起始畫面前按enter,就會開始進入安裝的過程,
但如果在起始畫面,下了 linux askmethod, 就可以使用 cdrom、hark disk、nfs、url 這些模式來安裝。
而現在是連光碟都不用,搭配 drbl ,加上 linux的 vlinuz、initrd 這兩個檔,
就可以讓client機器能夠使用pxe開機,在網路環境下安裝作業系統。

事先下載回來的linux iso 檔,舉例: fedora-12-i386-DVD.iso
ISO檔裡面的/images/pxeboot/目錄底下有兩個檔,vmlinuz及initrd.img
把它拿出來放到drbl server上的 /tftpboot/nbi_img目錄底下 (你可以更名一下)

再編輯/tftpboot/nbi_img/pxelinux.cfg/default
加入如下,存檔離開就可以了,不用重啟什麼
label fedora12i386                                                    # 這個應該是給系統辨識用
    #MENU DEFAULT                                                    # 代表開機選單預設是會跑這個,倒數幾秒後
    #MENU HIDE                                                          # 如果你不用這個選單了,註解拿掉就把它穩藏
    MENU LABEL fedora 12 i386 install via network     # 開機選單的標籤名稱
    kernel vmlinuz-fedora12.i386
    append initrd=initrd-fedora12.i386.img devfs=nomount drblthincli=off selinux=0 text 1
    TEXT HELP                 # 說明開始
    * comment xx            # 說明內容

[閱讀全文]

我參考了: http://drbl.nchc.org.tw/faq/fine-print.php?path=./1_DRBL_common/29_install_client_kernel.faq#29_install_client_kernel.faq
使用執行了底下的指令

/opt/drbl/sbin/drblsrv-offline -k kernel-2.6.18-8.1.4.el5.i686.rpm

但我測試失敗,會kernel panic
所以我又換回 /opt/drbl/sbin/drblsrv-offline -s `uname -r`
這個動作會置換 /tftpboot/nbi_img/pxelinux.cfg/default 檔,所以記得備份舊的default

標籤: drbl kernel x64

在 Drbl server上 安裝 ntp (yum install ntp)
重新佈署 dcs

/opt/drbl/sbin/dcs → more → re-deploy

再執行

/opt/drbl/sbin/drbl-client-service ntpd on

每次用戶端開啟的時候,就會自動透過NTP伺服器來校時

ref: http://drbl.nchc.org.tw/faq/fine-print.php?path=./1_DRBL_common/32_How_to_calibrate_client_time.faq#32_How_to_calibrate_client_time.faq

標籤: drbl pxe ntp

續: http://ssorc.tw/rewrite.php/read-1089.html

如果在執行 ./VBoxLinuxAdditions-x86.run 後

看到

Verifying archive integrity... All good.
Uncompressing VirtualBox 3.1.6 Guest Additions for Linux........
VirtualBox Guest Additions installer
Removing installed version of VirtualBox Guest Additions...
Building the VirtualBox Guest Additions kernel modules     [失敗]
(Your system does not seem to be set up to build kernel modules.
Look at /var/log/vboxadd-install.log to find out what went wrong)
Installing the Window System drivers


 可以查看 /var/log/vboxadd-install.log記錄訊息,得知原來沒有裝

/usr/src/kernels/2.6.9-89.33.1.EL-i686/scripts/gcc-version.sh: line 11: gcc: command not found

所以只要 yum install gcc 即可  

ps: 也要記得裝 kernel-devel

nagios 可以用來監控主機的服務運作狀態,比方說 ping不ping的到、http可不可以瀏覽等等,

以上都是被監控者不需要作什麼額外設定就可以即時被監控得到的,

假如現在我要監控遠端主機的 CPU、硬碟空間、記憶體等等,怎麼作?

Nagios 提供了一個外掛,叫 NRPE (Nagios Remote Plugin Executor),

它可以讓 nagios server 在固定時間去抓 nagios client 被監控的項目回來判斷是否ok。

如何作 :

Nagios Client 端 (被監控者) ------------------------------

[閱讀全文]

標籤: nagios nrpe 監控

Linux 釋放 cache 記憶體

有三種方式

quote: http://www.linuxinsight.com/proc_sys_vm_drop_caches.html

Writing to this will cause the kernel to drop clean caches, dentries and inodes from memory, causing that memory to become free.

To free pagecache:

echo 1 > /proc/sys/vm/drop_caches
To free dentries and inodes:

echo 2 > /proc/sys/vm/drop_caches
To free pagecache, dentries and inodes:

echo 3 > /proc/sys/vm/drop_caches
As this is a non-destructive operation, and dirty objects are not freeable, the user should run "sync" first in order to make sure all cached objects are freed.

但作這個之前記得先 sync 資料

之前
attachments/201010/4704785367.png

之後
attachments/201010/5601090200.png


標籤: linux memory cache