存档

2006年11月 的存档

正式使用FreeBSD桌面系统工作

2006年11月27日 16hot 1 条评论

从22号开始,将笔记本的系统换成FreeBSD6.2RC1,连续花了5天时间来配置和安装应用软件和开发环境。

今天已经开始在FreeBSD 环境里开始工作了。

安装了 OpenOffice 2.0.3

geany,bluefish,stardict2,firefox2,esvn,rapidsvn,lighttpd,mysql,php,thunderbird等等应用软件。

完整的安装配置过程,还需要时间整理出来。

小结一下,就要做好充分的心理准备,要坚持,要改变自己的习惯,去适应新的环境和工具的使用习惯。

几天下来,会发现很多要用的几乎都有,没有太大的不适应。

分类: 乱七八糟 标签:

freebsd的一些小技巧

2006年11月22日 16hot 没有评论

1. 使用高分辨率控制台
a. 修改/etc/rc.conf,添加此行

allscreens_flags="-g 100×37 VESA_800x600"

设置控制台分辨率为800×600
c. 需要在内核中加入以下选项

# To include support for VESA video modes
options VESA
options SC_PIXEL_MODE

2. 让ls可以显示彩色
编辑~/.cshrc,添加以下两行

alias ls env LC_ALL=en_US.ISO_8859-1 ls -G
setenv LSCOLORS ExFxCxDxBxEgDxDEhGAcHd

3. mount CD/VCD/ DVD光盘

mount _cd9660 -s 0 /dev/acd0 /cdrom

4. 挂载ISO

mdconfig -a -t vnode -f abc.iso -u 1
mount_cd9660 /dev/md1 /cdrom

5. 修改/etc/fstab实现mount自动化
a. 添加如下两行:

/dev/acd0 /cdrom cd9660 ro,noauto 0 0 #CDROM
/dev/da0s1 /mnt msdosfs rw,noauto 0 0 #USB闪盘

b. 挂载则只须mount /cdrom或mount /mnt

6. mount msdos/ntfs/cdrom时无法显示中文的问题
a. mount_cd9660,mount_ntfs支持-C的选项,指定本地字符集
mount_cd9660 -C gbk /dev/acd0 /cdrom
mount_ntfs -C gbk /dev/ad0s1 /mnt/
b. mount_msdosfs支持-D选项指定codepages,用-L选项指定本地字符集
mount_msdosfs –D CP936 -L zh_CN.GBK /dev/da0s1 /mnt/

7. FreeBSD和Windows 2000/XP多重启动
a. 当安装要求选择引导方式选择None,安装完成后FreeBSD分区为活动分区。用Windows 98启动盘引导系统,运行fdisk,将Windows 2000/XP所在的分区改为活动分区
b. dd if=/dev/ad?s? of=bootsect.bsd bs=512 count=1,或者从光盘复制cdrom:bootboot1并改名为bootsect.bsd,两种方法得到的文件是一样的
c. 复制bootsect.bsd到C盘根目录下
d. 编辑C盘根目录下的boot.ini,增加一项c:bootsect.bsd=”FreeBSD 5.2.1-RELEASE”

8. 设置splash画面
修改/boot/defaults/loader.conf的Splash screen configuration部分

splash_bmp_load="YES" # Set this to YES for bmp splash screen!
splash_pcx_load="NO" # Set this to YES for pcx splash screen!
vesa_load="YES" # Set this to YES to load the vesa module if kernel not support
bitmap_load="YES" # Set this to YES if you want splash screen!
# 必须设置成绝对路径
bitmap_name="/boot/defaults/splash.bmp" # Set this to the name of the bmp or pcx file
bitmap_type="splash_image_data" # and place it on the module_path

9. 声卡驱动
a. 编辑/boot/defaults/loader.conf后重启电脑

snd_driver_load ="YES" #加载所有声卡驱动

b. dmesg|grep pcm,对照输出信息,在/boot/defaults/loader.conf中找一个和输出信息一致的驱动并改为YES,在把snd_driver_load ="NO。"
c. 或者在内核中添加device pcm选项

10. 鼠标滚轮的设置
编辑/etc/X11/XF86Config

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "Auto"
Option "Device" "/dev/sysmouse"
Option "ZAxisMapping" "4 5" #鼠标滚轮支持
EndSection

