Monday, February 01, 2010

[task] Build X (on going)

mesa 7.7 可以編譯成功,代表如果要編更大包 整個 X windows 系統,應該是有機會成功的。
之前編了好幾次都失敗 >_<

目的就是要解決 Intel On Board 顯示晶片在 CentOS 4 無法使用 1920x1080 解析度(21 吋) 的問題。

先整理一下文件
Intel Linux Graphics Driver Installation Guide
http://intellinuxgraphics.org/install.html

BuildingX
http://wiki.x.org/wiki/Development/BuildingX?action=show&redirect=Development%2Fgit

Building the DRI with X.org and Mesa
http://dri.freedesktop.org/wiki/Building

fresdesktop source
http://cgit.freedesktop.org/

http://xorg.freedesktop.org/archive/individual/driver/

[task] Mesa 7.7 compile (on going)

Mesa 7.7 編譯過程是我遇過非常繁雜的。

目前在 Ubuntu 可以編譯成功,但在 CentOS 還在努力當中。

目前先講 Ubuntu 部分

[Ubuntu]
0. 先假定我們要安裝到 /opt/mesa , 下載的 source 全部放在 /usr/local/src/build_mesa
記得安裝 apt-get install build-essential libx11-dev gcc4
由於我採用 gcc4 編譯 安裝到 /opt/mesa

請每次編譯時 ./configure prefix=/opt/mesa CC=/usr/bin/gcc4
以下文章以 ./configure 簡稱

1. 先到 Mesa 網站 http://www.mesa3d.org/relnotes-7.7.html
下載 MesaLib-7.7.tar.bz2 MesaDemos-7.7.tar.bz2 MesaGLUT-7.7.tar.bz2
解開全部後,先是一次 ./configure 她會告訴你缺 libdrm 。

沒關係 這裡給一個網站 http://paldo.org 這是一套 Linux Distrubtion
我們可以找到所有我們需要的 source 而且這個網站也會提供套件的相依性
所以當我們卡在某個套件無法編譯時,可以看看是否有缺哪些套件沒有先進行編譯

下載完 libdrm 她又會告訴你缺 pkg-config
回去再編 libdrm 她又會告訴你缺 libpthread-stubs-0.1
OK, 這會是一個超級迷宮,在編譯過程中會不斷出現,只能認命了

這裡提示一下 幾個重要的地方
a. pkg-config
編譯後 setenv PKG_CONFIG_PATH /opt/mesa/lib/pkgconfig
我們編譯過程 py 檔幾乎都乎都會放在這個目錄,除了 xtrans 以外
其他編譯的程式若需要參考 .py 我們就設定這個變數讓他到這目錄找

b. xtrans
編譯 xtrans 之後 將 xtrans.pc 放到 $PKG_CONFIG_PATH
cp /opt/mesa/share/pkgconfig/xtrans.pc $PKG_CONFIG_PATH

c. 如果忘記編到那忘記了
很簡單 回到第一層 mesa-7.7 重新 ./configure 就會告訴你缺什麼了

[CentOS]

仍待測試... 尚未成功 整理中
下面為編譯順序 卡在 libxcb ,

pkg-config
setenv PKG_CONFIG_PATH /users/acty.chen/work/GPU2/lib/pkgconfig


libptheard-stubs
pixman
cario


dri2proto

xproto
xextproto

xtrans
cp ../../GPU2/share/pkgconfig/xtrans.pc ../../GPU2/lib/pkgconfig/xtrans.pc


Python

setenv PATH ~/work/GPU2/bin:$PATH
xcbp-proto
libXau
libxcb

Friday, January 29, 2010

Ubuntu 影音安裝 list

整理 Ubuntu 下要使用影音的軟體清單

apt-get install gstreamer0.10-plugins-ugly gstreamer0.10-ffmpeg

Monday, January 11, 2010

linux top 相關文章

目前工作要釐清的問題

http://www.linuxforums.org/articles/using-top-more-efficiently_89.html


關於 snmp 對 cpu usage 解釋
http://opennms.org/wiki/Net-snmp_5.3_CPU_collections

Wednesday, January 06, 2010

Squid 除錯 - storeSwapOutFileClosed: dirno 1, swapfile 000XXXX, errflag=FFFFFFFF

在 Squid cache.log 看到這個 log 乍看之下以為是 檔案壞掉

