跳至主要内容

博文

目前显示的是 四月, 2007的博文

我自己的make.conf

MASTER_SITE_OVERRIDE?=\ ftp://ftp.freebsdchina.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/\ http://ports.hshh.org/${DIST_SUBDIR}/\ ftp://ftp2.tsinghua.edu.cn/mirror/FreeBSD/distfiles/${DIST_SUBDIR}/\ ftp://ftp2.cn.freebsd.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/\ ftp://ftp.jp.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\ ftp://ftp3.jp.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\ SUP_UPDATE= yes SUP=/usr/local/bin/cvsup SUPFLAGS= -g -L 2SUPHOST= cvsup.freebsdchina.org PORTSUPFILE=/etc/ports-supfile WITH_CJK= yes KERNCONF=MYKERNEL  

使用 Grub 作为 FreeBSD 下的多系统启动管理器

为了保持桌面系统和服务器环境的统一,最近在想办法将自己的桌面系统从 Ubuntu 转移到 FreeBSD;当然,最主要还是想使用 FreeBSD 的 Ports 系统,Ubuntu 的软件更新比较迟缓。安装完 FreeBSD 基本系统,为了保留 LD 同志使用的 Win2K,需要安装一个多系统启动管理器,FreeBSD 的 Boot Manager 应该说是非常非常简陋的东西,太不友好;我在 Ubuntu 环境下使用的是 Grub,在 FreeBSD 下也有,同样可以非常方便的安装。 (注意:以下过程以 Win2K + FreeBSD 6.2p1 i386 环境下通过) 第一步,我们需要安装 Grub,可以通过 Ports 安装: [root@tianlap.dirk.sh:~]# cd /usr/ports/sysutils/grub [root@tianlap.dirk.sh:/usr/ports/sysutils/grub]# make install clean第二步,我们需要准备镜像文件和菜单文件: Grub 把镜像文件安装到了 /usr/local/share/grub/i386-freebsd 目录下,我们需要将相应的文件拷贝到 grub 的主目录,也就是 /boot/grub 目录。 [root@tianlap.dirk.sh:~]# mkdir -p /boot/grub [root@tianlap.dirk.sh:~]# cp -Rf /usr/local/share/grub/i386-freebsd /boot/grub/编辑一个 Grub 菜单文件 menu.lst,以我的环境为例: default 1 timeout 3 title Microsoft Windows 2000 Advanced Server root (hd0,0) makeactive chainloader +1 savedefault title FreeBSD 6.2 Release root (hd0,1,a) kernel /boot/loader makeactive savedefault注意:hd0 是在 /boot/grub/device.map 文件中列出的对应到真实硬盘的映射符号,我的真实硬盘是 /dev/ad0。 第三步,我们需要让 FreeB

wow on freebsd how to (from freebsdgirl.com)

Due to popular request, here's how I did it. These guidelines assume you've got an nvidia video card. If you don't... well, I can't help you. ;) FreeBSD tart.freebsdgirl.com 6.2-RELEASE-p2 FreeBSD 6.2-RELEASE-p2 #4: Sun Mar 11 03:36:58 PDT 2007 root@tart.freebsdgirl.com:/usr/obj/usr/src/sys/DESKTOP i386 esound 0.2.37_1 nvidia-driver 1.0.9746 wine-0.9.33,1 xorg-clients 6.9.0_3 xorg-libraries 6.9.0_1 xorg-server 6.9.0_6 Enable glx under the Module section of your xorg,conf, and run xdpyinfo from an xterm to verify your configuration. You should see both GLX and NV-GLX in the list of enabled extensions. After installing wine, run winecfg to bring up the graphical configuration editor. Click to see a screenshot of my Applications Tab, Audio Tab, and Graphics Tab. The audio tab won't display a checkbox for esound unless the daemon is running. It's not required that you use esound, but that was the method I decided on. Use what works for you. The only way I could inst

FreeBSD系统优化部分内核参数调整中文注释

资料整理:iceblood(刘宏光) 电子邮件:iceblood@163.com 日期:2005-01-26 Web:http://www.s8s8.net/ 很多人想优化自己的FreeBSD,特别是在网络性能以及内核调整上,因为这些是最直接的优化方式。在这里我收集整理并用中文注释了一下,相信很多人用得到。 #最大的待发送TCP数据缓冲区空间 net.inet.tcp.sendspace=65536 #最大的接受TCP缓冲区空间 net.inet.tcp.recvspace=65536 #最大的接受UDP缓冲区大小 net.inet.udp.sendspace=65535 #最大的发送UDP数据缓冲区大小 net.inet.udp.maxdgram=65535 #本地套接字连接的数据发送空间 net.local.stream.sendspace=65535 #加快网络性能的协议 net.inet.tcp.rfc1323=1 net.inet.tcp.rfc1644=1 net.inet.tcp.rfc3042=1 net.inet.tcp.rfc3390=1 #最大的套接字缓冲区 kern.ipc.maxsockbuf=2097152 #系统中允许的最多文件数量 kern.maxfiles=65536 #每个进程能够同时打开的最大文件数量 kern.maxfilesperproc=32768 #当一台计算机发起TCP连接请求时,系统会回应ACK应答数据包。 #该选项设置是否延迟ACK应答数据包,把它和包含数据的数据包一起发送, #在高速网络和低负载的情况下会略微提高性能,但在网络连接较差的时候, #对方计算机得不到应答会持续发起连接请求,反而会降低性能。 net.inet.tcp.delayed_ack=0 #屏蔽ICMP重定向功能 net.inet.icmp.drop_redirect=1 net.inet.icmp.log_redirect=1 net.inet.ip.redirect=0 net.inet6.ip6.redirect=0 #防止ICMP广播风暴 net.inet.icmp.bmcastecho=0 net.inet.icmp.maskrepl=0 #限制系统发送ICMP速率 net.inet.icmp.icmplim=100 #安全参数,编译内

一句话Shell(持续更新/-\|/)

1 我想复制一些用find命令找出来的文件(n多),请各位指点一下怎么写 1) cp $(find soure-path -name "filename" -print) destination 2) find . -type f -name "*abc*" -exec cp {} /other/dir \ 2 譬如在当前目录下有a、b、c、d四个子目录,且 a目录下有testa.txt, b目录下有testb.txt, c目录下有testc.txt, d目录下有testd.txt, 我想直接在当前目录下查找四个子目录下的文件里是否 有 字符串aaa的记录行(我不想单独去一个个子目录下的文件里去查找),如果有显示该行记录来,并显示出该记录在那个目录下的那个文件里,如何用程序实现呢? find . -name "*"|xargs grep "aaa" 3文件 file aaa bbb ddd sss www 如果超过5行(包括空行),则把文件清空 ,shell可以实现么? 1) awk 'END{if(NR>5) print ">"FILENAME}' ufile|sh 2) )[ "`wc -l < 你的文件`" -gt 5 ] && > 你的文件