
62.安装X Server xorg-6.9.0
1.cp freebsddisk1 disk2 PKG to /data/pkg61
2.cd /data/pkg61
3.pkg_add xorg-6.9.0.tbz
4.rehash
5.X[Xorg] -configure (生成/root/xorg.conf.new)
6.X[Xorg] -config /root/xorg.conf.new (测试xorg.conf.new配置是否正确)
7.cp /root/xorg.conf.new /etc/x11/xorg.conf
63.安装桌面环境gnome2 and xfce4 and kde3.5.1
gnome2-2.12.3
1.cd /data/pkg61
2.pkg_add gnome2-2.12.3.tbz
3.rehash
4.vi /root/.xinitrc 加入 exec gnome-session
#gnome2提示vi /etc/sysctl.conf,加入
kern.ipc.shmmax=67108864
kern.ipc.shmall=32768
kern.maxfiles=25000
xfce4
1.cd /usr/ports/x11-wm/xfce4
2.make install clean
3.rehash
4.vi /root/.xinitrc 加入 exec xfce4-session
kde-3.5.1
1.cd /data/pkg61
2.pkg_add kde-3.5.1.tbz
3.rehash
4.cd /usr/ports/chineses/kde3-i18n-zh_CN
5.make install clean (kde3汉化)
6.vi /root/.xinitrc 加入 exec startkde
pkg_add -r kde
pkg_add -r zh_CN-kde-i18n
pkg_add -r zh_CN-koffice-i18n
###more /root/.xinitrc
exec fcitx&
exec gnome-session
#exec xfce4-session
#exec startkde
#exec /usr/X11R6/bin/gnome-session
#exec /usr/local/bin/xfce4-session
#exec /usr/local/bin/startkde
64.在Xwindow中使用TrueType字体(simsun宋体,msyh雅黑,tahoma)
1.cp simsun.ttc /usr/X11R6/lib/X11/fonts/TTF/simsun.ttf
2.cp msyh.ttf tahoma.ttf /usr/X11R6/lib/X11/fonts/TTF/
3.cd /usr/X11R6/lib/X11/fonts/TTF
#下面4,5步骤更新字体信息,6重建字体缓存.
4.mkfontscale (生成fonts.scale)否则xorg报错如下:
Could not init font path element/usr/X11R6/lib/X11/fonts/TTF/,removing from list!
5.mkfontdir (生成fonts.dir)否则xorg报错如下:
(WW) `fonts.dir' not found (or not valid) in "/usr/X11R6/lib/X11/fonts/TTF/".
Entry deleted from font path.
(Run 'mkfontdir' on "/usr/X11R6/lib/X11/fonts/TTF/".
6.fc-cache -f -v (生成fonts.cache-1)
7.vi /etc/X11/xorg.conf 确认8
8.Load "freetype" (启用支持TrueType字体)
#现在X应用程序已经忘记已安装的TrueType字体.
9.在gnome和这些X程序中把楷书设置为字体或雅黑.
65.xlsfonts显示功能中安装的行楷
66.FreeBSD中3D加速系统的启用
a.DRI。
这是实现3D功能最重要的部份。DRI是Direct Rendering Infrastructure,
可以简单的把它认知为X和算法间的插口.但它涵盖众多独立的系统,负责
从X到算法的各个环节,包括内核。它最主要的工作就是将Mesa或OpenGL的
函数读取转换为算法的指示,从而指挥设备进行渲染等工作。
b.测试你的四核是不是能实现3D功能,可以实行以上方法:
1.dmesg | grep agp,如果出现:
agp0: <VIA 82C691 (Apollo Pro) host to PCI bridge> mem
0xe0000000-0xe3ffffff at device 0.0 on pci0
的标识,那么你的四核就有可能实现3D功能.如果多少也没有的话,那么

恭喜你,你再也不用为3D功能而费心了.
2.kldload drm,如果没报错的话,那么你的四核基本上就可以实现3D功能了。
c.3D功能的确认
运行:glxinfo。在第二行或第三行,如果出现”Direct Rendering: YES“字样,
那就证明已经启用3D加速了。
more /var/log/Xorg.0.log | grep "direct rendering"如果出现上面的标识,
(II) I810(0): direct rendering: Enabled那么你的3D就启用的。如果没有,
那么你要仔细读/var/log/Xorg.0.log。它会在某一行告诉你没启用的因素的。
d.nvidia四核驱动安装 cd /usr/ports/x11/nvidia-driver/
67.刷新率的难题freebsd 下载命令,
将xorg.conf里的Modes行改成:Modes "1024x768"(小写的X)
选择默认的分辩率和色深。 这是在 "Screen" 小节中定义的:
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1024x768"
EndSubSection
EndSection
68.make world
cvsup -g -L 2 -h cvsup.freebsdchina.org standard-supfile (升级代码树)
cp /usr/share/examples/etc/make.conf /etc/make.conf
vi /etc/make.conf,保留如下内容
CFLAGS= -O -pipe
COPTFLAGS= -O -pipe
cd /usr/src/sys/i386/conf (更改内核配置文档)
cp GENERIC TDS
vi TDS (按需要修改其内容)
shutdown now (重启到单用户模式)
adjkerntz -i (确定本地时间设置)
cd /usr/src
make -j4 buildworld (编译完全功能)
make buildkernel KERNCONF=TDS (编译新内核)
make installkernel KERNCONF=TDS (安装新内核)
reboot (重新启动)
shutdown now (重启到单用户模式)
cd /usr/src
mergemaster -p (更新/etc目录里的文档,-p预建模式)
make installworld (安装新的二进制)
mergemaster -Ui (更新makeinstallworld不更新的文档,-U進了6-STABLE了,這功能很讚,
就是他會看哪些/etc 的檔案,你沒有改過的,就會自動 merge,這樣子可以省下诸多時間跟力氣。
shutdown -r now (重新启动)
uname -a (查看功能资料)
cd /usr/src
make cleanworld (清除升级过程造成的临时文件)
#############################################
中断的 build 可以被恢复吗
cd /usr/src
make -DNOCLEAN all
这样就不会取消先前的 make buildworld 所做的工作。
##############################################
如果出现了错误我该这么办?
删除以往的功能更新树
cd /usr/obj
chflags -R noschg *
rm -rf *
cd /usr/src
make cleandir
make cleandir
不错,make cleandir 真的要执行两次。
然后重新开始整个过程,使用 make buildworld 开始。
mergemaster -p的说明
mergemaster -p的效果是构建一个临时的根环境,把新的顶配文件映射到这个环境当中,
然后和功能的顶配文件进行比较和处理,目的是确保系统配置文件的更新,这一点很重要!
在执行"mergemaster -p"的过程中,主要是进行以上处理:

检测功能是否存在临时的根环境,如果存在,让用户选择是借助现有的不过删除它,然后新建!
*** The directory specified for the temporary root environment,
/var/tmp/temproot, exists. This can be a security risk if untrusted
users have access to the system.
Use 'd' to delete the old /var/tmp/temproot and continue 删除旧的/var/tmp/temproot
Use 't' to select a new temporary root directory 为temproot选择新的目录
Use 'e' to exit mergemaster 退出mergemaster
Default is to use /var/tmp/temproot as is
How should I deal with this? [Use the existing /var/tmp/temproot]
一般的处理是选 "d" ,删除原有的目录,系统直到再次构建这个临时的根环境。
只要进行的不是大跨度的 FreeBSD 版本升级,可以简单地跳过这一步.
mergemaster的说明
重新编译整个功能不会使用新的或改过的顶配文件更新那些目录(尤其像 /etc,/var和/usr)
更新它们文件最简单的手段就是使用 mergemaster,手工去做应该可以的,只要您愿意。
不管您选择哪一种,一定忘记备份/etc 以防出错。
mergemaster操作中可能会遇到以上操作提示:
Use 'd' to delete the temporary 删除文档,不更新相应的功能配置文档
Use 'i' to install the temporary 安装文档,使用新的顶配文件覆盖旧文档
Use 'm' to merge the temporary and installed versions 对旧的顶配文件进行合并处理,并安装
Use 'v' to view the diff results again 察看新文档与旧文档的区别
###跟踪多台机械,以A.B2个机械为例。A要启动nfs_server,B要启动nfs_client
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/ruanjian/article-119564-1.html
这样吧
小王子~
让这帮家伙丢丢丑
麦地路