11. flash插件的支持
a. cd /usr/ports/www/linuxpluginwrapper
make install clean
b. 完成后,根据clean之前大提示建立/etc/libmap.conf 相关日志
正则表达式
rsync configuration guide
使用ripe-whois3获得电信,网通等运营商的ip地址
Iperf—超越ttcp的网络性能检测工具
解决不能访问freebsd.org的方法

分类: 乱七八糟 标签:

Linux桌面上不得不用的工具 Krusader

2006年11月14日 16hot 没有评论

Krusader ,是Linux 下的一个强大的文件管理工具,极似Windows下的 Total commander。

抓图: http://krusader.sourceforge.net/screenshotsfs.php

下面拷贝一份他们的Features

Chapter 2. Features

Note

The most important features and improvements are highlighted here, it would make this list too long if we were to include all the features and improvements. You will discover even more features in this documentation and in the ChangeLog file.

 

 

 

New features in version CVS (the future 1.80.0 release)

  • Archive improvements

    • Password support for: arj, ace, rar and zip. Passwords can be stored in Kwallet

    • 7-zip support, by external applications 7z and 7za.

    • Autodetection support, allowing you to open "hidden archives" (e.g. OpenOffice® documents, wich is actually a zip archive with an other filename extension)

    • Packing/unpacking are now in the background.

     

  • UserActions improvements.

  • Media button.

  • Copy/Move: preserve all attributes (time, owner, group).

  • Dim the colors of the inactive panel.

  • Renaming a the filename without the extension, single instance mode, start to system tray, check them out in Konfigurator

  • Atomic extensions (NOT DOCUMENTED YET).

  • Context menu for bookmarks and enable/disable special bookmarks by right clicking on them.

  • Restyled MenuBar.

  • Terminal emulator improvements (NOT DOCUMENTED YET).

  • Synchronizer improvements (NOT DOCUMENTED YET).

  • Quick navigation improvements (NOT DOCUMENTED YET)

  • .

  • Many bugfixes.

  • TODO … NOT YET DESCRIBED IN THE HANDBOOK …

  • NOTE: NOT ALL NEW FEATURES ARE DESCRIBED YET IN THE HANDBOOK

  • THIS LIST IS INCOMPLTE … If someone likes to contribute to this handbook, please contact Frank. For more features, please read the ChangeLog and CVSNEWS.

 

Note

If you are using a development or CVS version, it is possible that the latest new features are not yet in the "The Krusader Handbook". Please read the ChangeLog file online or in the Krusader sources to find out more about the new features. For a brief description, please read the CVSNEWS file online or in the Krusader sources. User feedback and Bug reports are always welcome!

分类: 乱七八糟 标签:

拿到《UNIX环境高级编程》第2版

2006年11月13日 16hot 没有评论

周日晚上在 china-pub上订了《UNIX环境高级编程》这本书,另外还顺便订了《UNIX操作系统设计》这本书。

在今天拿到了,开始阅读《UNIX环境高级编程》。内容非常详尽,比之前看的那本《Linux高级编程》好太多了。

强烈推荐计划在Unix/Linux环境下开发的朋友阅读《UNIX环境高级编程》。

分类: 16hot 杂记 标签:

实现多进程扫描

2006年11月12日 16hot 没有评论

在昨天已经实现多进程扫描了,只是处理子进程信号等待的时候,出现占用大量CPU的情况。

使用了nice,情况比较好,不会影响到系统其他服务。但是仍然占用CPU 在80%以上,当然不能使用啦。

今天查找了很多资料,对信号处理作调整,并且调整扫描核心模块,得以解决问题。

现在扫描一次,并发扫描,1分钟左右就搞定了。哈哈

分类: 16hot 杂记 标签:

重写服务器监控扫描引擎

2006年11月10日 16hot 没有评论

回头看了下博客日志。之前用C写的扫描引擎,已经整整一年了。

这几天花了些时间,将扫描引擎重写了。计划还得实现多进程同步扫描,这样就可以应付大量的监控工作了。

当然,仍然是 C + XML + MySQL 。通过重写,学习到很多C相关的知识。Cool

分类: 16hot 杂记 标签:

升级博客系统

2006年11月4日 16hot 没有评论

昨天看到lifetype释出1.1.1版了,于是看看有什么新东西。

不看不知道,原来加了很多很使用的功能。 于是进行一次升级,另外增加了很多模板,很多非常好的。

目前运行在FreeBSD + Lighttpd + PHP + MySQL环境下。

