欢迎大家赞助一杯啤酒🍺 我们准备了下酒菜:Formal mathematics/Isabelle/ML, Formal verification/Coq/ACL2, C++/F#/Lisp
FreeBSD
FreeBSD 是一种先进的操作系统, 它支持 X86 兼容(包括 Pentium® 和 Athlon™)、amd64 兼容(包括 Opteron™、Athlon™64 和 EM64T)、ARM、IA-64、PC-98以及UltraSPARC® 架构的计算机. FreeBSD 源于 BSD─美国加州大学伯克利分校开发 UNIX® 版本. 它由来自世界各地的志愿者开发和维护. FreeBSD 为不同架构的计算机系统提供了不同程度的支持.
目录 |
FreeBSD 8
FreeBSD 7
FreeBSD 6
Quick Start
/usr/sbin/sysinstall
install rsync
fetch ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.1-release/Latest/rsync.tbz #pkg_add rsync.tbz #pkg_add -r rsync #pkg_info rsync-2.6.6 #pkg_delete rsync-2.6.6 or cd /usr/ports/net/rsync #make #make install
Network Interface
- dc0: The first Ethernet interface
- dc1: The second Ethernet interface
- lp0: The parallel port interface
- lo0: The loopback device
- tun0: The tunnel device used by ppp
# ifconfig le0 inet 192.168.1.101 netmask 255.255.255.0 # route add default 192.168.1.1
SSH
etc/rc.conf sshd_enable="YES" /etc/rc.d/sshd start /etc/ssh/sshd_config /etc/rc.d/sshd reload
清理系统垃圾
# cd /usr/src && make clean && make delete-old
Command
- kldload - 加载新内核模块
- kldunload - 卸载内核模块
- kldstat - 列举当前加载的模块
Firewall
FreeBSD 的基本系统内建了三种不同的防火墙软件包: 它们是 IPFILTER (也被称作 IPF)、IPFIREWALL (也被称作 IPFW)以及 OpenBSD 的 PacketFilter (也被称为 PF).
FreeBSD 也提供了两个内建的、用于流量整形 (基本上是控制带宽占用) 的软件包:altq和dummynet. Dummynet 在过去一直和 IPFW 紧密集成,而 ALTQ 则需要配合 IPF/PF 使用。IPF、IPFW,以及 PF 都是用规则来控制是否允许数据包出入您的系统,虽然它们采取了不同的实现方法和规则语法。
更多细节: FreeBSD防火墙
IP Firewall
Step1:准备工作
#cd /sys/i386/conf #cp GENERIC ./kernel_IPFW
Step2:内核规则
vim kernel_IPFW 在该文件的末尾加入以下四行内容: options IPFIREWALL options IPFIREWALL_VERBOSE options IPFIREWALL_VERBOSE_LIMIT=10 options IPFIREWALL_DEFAULT_TO_ACCEPT
Step3:编译系统内核
#/usr/sbin/config kernel_IPFW #cd ../compile/kernel_IPFW #make #make install
Step4:加载启动项
编辑/etc/rc.conf, 加入 firewall_enable=`YES` firewall_script=`/etc/rc.firewall` firewall_type=`/etc/ipfw.conf` firewall_quiet=`NO` firewall_logging_enable=`YES` 编辑/etc/syslog.conf文件, 加入 !ipfw*.* /var/log/ipfw.log
以上步骤完成后重启电脑
#ipfw show #ipfw add 10001 deny all from 218.249.20.135 to any 或保存再/etc/rc.firewall文件里 sh /etc/rc.firewall
参考: 小规模DDoS(拒绝服务)用Freebsd+IPFW搞定 http://bbs.51cto.com/archiver/tid-5376.html
OpenBSD Packet Filter
IP Filter
http://coombs.anu.edu.au/~avalon/ip-filter.html
sftp-server
/usr/libexec/sftp-server
Java
cd /usr/ports/java/jdk15
make install clean
or get Java JDK and JRE 6.0 binaries for FreeBSD 6.x and FreeBSD 7.x on the i386 and amd64 architectures from
http://www.freebsdfoundation.org/downloads/java.shtml vi .cshrc JAVA_HOME=/usr/local/diablo-jdk1.6.0 ANT_HOME=/usr/local/apache-ant-1.7.1 PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH export JAVA_HOME ANT_HOME PATH
GlassFish
./asadmin start-domain domain1 /libexec/ld-elf.so.1: /usr/local/diablo-jdk1.6.0/jre/lib/i386/libnet.so: Undefined symbol "gethostbyname_r"
BSD发行版
- FreeBSD : The Power To Server http://www.freebsd.org
- OpenBSD : Free, Functional & Secure http://www.openbsd.org
- NetBSD : Of course it runs NetBSD http://www.netbsd.org
- OpenDarwin : the core of Mac OS X http://www.opendarwin.org
- DragonFly BSD http://www.dragonflybsd.org/
- TrustedBSD http://www.ccc-air.com/
- PC-BSD - Personal Computing, served up BSD Style! http://www.pcbsd.org/
- FreeSBIE - a LiveCD based on the FreeBSD http://www.freesbie.org/
- BSD Installer: http://www.chinashibang.cn/
- RelaxBSD: http://www.relaxbsd.org/
- miniBSD: the mini FreeBSD system
- NanoBSD
安装指南
Storage
- ZFS on FreeBSD
- http://www.stacken.kth.se/projekt/arla/
- http://www.freebsd.org/projects/bigdisk/index.html
- http://www.coda.cs.cmu.edu/
- http://www.ece.cmu.edu/~ganger/papers/
- http://www.tcfs.unisa.it/
- http://now.cs.berkeley.edu/Td/
- http://www.vinumvm.org/
- http://www.tamacom.com/pathconvert/
Code
Developer
- http://wolfram.schneider.org/
- delphij's Chaos FreeBSD Evangelist
相关链接
- FreeBSD Website
- FreeBSD Wikipedia
- FreeBSD Wiki
- FreeBSD中文论坛
- http://docs.huihoo.com/freebsd/
- http://download.huihoo.com/freebsd/
- China FreeBSD User Group
- ftp://ftp.cn.freebsd.org/pub/FreeBSD/releases/i386/
- FreeBSD Ports Monitoring System
- FreeBSD Package building logs and errors
<discussion>characters_max=300</discussion>