FreeBSD系统下创建DVD.iso安装光盘
准备刻一张FreeBSD-7.0-RELEASE的DVD,网上很多介绍都是在Windows下使用什么iso提取工具的,貌似很麻烦。参考了一些FreeBSD高手的实现,我写了一个简单的脚本,主要功能是从3张disc*.iso创建出一个dvd.iso
1,准备工作:
工作目录 work/ 和 3张disc*.iso, 比如
work/7.0-RELEASE-i386-disc1.iso
work/7.0-RELEASE-i386-dis ...
FreeBSD更新 Port Tree
为了使我们安装的软件是最新的版本,我们有必要定期更新Port Tree,所谓的更新port就是更新patches 。
1,CVSup/csup注意: csup 是用 C 语言对 CVSup 软件的重写, 在 FreeBSD 6.2 和更高版本中,作为系统的一部分提供。在首次运行 CVSup 之前, 务必确认 /usr/ports 是空的! 如果您之前已经用其他地方安装了一份 Ports 套 ...
FREEBSD服务器端的ARP绑定脚本
#!/bin/sh
_PATH="/home/shwb"
if [ -s $_PATH/md5 ] && [ -s $_PATH/arp.txt ] ; then
new=`md5 $_PATH/arp.txt | cut -d ' ' -f 4`
old=`cat $_PATH/md5`
if [ "$new" != "$old" ] ; ...
freebsd系统下安装mpd
1、安装mpd(都说mpd对windows支持最好),很简单
cd /usr/local/ports/net/mpd/
make all install clean
2、配置/usr/local/etc/mpd/mpd.conf
default:
load vpn
vpn:
load client1
#load client2
client1:
new -i ng0 pptp1 pptp1
set ipcp ranges x.x.x.x/32 y.y.y.y1/32
load pptp_def
client2:
new -i ng1 pptp2 pptp2
...
FreeBSD学习笔记
1、进入单用户模式
BOOT: /kernel -s
就进了单用户了, 然后/sbin/mount -rw /把/设置成可写
然后 vipw把root口令置空
2、开机自动fsck硬盘
fsck_y_enable="YES"
3、FreeBSD弹出光驱
cdcontol->Eject
4、OpenBSD弹出光驱
eject /dev/rcd0c
5、BSD下增加帐号
pw useradd hanyang -g wheel -s /usr/local/bin/bash
6、观察网络 ...
FREEBSD系统优化精华
1、优化内核
mkdir /usr/kern
cp /usr/src/sys/i386/conf/GENERIC /usr/kern/proxy
ln -s /usr/kern/proxy /usr/src/sys/i386/conf/proxy
cd /sys/i386/conf
ee proxy
options IPFILTER #ipfilter support
options IPFILTER_LOG #ipfilter logging
options IPFILTER_DEFAULT_BLOCK #block all packets by default
op ...
FreeBSD su Sorry问题解决办法
FreeBSD系统下su:sorry的解决办法
在FreeBSD上要使用su命令成为root用户,不但要知道root的口令,还需要经过特别设置,否则就不能成功使用这个命令。这是因为FreeBSD对执行su命令的用户进行了更严格的限制,能使用su命令的用户必须属于wheel组(root的基本属组,组ID为0),否则就不能通过 ...
FreeBSD5.2.1上建立功能完整的邮件服务器(POSTFIX)
1.更新 ports
# cvsup -gL 2 -h cvsup.freebsdchina.org /usr/share/examples/cvsup/ports-supfile
2. 安装 openssl+apache 服务器
# cd /usr/ports/security/openssl
# make install
# make clean
# cd /usr/ports/www/apache2
# make install
# make clean
# vi /etc/rc.conf
apache2_enable="YES"
3. 安装 o ...
FreeBSD学习经验
1、进入单用户模式
BOOT: /kernel -s
就进了单用户了, 然后/sbin/mount -rw /把/设置成可写
然后 vipw把root口令置空
2、开机自动fsck硬盘
fsck_y_enable="YES"
3、FreeBSD弹出光驱
cdcontol->Eject
4、OpenBSD弹出光驱
eject /dev/rcd0c
5、BSD下增加帐号
pw useradd hanyang -g wheel -s /usr/local/bin/bash
6、观察网络 ...
freebsd6.2 nginx+php+mysql+zend系统优化防止ddos攻击
一、安装软件前的准备
系统的安装:freebsd6.2以上的光盘,最小化安装系统,同时安装好ports
二、手动安装nginx+php
1) 进入系统后,准备cvs更新:
1. cd /usr/ports/net/cvsup-without-gui
2. & ...
FreeBSD系统下读写 NTFS分区
1、安装ntfs-3g:
# cd /usr/ports/sysutils/fusefs-ntfs
# make install clean
2、加入fuse加载:
# ee /etc/rc.conf
加入以下这一行:
fusefs_enable="YES"
保存退出
# ee /boot/loader.conf
加入以下这一行:
fuse_load="YES"
保存退出。
注意:这两行一个是fusefs,一 ...
Freebsd7.0 Apache2.2+MySQL5+PHP5安装和配置方法
一、安装apache2.2.8
首先去http://www.apache.org 网站上下载apache2.2.8源码包
解压缩
#tar zxvf httpd-2.2.8.tar.gz
得到 httpd-2.2.8文件夹
#cd httpd-2.2.8
配置
#./configure --prefix=/usr/local/apache --enable-so --enable-module=rewrite
编译
#make
安装
#make ...
FreeBSD双线负载均衡NAT服务器配置方法
# vi /etc/rc.conf
================+==============+=================
defaultrouter="221.33.88.254"
ifconfig_fxp0="inet 192.168.0.1 netmask 255.255.255.0"
ifconfig_rl0="inet 221.33.88.2 netmask 255.255.255.0"
ifconfig_rl1="inet 202.0.57.1 netmask 255.255.255.0"
pf_enable="YES"
================+======= ...
FreeBSD 6.2用freebsd-update升级过程
FreeBSD 6.2-RELEASE下用freebsd-update升级过程:
mail#uname -a
FreeBSD mail.extmail.org 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Nov 2 13:04:30 UTC 2007 qiao@qiao.lpzq:/usr/src/sys/i386/compile/kernel_IPFW i386
mail#freebsd-update fetch install
Looking up update.FreeBSD.org mirror ...
FreeBSD系统SSH配置详解
修改freebsd可以用sshd权限用户登录ssh 但不能用root用户登录的方法
在/etc/ssh/sshd_config最后中加入
PermitRootLogin yes #允许root登录
PermitEmptyPasswords no #不允许空密码登录
PasswordAuthentication yes # 设置是否使用口令验证。
就可以了
FreeBSD SSH配置详解
首先vi编辑/etc/inetd.conf,去掉ssh前的#, ...
OPENBSD-3.8上快速安装和配置apache+mysql+php+ssl
本文旨在用OPENBSD自己提供的软件安装包来搭建服务器环境,当然你也可以下载原代码包编译安装,但这样就费时费力了。实际上OPENBSD给我们提供了大量的编译好的二进制安装包,利用这些二进制安装包我们可以快速部署我们需要的服务器环境,不仅省时还可以保障OPENBSD的安全性,还可以自动解决各个安装包之间的包依赖问题(用p ...
用OpenBSD 3.8 release自带的FTPD架设FTP服务器
使用OpenBSD 3.8 release自带的FTPD架设FTP服务器
Author: MichaelBibby
Date: 2005/11/20
可以任意转载,但请保留以上信息,谢谢。
注:本文参考OpenBSD 3.8的官方FAQ文档和ftpd的man文档写成,更全面的信息请参看这两个文件。
官方FAQ:http://www.openbsd.org/faq/faq10.html#AnonFTP
ftpd的 ...
让root用户telnet到FreeBSD的方法
1:如何开启telnet
ee /etc/inetd.conf
把
#telnet stream tcp nowait root /usr/libexec/telnetd telnetd
#telnet stream tcp6 nowait root &nb ...
FreeBSD局域网内升级Ports Tree及Port的安装
局域内的FreeBSD系统可以使用以下步骤更新你们的Ports Tree和安装Port以下步骤假设你在安装FreeBSD下已经安装了Ports1、修改/etc/make.conf,如果没有自己创建 MASTER_SITE_OVERRIDE= ...
FreeBSD 数据备份和迁移方法
相信一些朋友也曾经想过如何快捷安全迁移数据,迁移数据可能有多种原因,一种是想增加一块硬盘,把原来一些空间不够的分区迁移过来;另一种是硬盘复制,旧的硬盘容量可能太小了,又或者已经出现了问题,想用新的硬盘代替。葱头就分别举例说明怎样迁移数据,具体方法可能和你的硬盘的实际情况有所不同,这里只是作一个指引。 ...