add files
[leishi.git] / draft / en / note / debian-install.org
blob67ca2a9d31d77ff6fdd1f68d16d0e6e2dfc48a90
1 * Debian 安装配置
2  - 作者:  [[http://www.stoneszone.net][shilei]]
3  - 版权: 转载请注明出处
5 <comment>
6 <lisp>(setq Title "Debian 安装配置")</lisp>
7 </comment>
10 <contents depth="4">
12 **  1. 中文化 
13 *** 1.1 安装字体
14 *** 1.2 安装输入法
16 **  2. 安装软件
17 *** 1.2 Adobe Reader
18 *** 1.3 Real Player
20 ** 3. Mount windows分区
21    修改/etc/fstab,加入下面代码。
23    -  umask codepage是为了使一般用户有修改权限
24    -  iocharset=utf8是为了正确显示汉字
26 <source lang="shell">
27 /dev/sda6       /mnt/winE       vfat    defaults,codepage=936,iocharset=utf8,umask=000         0       0 
28 </source>
30     
31 ** 4. 解决普通用户声音问题
32 <source lang="shell">
33  $adduser cornerstone audio
34 </source>
36 ** 5. 星际译王
38 ** 6. 安装wine
39 <source lang="shell">
40    $apt-get install wine
41 </source>
42    - 配置文件为~/.wine
43      1. dosdevices 下为模拟windows目录结构
44      2. drive_c为c盘
45      3. user.reg为配置文件,一般用winecfg修改
46    - 运行直接键入wine hypwise.exe
47    - 将 windows/system32下的
48      1. cryptui.dll
49      2. opengl32.dll
50      3. glu32.dll
51      4. shdocvw.dll
52      5. shlwapi.dll 
53      拷贝到wine的drive_c/windows/system32目录下,并启动winecfg在libraries变迁下选择new override for library里输入cryptui,点击add,把上面的5个加入。
54      
55     - 或者直接在user.reg下找到
56      "cryptui"="native.builtin"
57      "glu32"="native.builtin"
58      "opengl32"=...
59      "shdocvw"=...
60      "shlwapi"=...
62 ** 7. 安装xlterm
63   - 很好用的控制台,对中文支持很好
65 <source lang="shell">
66   apt-get install xlterm xlterm-tools
67 </source>
69 ** 8. 安装chmsee查看器
70    下载chmsee.deb
71 <source lang="shell">
72   #dpkg -i chmsee.deb
73 </source>
75 ** 9 安装支持中文的gftp
76 *** 9.1 下载和安装
77 <source lang="shell">
78   #dpkt -i gftp....deb
79   #ln -s /usr/lib/libcrypto.so.0.9.8 /usr/lib/libcrypto.so.0.9.7
80   #ln -s /usr/lib/libssl.so.0.9.8 /usr/lib/libssl.so.0.9.7
81 </source>
83 *** 9.2 启动gftp,在选项中的远程字符集填入GBK
85 ** 10 内核参数
86 *** 10.1 控制台分辨率Framebuffer Booting
87   -给内核传递参数,vga=0x318
88 <source lang="shell">
89    kernal /boot/vmlinuz-2.4.19  root=/dev/hda3 ro vga=0x323 acpi_sleep=s3_bios
90 </source>
92 *** 10.2 休眠后黑屏
93   - acpi_sleep=s3_bios
95 ** 11 thinkpad 功能键
96   - 安装 tpb 和hotkey-setup
98 ** 12 指纹识别
99   - BioAPI framwork
100     [[www.qrivy.net/~michael/blua]]
101     [[www.qrivy.net/~michael/temp]]
102   - BSP(Biometric Service Provider) driver
103     [[www.upek.com/support/dl_linux_bsp.asp]]
104   - pam_bioapi module 使得BioAPI可以被Linux PAM系统使用
105     [[www.qrivy.net/~michael/blua/pam_bioapi/]]
106   - pam Configure配置其服务
108 *** 12.1 BioAPI framwork 安装
109   - 忽略找不到/usr/lib/libqtpwbsp.so
110 <source lang="shell">
111   #dpkg -i bioapi_1.2.3_i386.deb
112 </source>
114 *** 12.2 UPEK BSP 安装
115   - 给定BioAPI库的安装路径/usr/lib
116 <source lang="shell">
117   #sh install.sh /usr/lib
118 </source>
120 *** 12.3 pam_bioapi
121   -下载patch [[badcode.de/downloads/fingerprint.patch]]
122 <source lang="shell">
123   #patch -p0 </path/to/the/downloaded/fingerprint.patch
124   #apt-get install libpam0g-dev
125   #./configure
126   #make
127   #make install
128 </source>
130 *** 12.4 Enrolling users and pam configuration
131   - 需要你的fingerprint reader的module ID,我的是{5550454b-2054-464d-2f45-535320425350}
132 <source lang="shell">
133   #BioAPITest|sed -ne "/Fingerprint/{n;n;s/^.*:\(.\{9\}\)\(.\{4\})(.\{4\})(.\{4\})\(.*\)/\1-\2-\3-\4-\5/gp}"
134   #mkdir -p /etc/bioapi1.10/pam/{{5550454b-2054-464d-2f45-535320425350}}
135 </source>
136   - 编译采样程序并采样
137   - 修改main.c中的#include "port/bioapi_port.h"改为<stdlib.h>
139 <source lang="shell">
140    #cd /PathToUPEK_BSP/NonGUI_Sample
141    #ogcc -o Sample main.c -L/usr/local/lib -lbioapi100 -DUNIX -DLITTLE_ENDIAN
142    #./Sample
143 </source>
144    - 输入enroll
145    - 输入需要采样的用户名
146    - 指纹采样
147    - 将生成的user_name.bir拷贝至上步骤创建的文件夹
150 *** 12.5 配置服务来使用pam_bioapi模块作为验证源
151    - 修改/etc/pam.d/common-auth, 加入
152 <source lang="shell">
153     auth            sufficient /usr/local/lib/security/pam_bioapi.so {5550454b-2054-464d-2f45-535320425350} /etc/bioapi/pam/
154     password        sufficient /usr/local/lib/security/pam_bioapi.so {5550454b-2054-464d-2f45-535320425350} /etc/bioapi/pam/
155 </source>
156     
157    以下的修改好像不需要
158    - 对于每个Pam的服务,都有一个配置文件在/etc/pam.d/中
159    - 修改/etc/pam.d/login    => 控制台登录
160    - 修改..........gdm       => gnome登录
161    - 位于@include common-auth之前
162 <source lang="shell">
163    auth sufficient /usr/local/lib/security/pam_bioapi.so {5550454b-2054-464d-2f45-535320425350} /etc/bioapi/pam/
164 </source>
166 *** 12.6 xscreensaver的指纹识别
167   -下载
168    http://www.jwz.org/xscreensaver/
169    http://www.nax.cz/pub/bioapi/2005/xscreensaver/screensaver-4.22_alternativeAuth.diff 
170    或者http://zepan.org/files/screensaver-4.22_alternativeAuth.diff
171   - 对于xscreensaver 5.00 下载下列patch
172    http://www.zzamboni.org/brt/files/xscreensaver-5.00-alternativeauth.patch
173   - 将patch放在解压缩的目录中
174 <source lang="shell">
175   #patch -p1 < xscreensaver-4.22_alternativeAuth.diff
176 </source>
177   - compiled 
178 <source lang="shell">
179   #./configure --with-pam&&make
180 </source>
181   - 如果收到 Couldn't find X11 headers/libs 可以apt-get install xlibs-dev
182   - make install
183   - 确保使用的是新安装的
184 <source lang="shell">
185   #whick xscreensaver
186    /usr/local/bin/xscreensaver
187 </source>
192 ** 13. sensors-applet 硬件监控
193 ** 14. java
195   - 修改源的范围,在主要源的 main 后加入 no-free contrib
196 <source lang="shell">
197   #apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
198 </source>
200 ** 15. 加入微软字体
201   -修改源 加入no-free contrib
202 <source lang="shell">
203   #apt-get install msttcorefonts
204   #fc-cache -fv
205 </source>
207 ** 16. 修正显示时间
208   在/etc/init.d/hwclock.sh中找到并添加HWCLOCKPARS=--directisa
210 ** 17. 删除系统喇叭
211 <source lang="shell">
212   #rmmod pcspkr    删除系统喇叭
213   #modprobe pcspkr 加入系统喇叭
214 </source>
216 ** 18. 没有公钥问题
217   - 找不到就用wwwkeys.eu.pgp.net
218   - key 直采用apt-get update报错的那个
219 <source lang="c">
220   #gpg --keyserver keyring.debian.org --recv-keys 2D230C5F
221   #gpg --armor --export 2D230C5F | apt-key add -
222   #apt-get update
223 </source>
225 ** 19. Compiz fusion 3D桌面
226  - 目前的3D桌面引擎有Novell的Xgl和Redhat AIGLX两个方案.
227  -- AIGLX本身已经整合进X.Org 7.1 安装比较简单
228  - 我的X60 显卡为intel i945GM, Xgl和AIGLX两者都支持
230 *** 19.1 准备
231  - 检查显卡规格
233 <source lang="C">
234   #lspci|grep VGA
235 </source>
237  - 检查显卡是否支持Compiz Fusion,若有AIGLX enabled,,表示已启用.
238 <source lang="C">
239   #grep AIGLX /var/log/Xorg.0.log
240 </source>
242  - 确认AIGLX一本启用,可以
243 <source lang="C">
244   #glxinfo|less
245 </source>
247  - 如果输出的含有一下内容,您電腦亦可以成功啟動 Compiz Fusion 
248  在direct rendering下 |  Yes」表示 X Window 已支援 Direct Rendering
249  在server glx extensions 和 client glx extensions下 | 若有GLX_EXT_texture_from_pixmap」 表示 X Window 已支援 GLX_EXT_texture_from_pixmap 
251 *** 19.2 安装
252   compiz | Compiz 的核心部份
253   compiz-gnome 或 compiz-kde | GNOME/KDE 視窗裝飾引擎
254   compiz-fusion-plugins-main | Compiz Fusion 主要附加元件,包括 cube, animation, expo, negative, opacify, scale 和 wall 等。
255   compiz-fusion-plugins-extras | Compiz Fusion 額外附加元件,包括 addhelper, benchmark, cube reflection 和 firepaint 等。
256    emerald | 另一個可以有多個佈景主題的視窗裝飾引擎。
257    compizconfig-settings-manager | 配置 Compiz Fusion 及其附加元件的 GTK+ 配置介面
260   - 加入源
261 <source lang="C">
262     deb http://download.tuxfamily.org/shames/debian-sid/desktopfx/snapshot/ ./
263 </source>
265   - 安装(gnome)
266 <source lang="C">
267   #wget http://download.tuxfamily.org/shames/A42A6CF5.gpg -O- | sudo apt-key add -
268   #apt-get update
269   #apt-get install compiz-fusion-gnome compiz-fusion-plugins-main compiz-fusion-plugins-extras fusion-icon
270 </source>
271   
272 *** 19.3 修正UI刷性问题的Bug
273  - 修改/etc/X11/xorg.conf,, 在显卡的device项目中加入
274 <source lang="shell">
275    Option "XAANoOffscreenPixmaps" "true"
276 </source>
278 *** 19.4 使用
279   - 启动
280 <source lang="c">
281   #fusion-icon
282 </source>
283   - 自动启动,,将fusion-icon放入gnome的启动项目中
284   - 用法
286 按键 || 意义
287 Ctrl-Alt-滑左鼠 | 桌面立方体
288 Ctrl-Alt-Down  | 立方体展开
289 Ctrl-Alt-左方向鍵 | 切换虚拟桌面
290 Alt-Tab | 切換至同一個桌面的下個視窗
291 Win-Tab | 动态切换一个桌面的下个视窗
292 Ctrl-Alt-Tab | 切換至所有桌面的下個視窗
293 Win-滑鼠滾輪 | 拉近(放大)或推遠(縮小)整個熒幕。
294 Alt-滑鼠滾輪 | 改變視窗的透明度。
296 *** 效果
297   [[./images/compiz-fusion/compiz-fusion.png][桌面立方体特效]]]
298   [[images/compiz-fusion/3d-desktop.png][3d Desktop]]
299   [[images/compiz-fusion/switch-application.png][switch apps]]
301 ** 20. Mplayer
302 *** 在Console中播放
303 <source lang="shell">
304   #mplayer -vo fbdev filename.avi
305 </source>
307 *** 快捷键
308  - f 播放放视频时,在全屏和窗口模式之间切换。你也可以在命令行中使用 -fs 选项,以便让 MPlayer 开始在全屏模式中播放。
309  - o在播放视频时切换 OSD(OnScreen Display)模式。
310  - p 或 Space-暂停/继续播放。
311  - q 或 Esc-退出 MPlayer。在 GUI 模式时,Esc 不会退出,仅停止播放。
312  - / 和 * 或 9 和 0-减小或增大音量。
313  - m-静音切换。
314  - T(通常是 Shift + t)-播放窗口置顶切换。
315  - b 和 j-在可用的字幕间循环。
316  - x 和 z-调整字幕的延迟时间。
317  - I(Shift + i)-显示播放电影的文件名称。
318  - 1 和 2-调整对比度。
319  - 3 和 4-调整亮度。
320  - 5 和 6-调整色度。
321  - 7 和 8-调整饱和度。
323 ** 21 virtual box
324 - 最好到virtual box官方网站下载非开源版本的deb,否则不支持usb 
325 - 如果采用开源的virtualbox,关键是内核模块安装
326  <source lang="shell">
327    # apt-get install virtualbox-source ,大概是这个名字
328    # tar xvjf virtualbox-ose.tar.bz2
329    # module-assistant auto-install virtualbox-ose
330    # modprobe vboxdrv
331  </source>
333 ** 摄像头
334   我的摄像头是10moons,为中微(vimicro)的vc0326ppdb芯片。安装了之后显示为A4Tech PK-130MG设备
335 <source lang="shell">
336   #apt-get install gspca-modules-2.6.25-2-686
337   #apt-get install webstream //这个是一个本地显示摄像头图像的小软件
338 </source>