freebsd 6.2 安装配置笔记( 二 )


下面这两条不加 apache2有点问题
options ACCEPT_FILTER_DATA
options ACCEPT_FILTER_HTTP
# PCI Ethernet NICs. #将这一部分的其它网卡型号注释掉,仅保留当前网卡驱动即可
device miibus # MII bus support 保留
/usr/sbin/config GENERIC #产生内核源代码
cd ../compile/GENERIC
make depend && make && make install
或#make buildkernel KERNCONF=NEWKER
#make installkernel KERNCONF=NEWKER
配置防火墙
/etc/rc.conf
加入以下内容
firewall_enable="YES"
firewall_script="/etc/rc.firewall"
firewall_type="/etc/ipfw.rules" 这是防火墙自定义脚本
firewall_quIEt="NO"
firewall_logging_enable="YES"
log_in_vain="NO"
tcp_drop_synfin="NO"
tcp_restrict_rst="YES"
icmp_drop_redirect="YES"
保存退出
vi /etc/ipfw.rules
大家注意 -q 前面要加一个空格
-q -f flush
-q add 00301 allow all from any to any via lo0
-q add 00302 check-state
-q add 00303 allow tcp from any to 10.72.255.131 53 out via vr0 setup keep-state10.72.255.131 是DNS地址,大家根据本地的改下
-q add 00400 allow udp from any to 10.72.255.131 53 out via vr0 keep-state vr0 是我网卡的名称,大家根据己的改,以下都是一样
-q add 00500 allow tcp from any to any 80 in via vr0 setup keep-state
-q add 00900 allow tcp from any to any 25 out via vr0 setup keep-state
-q add 01200 allow tcp from any to any via vr0 setup keep-state uid root
-q add 01300 allow icmp from any to any in via vr0 keep-state
-q add 01400 allow tcp from any to any 21 in via vr0 setup keep-state
-q add 01500 allow tcp from any to me 21 in via vr0 setup limit src-addr 2
-q add 01600 allow tcp from any to any 22 in via vr0 setup keep-state
-q add 01800 allow tcp from any to me 22 in via vr0 setup limit src-addr 2
保存退出
中文字体
将xp上simsun.ttc tahoma.ttf拷至/usr/X11R6/lib/X11/fonts/TTF/,并改扩展名为ttf
fc-cache -fv
配置fcitx
cd /usr/ports/chinese/fcitx
make install clean
【freebsd 6.2 安装配置笔记】在~/.profile 文件中加以下三行 #因我用的是bash
export LANG="zh_CN.eucCN"
export LC_CTYPE="zh_CN.eucCN"
export XMODIFIERS=’@im=fcitx’
vim配置
cd /usr/ports/editors/vim && make install clean #安装vim
cp /usr/local/share/vim/vim70/vimrc_example.vim ~/.vimrc
编辑.vimrc,注释掉" set nocompatible行
安装ntfs写支持
安装 Kernel source
手工下载软件包
http://ftp.lv.FreeBSD.org/pub/FreeBSD/ports/packages/Latest/fusefs-ntfs.tbz
pkg_add path/fusefs-ntfs.tbz
JAVA环境安装
1.open http://www.sun.com/software/java2/download.HTML, download the SCSL Source file,jdk-1_5_0-src-scsl.zip and the SCSL Binaries file, jdk-1_5_0-bin-scsl.zip .
2.In addition, please download the patchset, bsd-jdk15-patches-3.tar.bz2, from http://www.eyesbeyond.com/freebsddom/java/jdk15.html.
3.manually fetch the J2SE SDK self-extracting file for the Linux platform (j2sdk-1_4_2_12-linux-i586.bin) from http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&PartDetailId=j2sdk-1.4.2_12-oth-JPR&SiteId=JSC&TransactionId=noreg
4.Please place the downloaded file(s) in /usr/ports/distfiles
pkg_add -rK m4
pkg_add -rK zip
vsftpd配置
编辑 /usr/local/etc/vsftpd.conf加入三行
listen=YES
ftp_username=ftp
local_enable=YES
anon_upload_enable=YES
anon_mkdir_write_enable=YES
write_enable=YES
linux下fdisk工具
pkg_add -rK linuxfdisk
===其它===
挂设备
mount_cd9660 -C gbk /dev/acd0 /mnt/cdrom #加-C eucCN为了显示中文文件名
mount_msDosfs #fat
mount_ntfs #ntfs
如何以关键字搜寻 ports
cd /usr/ports/
make search key=ldap

推荐阅读