主要是考察下Lighttpd是否真的适合我用。 虽然看到不少朋友都推荐用Lighttpd,但是经过一段时间的摸索后。觉得它在个人或者企业专用方面,性能及易用性都非常好。但是要提供虚拟主机服务,在安全设置方面,就不够灵活了。

因此,先局部使用。只有最适合的,才识最好的。

一篇FreeBSD下Lighttpd支持lifetype的文章: http://forum.lifetype.org.tw/index.php?topic=2220.0

分类: 16hot 杂记 标签:

升级bash到3.1版本

2006年11月2日 16hot 没有评论

之前一直使用bash-2.0.5版本,今天用portupgrade升级软件。干脆也升级下bash吧。旧版本,登录后提示: su-2.05b# 3.1版本,登录后提示: [root@localhost /root]# 至于3.1版本有些什么新功能,还没有来得及留意。呵呵

不过,对比下,内存消耗却不一样了。

[root@localhost /root]# ps u|grep bash
root 51901 0.0 0.2 2848 1632 p5 S 7:36AM 0:00.01 su (bash)#bash3.1
root 47934 0.0 0.2 2852 1572 p4 I 6:51AM 0:00.02 su (bash)#bash3.1
root 48815 0.0 0.0 1132 0 p3 IW – 0:00.00 su (bash))#bash205
root 17257 0.0 0.1 1136 600 p2 I+ Tue01PM 0:00.53 su (bash)#bash205
root 5933 0.0 0.0 1096 0 p1 IW – 0:00.00 su (bash)#bash205
root 99884 0.0 0.1 1176 592 p0 S+ Tue11AM 0:00.38 su (bash)#bash205
root 58466 0.0 0.2 2848 1632 p5 R+ 8:39AM 0:00.00 su (bash) #bash3.1

如果内存资源不多,并且没有必须bash3.1支持的情况,建议还是用bash2.0.5吧。

分类: BSD/linux, Shell 标签: ,

CVSUP 异常处理

2006年11月2日 16hot 没有评论

之前做过一次portupgrade,把cvsup也给升级了。然后每次cvsup 的时候,都出现如下提示:
su-2.05b# cvsup -L 2 -g /opt/etc/ports-supfile
Parsing supfile “/opt/etc/ports-supfile”
Connecting to cvsup3.cn.FreeBSD.org
Connected to cvsup3.cn.FreeBSD.org
Server software version: SNAP_16_1h
Negotiating file attribute support
Exchanging collection information
Establishing multiplexed-mode data connection
Running
Updating collection ports-all/cvs

***
*** runtime error:
*** Segmentation violation – possible attempt to dereference NIL
*** pc = 0x80e15f7
***

use option @M3stackdump to get a stack trace
Abort trap

这个现象,屡试不爽。超级郁闷……

google,baidu 了N次也没有找到相应的解决办法资料。

后来怀疑是不是升级了cvsup的原因呢?上网找来一个FreeBSD4.11原版的 package,安装好后,果然解决问题。

查看cvsup的版本:
su-2.05b# pkg_info |grep cvsup
cvsup-without-gui-16.1h_2 General network file distribution system optimized for CVS

删除新版的cvsup:
pkg_delete cvsup-without-gui-16.1h_2

安装原版package:

pkg_add ftp://ftp.tw.freebsd.org/pub/FreeBSD/releases/i386/4.11-RELEASE/4.11-RELEASE/packages/All/cvsup-without-gui-16.1h.tgz

安装后版本信息:
su-2.05b# pkg_info |grep cvsup
cvsup-without-gui-16.1h General network file distribution system optimized for CVS

安装后,重新cvsup,没有再出现异常情况。
su-2.05b# cvsup -L 2 -g /opt/etc/ports-supfile
Parsing supfile “/opt/etc/ports-supfile”
Connecting to cvsup3.cn.FreeBSD.org
Connected to cvsup3.cn.FreeBSD.org
Server software version: SNAP_16_1h
Negotiating file attribute support
Exchanging collection information
Establishing multiplexed-mode data connection
Running
Updating collection ports-all/cvs
Edit ports/lang/gforth/Makefile
Add delta 1.30 2006.11.01.22.07.36 stas
Checkout ports/x11-fm/entropyfm/files/patch-src_include_notification_engine.h
Shutting down connection to server
Finished successfully

分类: BSD/linux 标签: