欢迎大家赞助一杯啤酒🍺 我们准备了下酒菜:Formal mathematics/Isabelle/ML, Formal verification/Coq/ACL2, C++/F#/Lisp
FreeBSD
小 |
|||
(未显示3个用户的99个中间版本) | |||
第1行: | 第1行: | ||
− | [[Image:Freebsd.png|right]] | + | [[Image:Freebsd-90x90.png|right]] |
+ | |||
+ | {{SeeWikipedia}} | ||
+ | |||
+ | FreeBSD | ||
+ | |||
+ | ==简介== | ||
+ | FreeBSD 是一种先进的操作系统, 它支持 X86 兼容(包括 Pentium 和 Athlon)、amd64 兼容(包括 Opteron、Athlon64 和 EM64T)、ARM、IA-64、PC-98以及UltraSPARC 架构的计算机. FreeBSD 源于 BSD─美国加州大学伯克利分校开发 UNIX 版本. 它由来自世界各地的志愿者开发和维护. FreeBSD 为不同架构的计算机系统提供了不同程度的支持. | ||
+ | |||
+ | *[http://docs.huihoo.com/freebsd/en-us-20110215/articles/linux-comparison/index.html FreeBSD: An Open Source Alternative to Linux] 选择FreeBSD多是源于一种信仰 :) | ||
+ | *[https://it-notes.dragas.net/2022/01/24/why-were-migrating-many-of-our-servers-from-linux-to-freebsd/ Why we're migrating (many of) our servers from Linux to FreeBSD] | ||
+ | |||
+ | ==新闻== | ||
+ | <rss>http://www.freebsd.org/news/rss.xml|short|date|max=5</rss> | ||
+ | <rss>http://www.freebsd.org/news/press-rss.xml|short|date|max=5</rss> | ||
+ | |||
+ | ==版本== | ||
+ | ===FreeBSD 12=== | ||
+ | |||
+ | ===FreeBSD 11=== | ||
+ | [https://www.freebsd.org/releases/11.1R/announce.html FreeBSD 11.1-RELEASE Announcement] | ||
+ | |||
+ | ===FreeBSD 10=== | ||
+ | [[Image:VoluptiS-680x100.jpg|万有引力无法对坠入爱河的人负责。——爱因斯坦]] | ||
+ | |||
+ | [http://www.freebsd.org/releases/10.2R/announce.html FreeBSD 10.2-RELEASE Announcement] | ||
+ | |||
+ | ===FreeBSD 9=== | ||
+ | *[http://www.freebsd.org/releases/9.1R/announce.html FreeBSD 9.1-RELEASE Announcement] | ||
+ | |||
+ | ===FreeBSD 8=== | ||
+ | *[http://www.freebsd.org/releases/8.3R/announce.html FreeBSD 8.3-RELEASE Announcement] | ||
+ | *[http://www.freebsd.org/releases/8.2R/announce.html FreeBSD 8.2-RELEASE Announcement] | ||
+ | 升级: | ||
+ | # freebsd-update fetch | ||
+ | # freebsd-update -r 8.2-RELEASE upgrade // 从 8.0->8.2, Fetching 9328 patches, Fetching 7740 files ... | ||
+ | # freebsd-update install | ||
+ | # reboot | ||
+ | # freebsd-update install | ||
+ | |||
+ | ===FreeBSD 7=== | ||
+ | *[http://www.freebsd.org/releases/7.4R/announce.html FreeBSD 7.4-RELEASE Announcement] | ||
+ | |||
+ | ==发行版== | ||
+ | 基于 FreeBSD 的操作系统发行版: | ||
+ | *[[FreeNAS]] 存储系统 | ||
+ | *[[PC-BSD]] 图形桌面 | ||
+ | *[[pfSense]] 防火墙、路由器 | ||
+ | |||
+ | 其它发行版 | ||
+ | *[[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/ | ||
+ | *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]] | ||
+ | *[http://www.phoronix.com/scan.php?page=news_item&px=MTM5NDI Sony's PlayStation 4 Is Running Modified FreeBSD 9,PlayStation 4 is Orbis OS] | ||
+ | |||
+ | ==指南== | ||
+ | * [[Huihoo FreeBSD Applications]] | ||
+ | * [[winxp,solaris10,linux,freebsd install in a system]] | ||
+ | * [[FreeBSD on IBM X31]] | ||
+ | * [[FreeBSD 7-STABLE amd64 job record|FreeBSD 7-STABLE amd64 工作记录]] | ||
+ | |||
+ | 安装 ports 获得 ftp://ftp.freebsd.org/pub/FreeBSD/ports/ports/ports.tar.gz 并解压到 /usr/ports | ||
+ | whereis php5 或在/usr/ports下 make search name="php" 若不成功,请运行make fetchindex | ||
+ | cd /usr/ports/lang/php5 然后 make; make install | ||
+ | make build-depends-list 查看依赖 | ||
+ | 若 make posts 的方法不好使,可下载 ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/ 相关包直接安装。我就是通过这种方式解决make html2man 出错的问题:"Makefile", line 16: Need an operator | ||
+ | Error expanding embedded variable. | ||
+ | |||
+ | 或 # portsnap fetch & portsnap extract | ||
− | |||
− | |||
install rsync | install rsync | ||
fetch ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.1-release/Latest/rsync.tbz | fetch ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.1-release/Latest/rsync.tbz | ||
第13行: | 第86行: | ||
#make | #make | ||
#make install | #make install | ||
+ | or ftp -a ftp2.FreeBSD.org | ||
+ | ftp> cd /pub/FreeBSD/ports/packages/editors/ | ||
+ | get vim-7.3.81.tbz | ||
+ | # pkg_add vim-7.3.81.tbz | ||
+ | |||
[[Image:freebsd-server.png|right]] | [[Image:freebsd-server.png|right]] | ||
Network Interface | Network Interface | ||
− | * dc0: | + | * dc0: 第一个以太网接口 |
− | * dc1: | + | * dc1: 第二个以太网接口 |
− | * lp0: | + | * lp0: 并行端口网络接口 |
− | * lo0: | + | * lo0: 回环设备 |
− | * tun0: | + | * tun0: ppp使用的隧道设备 |
− | + | /etc/rc.conf | |
− | + | ifconfig_le0="inet 192.168.1.210 netmask 255.255.255.0" | |
− | + | defaultrouter="192.168.1.1" | |
− | + | sshd_enable="YES" | |
− | + | /etc/resolv.conf | |
− | + | nameserver 8.8.8.8 | |
− | + | nameserver 8.8.4.4 | |
− | + | 清理系统垃圾 | |
− | + | # cd /usr/src && make clean && make delete-old | |
− | + | Command | |
− | + | *kldload - 加载新内核模块 | |
− | * | + | *kldunload - 卸载内核模块 |
− | * | + | *kldstat - 列举当前加载的模块 |
− | * | + | |
− | == | + | su:sorry的解决办法,可以使用如下命令给普通用户su - root的权力: |
− | * [[ | + | *pw groupmod wheel -m <username> |
− | * [[ | + | *pw user mod <username> -g wheel |
+ | *或者直接修改/etc/group文件,把相应的用户加到wheell组就可以 wheel:*:0:root,username | ||
+ | |||
+ | ==包管理== | ||
+ | [https://github.com/freebsd/pkg pkg]: FreeBSD新一代包管理工具,[http://pkg.freebsd.org FreeBSD.org pkg mirror] | ||
+ | # pkg install autoconf automake libtool pkgconf | ||
+ | # pkg install python | ||
+ | # pkg install erlang | ||
+ | |||
+ | ==防火墙== | ||
+ | FreeBSD 的基本系统内建了三种不同的防火墙软件包: 它们是 IPFILTER (也被称作 IPF)、IPFIREWALL (也被称作 IPFW)以及 OpenBSD 的 PacketFilter (也被称为 PF). | ||
+ | |||
+ | FreeBSD 也提供了两个内建的、用于流量整形 (基本上是控制带宽占用) 的软件包:altq和dummynet. Dummynet 在过去一直和 IPFW 紧密集成,而 ALTQ 则需要配合 IPF/PF 使用。IPF、IPFW,以及 PF 都是用规则来控制是否允许数据包出入您的系统,虽然它们采取了不同的实现方法和规则语法。 | ||
+ | |||
+ | 更多细节: [http://docs.huihoo.com/freebsd/zh_cn/2006/handbook/firewalls.html FreeBSD防火墙] | ||
+ | |||
+ | ===IP防火墙=== | ||
+ | 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=== | ||
+ | PF: [http://www.openbsd.org/faq/pf/ The 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" | ||
+ | |||
+ | ==Storage== | ||
+ | *[[ZFS on FreeBSD]] | ||
+ | *[http://docs.huihoo.com/bsdcan/2014/Migrating-from-Linux-to-FreeBSD-as-a-backend-data-store.pdf Migrating from Linux to FreeBSD as a backend data store] | ||
+ | *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/ | ||
+ | |||
+ | ==Cloud== | ||
+ | *[[FreeBSD on EC2]] | ||
+ | *[http://docs.huihoo.com/bsdcan/2012/FreeBSD-on-Hyper-V.pdf FreeBSD on Hyper-V] | ||
+ | |||
+ | ==Code== | ||
+ | *http://www.freebsd.org/cgi/cvsweb.cgi/src/ | ||
+ | *ftp://ftp.freebsd.org/pub/FreeBSD/development/CTM/ | ||
+ | |||
+ | ==Developer== | ||
+ | *http://wolfram.schneider.org/ | ||
+ | *[https://blog.delphij.net/ delphij's Chaos] FreeBSD Evangelist | ||
+ | |||
+ | ==文档== | ||
+ | [https://papers.freebsd.org/ FreeBSD Presentations and Papers] | ||
+ | *[http://docs.huihoo.com/bsdcan/2006/Mobile-IPv6-in-FreeBSD.pdf Mobile IPv6 in FreeBSD] | ||
+ | *[https://papers.freebsd.org/2019/fosdem/bennett-riscv_llvm/ Embedded FreeBSD on a five-core RISC-V processor using LLVM] | ||
+ | |||
+ | ==图集== | ||
+ | <gallery widths=100px heights=100px perrow=6> | ||
+ | Image:freebsd-based-hosting.jpg|FreeBSD主机 | ||
+ | Image:freebsd-disk-4g.jpg|4G硬盘分配 | ||
+ | Image:linux-bsd.jpg|Linux & BSD | ||
+ | </gallery> | ||
− | == | + | ==链接== |
− | *http://www. | + | *[http://www.freebsd.org FreeBSD Website] |
− | * | + | *[http://en.wikipedia.org/wiki/FreeBSD FreeBSD Wikipedia] |
− | *China FreeBSD User Group http:// | + | *[http://wiki.freebsd.org FreeBSD Wiki] |
+ | *[http://www.freebsdchina.org FreeBSD中文论坛] | ||
+ | *[http://docs.huihoo.com/freebsd/ FreeBSD文档] | ||
+ | *[http://download.huihoo.com/freebsd/ FreeBSD下载] | ||
+ | *[http://www.cnfug.org/ China FreeBSD User Group] | ||
+ | *ftp://ftp.cn.freebsd.org/pub/FreeBSD/releases/i386/ | ||
+ | *[http://portsmon.freebsd.org/ FreeBSD Ports Monitoring System] | ||
+ | *[http://pointyhat.freebsd.org FreeBSD Package building logs and errors] | ||
+ | *[http://lists.freebsd.org/pipermail/freebsd-virtualization/ The freebsd-virtualization Archives] | ||
− | + | [[category:operating system]] | |
− | + | [[category:BSD]] | |
+ | [[category:firewall]] |
2022年1月25日 (二) 06:23的最后版本
您可以在Wikipedia上了解到此条目的英文信息 FreeBSD Thanks, Wikipedia. |
FreeBSD
目录 |
[编辑] 简介
FreeBSD 是一种先进的操作系统, 它支持 X86 兼容(包括 Pentium 和 Athlon)、amd64 兼容(包括 Opteron、Athlon64 和 EM64T)、ARM、IA-64、PC-98以及UltraSPARC 架构的计算机. FreeBSD 源于 BSD─美国加州大学伯克利分校开发 UNIX 版本. 它由来自世界各地的志愿者开发和维护. FreeBSD 为不同架构的计算机系统提供了不同程度的支持.
- FreeBSD: An Open Source Alternative to Linux 选择FreeBSD多是源于一种信仰 :)
- Why we're migrating (many of) our servers from Linux to FreeBSD
[编辑] 新闻
自http://www.freebsd.org/news/rss.xml加载RSS失败或RSS源被墙 自http://www.freebsd.org/news/press-rss.xml加载RSS失败或RSS源被墙
[编辑] 版本
[编辑] FreeBSD 12
[编辑] FreeBSD 11
FreeBSD 11.1-RELEASE Announcement
[编辑] FreeBSD 10
FreeBSD 10.2-RELEASE Announcement
[编辑] FreeBSD 9
[编辑] FreeBSD 8
升级:
# freebsd-update fetch # freebsd-update -r 8.2-RELEASE upgrade // 从 8.0->8.2, Fetching 9328 patches, Fetching 7740 files ... # freebsd-update install # reboot # freebsd-update install
[编辑] FreeBSD 7
[编辑] 发行版
基于 FreeBSD 的操作系统发行版:
其它发行版
- 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/
- 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
- Sony's PlayStation 4 Is Running Modified FreeBSD 9,PlayStation 4 is Orbis OS
[编辑] 指南
- Huihoo FreeBSD Applications
- winxp,solaris10,linux,freebsd install in a system
- FreeBSD on IBM X31
- FreeBSD 7-STABLE amd64 工作记录
安装 ports 获得 ftp://ftp.freebsd.org/pub/FreeBSD/ports/ports/ports.tar.gz 并解压到 /usr/ports
whereis php5 或在/usr/ports下 make search name="php" 若不成功,请运行make fetchindex cd /usr/ports/lang/php5 然后 make; make install make build-depends-list 查看依赖
若 make posts 的方法不好使,可下载 ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/ 相关包直接安装。我就是通过这种方式解决make html2man 出错的问题:"Makefile", line 16: Need an operator Error expanding embedded variable.
或 # portsnap fetch & portsnap extract
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
or ftp -a ftp2.FreeBSD.org
ftp> cd /pub/FreeBSD/ports/packages/editors/ get vim-7.3.81.tbz # pkg_add vim-7.3.81.tbz
Network Interface
- dc0: 第一个以太网接口
- dc1: 第二个以太网接口
- lp0: 并行端口网络接口
- lo0: 回环设备
- tun0: ppp使用的隧道设备
/etc/rc.conf
ifconfig_le0="inet 192.168.1.210 netmask 255.255.255.0" defaultrouter="192.168.1.1" sshd_enable="YES"
/etc/resolv.conf
nameserver 8.8.8.8 nameserver 8.8.4.4
清理系统垃圾
# cd /usr/src && make clean && make delete-old
Command
- kldload - 加载新内核模块
- kldunload - 卸载内核模块
- kldstat - 列举当前加载的模块
su:sorry的解决办法,可以使用如下命令给普通用户su - root的权力:
- pw groupmod wheel -m <username>
- pw user mod <username> -g wheel
- 或者直接修改/etc/group文件,把相应的用户加到wheell组就可以 wheel:*:0:root,username
[编辑] 包管理
pkg: FreeBSD新一代包管理工具,FreeBSD.org pkg mirror
# pkg install autoconf automake libtool pkgconf # pkg install python # pkg install erlang
[编辑] 防火墙
FreeBSD 的基本系统内建了三种不同的防火墙软件包: 它们是 IPFILTER (也被称作 IPF)、IPFIREWALL (也被称作 IPFW)以及 OpenBSD 的 PacketFilter (也被称为 PF).
FreeBSD 也提供了两个内建的、用于流量整形 (基本上是控制带宽占用) 的软件包:altq和dummynet. Dummynet 在过去一直和 IPFW 紧密集成,而 ALTQ 则需要配合 IPF/PF 使用。IPF、IPFW,以及 PF 都是用规则来控制是否允许数据包出入您的系统,虽然它们采取了不同的实现方法和规则语法。
更多细节: FreeBSD防火墙
[编辑] IP防火墙
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"
[编辑] Storage
- ZFS on FreeBSD
- Migrating from Linux to FreeBSD as a backend data store
- 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/
[编辑] Cloud
[编辑] Code
[编辑] Developer
- http://wolfram.schneider.org/
- delphij's Chaos FreeBSD Evangelist
[编辑] 文档
FreeBSD Presentations and Papers