cd /usr/ports/sysutils/goaccess/ make install clean goaccess -f access.log -a
Category Archives: FreeBSD
forget to update the bootloader when updating ZFS filesystems.
Today, when I reboot my freebsd server. Server can’t boot. The error message is
ZFS: unsupported ZFS version 5000 (should be 28) can't find /boot/zfsloader default: ssd::/boot/kernel/kernel boot: can't find /boot/zfsloader
The problem is caused by that after I update zfs version, I should update bootloader at the same time.
Fix it:
Download the latest Freebsd 9.1 current image. Note:if you are using the stable image, the bootloader in the image is still old and can’t support zfs 29.
Then use the image to boot the server, then enter ‘shell’,run below command for all boot disks:
#gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 mfid0
then reboot the server
Freebsd root password lost after mergemaster
if you’re using mergemaster to update FreeBSD, sometime, if you don’t pay attention to diff, you may use the new master.passwd and group to overwrite the old one, then the root password will be missed.
Freebsd will backup master.passwd and group everyday to folder /var/backup. So just copy them back, and run
Freebsd 7.0 install notes
vi sshd_config
修改允许root登录
/etc/rc.d/sshd restart
安装ports
sysinstall—>configure—–>distributions—–>ports—–>选择Ftp或其它的网络连接即可
——–使用portsnap,从freebsd 6.0开始———–
portsnap fetch
portsnap extract
portsnap update
如果您的系统中 没有 /usr/src/sys 这样一个目录, 则说明没有安装内核源代码。安装它最简单的方法是通过以 root 身份运行 sysinstall, 选择 Configure, 然后是 Distributions、 src,选中其中的 base 和 sys。
———-编译内核
http://cnsnap.cn.freebsd.org/doc/zh_CN.GB2312/books/handbook/kernelconfig-building.html
安装cvsup,没有图形界面,所以
cd /usr/ports/net/cvsup-without-gui/
make
make install
#cp ports-supfile /root/
#cp stable-supfile /root/
#cp standard-supfile /root/
#cd /root/
rehash 不然会出现command not found
修改 ports-supfile,
*default host=cvsup.FreeBSD.org
cvsup -g -L 2 ports-supfile
修改stable-cupfile
同样是
*default host=cvsup.FreeBSD.org
cd /usr/src/sys/i386/conf
mkdir /root/kernels
cp GENERIC /root/kernels/SYXIN
ln -s /root/kernels/SYXIN
vi SYXIN
修改配置
cd /usr/src/sys/i386/conf
# /usr/sbin/config SYXIN
# cd ../compile/SYXIN
# make depend
# make
# make install
# cd /usr/ports/www/lighttpd
# make
# make config
# make install
# make clean
# cd /usr/ports/databases/mysql50-server/
#make WITH_CHARSET=utf8 WITH_XCHARSET=gbk WITH_XCHARSET=gb2312 WITH_PROC_SCOPE_PTH=yes BULD_OPTIMIZED=yes BULID_STATIC=yes SKIP_DNS_CHECK=yes WITHOUT_INNODB=YES
#make install
# cd /usr/ports/databases/mysql50-scripts/
#make
#make install
# cd /usr/ports/lang/php5
# make
# make install
# make clean
#cd /usr/ports/lang/php5-extensions
#make config
#make
#make install
#make search name=ImageMagick
#>cd /usr/ports/graphics/ImageMagick
#>make install
lighttpd+fastcgi under freebsd
## for PHP don’t forget to set cgi.fix_pathinfo = 1 in the php.ini
fastcgi.server = ( “.php” =>
( “localhost” =>
(
“socket” => “/tmp/php-fastcgi.socket”,
“bin-path” => “/usr/local/bin/php-cgi”
)
)
)
Freebsd杂
www# setenv "ftp://cvsup2.cn.freebsd.org"
www# pkg_add -r cvsup-without-gui
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.2-release/Latest/cvsup-without-gui.tbz... Done.
www# rehash
www# cd /usr/share/examples/cvsup/
www# ee ports-supfile
*default host=cvsup2.cn.freebsd.org