Recently in FreeBSD Category

pkg_add -r

| | Comments (0) | TrackBacks (0)

FreeBSD 下的 pkg_add -r 跟 Linux 下的 apt/yum/urpmi 一樣, 可以從 Server 下載 package 回來, 並自動安裝 dependency packages
例: 在 FreeBSD 6.x 下裝 mutt
setenv PACKAGESITE ftp://ftp.tw.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/Latest/
pkg_add -r mutt

ref. 如何安裝遠端的 packages?

FreeBSD 7.0 MySQL Performance

| | Comments (0) | TrackBacks (0)

MySQL Database performance
這篇文章提到, FreeBSD 7.0 在 8 Core 的 CPU 下, MySQL 的效能很優異, 勝過 Linux.
不曉得在一般的 Dual Core CPU 下, 效能是如何?
看來 FreeBSD 7.0 在效能上有很大的改進.

ref. FreeBSD 7.0 Bests Linux In SMP Performance
FreeBSD 上的 MySQL 效率

FreeBSD 7.0 Released

| | Comments (0) | TrackBacks (0)

FreeBSD 使用 BASH 中文輸入設定

| | Comments (0)

在 ~/.inputrc 檔增加設定如下:
# inputrc - global inputrc for libreadline
# See readline(3readline) and `info rluserman' for more information.
# Be 8 bit clean.
set meta-flag on
set input-meta on
set output-meta on
# To allow the use of 8bit-characters like the german umlauts, comment out
# the line below. However this makes the meta key not work as a meta key,
# which is annoying to those which don't need to type in 8-bit characters.
set convert-meta off
ref. 在 Bash/Tcsh Shell 底下的中文輸入

[FreeBSD] Change login shell to BASH

| | Comments (0)

FreeBSD 的預設 Shell 是 TCSH, 把全部人的 Shell 都改成 BASH

for i in `awk -F: '/tcsh/ {if ($3==0||$3>=1000) print $1}' /etc/passwd`
do
   chsh -s /usr/local/bin/bash $i
done

[FreeBSD] Enable active mode FTP behind NAT

| | Comments (0)

在 /etc/ipnat.conf 最前面加一行
map rl0 192.168.0.0/24 -> 0/32 proxy port 21 ftp/tcp
(rl0:網卡, 192.168.0.0/24: LAN 網段)
相當於 Linux 的 ip_nat_ftp + ip_conntrack_ftp module
ref. FreeBSD Handbook: 26.5.21 FTP and NAT

FreeBSD mount USB storage

| | Comments (0)

使用 FreeBSD mount 隨身碟或 USB 硬碟外接盒
Kernel 需要下列設定

# SCSI peripherals
device scbus # SCSI bus (required for SCSI)
device da # Direct Access (disks)
device pass # Passthrough device (direct SCSI access)
# USB support
device uhci # UHCI PCI->USB interface
device ohci # OHCI PCI->USB interface
device usb # USB Bus (required)
device umass # Disks/Mass storage - Require

掛載 mount -t msdos /dev/da0s1 /mnt
ref. Mounting Compact Flash under FreeBSD

FreeBSD, Linux Serial Console

| | Comments (1)

Serial Console 在沒有 VGA 的環境下很好用
FreeBSD 的 Serial Console 設定
在 /boot/loader.conf 加上 'console="comconsole"
編輯 /etc/ttys 的 ttyd0 那行
ttyd0 "/usr/libexec/getty std.9600" vt100 on secure
很簡單吧, Kernel 不要忘記加上 COM Port 的支援 (device sio0)
ref. FreeBSD Handbook: 21.6 Setting Up the Serial Console

Linux 的 Serial Console 設定
有 Boot Loader, Kernel 參數, inittab 三個地方要設
GRUB 為例, 在 menu.lst 前加入
serial --unit=0 --speed=9600
terminal serial
在 kernel 那一行的最後加上 console=tty0 console=ttyS0,9600
在 /etc/inittab 最後加上 s0:2345:respawn:/sbin/agetty ttyS0 115200 linux
ref. Using GRUB via a serial line, Linux Serial Console

支援 Serial 的 Terminal 軟體, X 下有不少, for Windows 最基本的就是 Windows 附的超級終端機,
商業軟體 SecureCRT, PowerTerm 都不錯,
也是有 Open Source 如 RealTerm, 但功能較差.

RAR for FreeBSD

| | Comments (0)

FreeBSD 4.x 最高只能用到 RAR for FreeBSD 3.40 版, 3.41 版以上的要 FreeBSD 5.0 以上才能執行
PS. RAR 最近出了 3.50 版

June 2008

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30          

About this Archive

This page is a archive of recent entries in the FreeBSD category.

Data is the previous category.

Hosting is the next category.

Find recent content on the main index or look in the archives to find all content.