2009/12/31 12:44:35| storeSwapOutFileClosed: dirno 1, swapfile 0006DAFB, errflag=FFFFFFFF


經追查結果應該是檔案目錄結構壞掉,無法寫入所致。

把 cache 目錄重新 format 一次再重新建 cache 目錄即可。

Sunday, December 27, 2009

cfengine3 install note - on processing

1. 取得並安裝
wget http://www.cfengine.org/tarballs/cfengine-3.0.3.tar.gz
tar zxvf cfengine-3.0.3.tar.gz
cd cfengine-3.0.3
./configure; make install

2. copy 基本設定檔
mkdir -p /var/cfengine/masterfiles
cp /usr/local/share/doc/cfengine/*.cf /var/cfengine/masterfiles/

3. 第一次執行
cf-key
cd /var/cfengine/masterfiles
cf-agent --bootstrap
這裡會出現兩個錯誤 把下面兩個檔案 copy 到 /var/cfengine/masterfiles
cp /usr/local/share/doc/cfengine/inputs/failsafe.cf .
cp /usr/local/share/doc/cfengine/inputs/update.cf .
再執行一次 cf-agent --bootstrap

Monday, November 30, 2009

Squid 3.1 與 Ubuntu 9.10 - Compile Issue

若用 Ubuntu 9.10 由於 Kernel 已經用到 2.6.31

在 compile 要 squid-3.1.0.15 才不會有問題

用過 squid-3.1.0.8 , squid-3.1.0.13 都不行



0. 先安裝 compiler 相關工具 build-essential
我有用 ldap 所以也要安裝
apt-get install build-essential libssl-dev libldap2-dev


1. tar zxvf squid-3.1.0.15.tar.gz
cd squid-3.1.0.15

vi build.sh
./configure --prefix=/home/squid \
--mandir=/usr/local/man \
--enable-snmp \
--enable-htcp \
--enable-gnuregex \
--enable-dlmalloc \
--enable-referer-log \
--enable-async-io=160 \
--enable-useragent-log \
--enable-cache-digists \
--enable-cpu-profiling \
--enable-kill-parent-hack \
--enable-removal-policies \
--enable-xmalloc-statistics \
--enable-default-err-language=Traditional_Chinese \
--enable-basic-auth-helpers="LDAP" \
--enable-external-acl-helpers="ldap_group" \
--enable-storeio=diskd,ufs \
--with-filedescriptors=4096 \
--with-maxfd=16384 \
--enable-ssl


sh build.sh
make && make install

Saturday, November 28, 2009

更新 cacti 為 0.8.7e

注意事項 若使用 spine (cactid) 0.8.7e 記得要 patch

否則 rrdtool 無法畫圖 (應該是 spine 無法與 mysql 連線)

Wednesday, October 14, 2009

新版 msn 無法用 squid proxy 連線

新版 MSN 一推出,同事的 MSN 都被打掛不能使用。當天真的很慘, MIS 的電話幾乎被打爆。

昨天重新在 review fail log ,忽然找到原因了。

不能連線的原因是出在若使用者某一台電腦是第一次登入 MSN , MSN 會去取連絡人清單等資料,但由於 MSN 有 BUG,當他在用 SSL 連線取得連絡人清單時,並不會把 LDAP 的 帳號帶過去,所以連線被視為非法連線被 Proxy 拒絕掉。
現在只要讓這些網站的 SSL Connection 可以過, MSN 連線就會正常。

squid.conf example

### for new msn messenger
acl msn_ssl dstdomain .contacts.msn.com .storage.msn.com
http_access allow msn_ssl CONNECT

Nvidia Forcedeth 網卡重開會自動關閉 (power off)的作法參考

目前家裡有幾台 Acer Altos Server, OS: CentOS 4.7 Kernel 2.6.28.9 ,

每當重新開機網卡就會開不起來,除非是 cool reboot

找很一段時間,終於用對關鍵字找到文章 forcedeth eth shutdown

網址 http://www.nvnews.net/vbulletin/showthread.php?t=130438

他是說 forcedeth 會在關機的時候 也把自己設定成關閉(應該是自己的 firmware)

新版的 driver 有提供一些參數在 /etc/modprode.conf 可以改變他的行為

不過我換成 2.6.28.10 就沒有這個問題。