FreeBSD 6.0-RELEASE設定メモ

インストール

ミラーから、6.0-RELEASE-i386-bootonly.iso をとってきてインストーラー起動。あとはftpインストールする。

ファイルシステムでsoftupdateフラグをつけるを忘れない。

パッケージインストール

sysinstall(インストーラ、/usr/sbin/sysinstallにあるのでインストール後も起動できる) から入れるのが簡単

  • editors/emacs
  • misc/lv
  • net/cvsup-without-gui
  • shells/bash
  • security/sudo
  • security/portaudit
  • sysutil/portupgrade

はインストール時に入れておいたほうが楽。

sshdなど

sysinstallで設定しておけばいい。設定自体は/etc/rc.confに以下のような感じで入る。

hostname="freebsd.mshome.net"
ifconfig_lnc0="DHCP"
inetd_enable="NO"
keymap="jp.106"
linux_enable="YES"
moused_enable="YES"
sshd_enable="YES"
usbd_enable="YES"

サウンド

/boot/loader.confに/boot/defaults/locader.confから引っ張ってきて追加しリブート

snd_es137x_load="YES"           # es137x

すぐ組み込むのであれば、コマンドで

# kldload /boot/kernel/snd_es137x.ko

locale

 export LANG=ja_JP.UTF-8

Ports

cvsup

いまはインストーラーで展開してからパッチのほうがいいかも

# cvsup -g -L 2 -h cvsup3.jp.freebsd.org /usr/share/examples/cvsup/ports-supfile
portsパッケージ安全性チェック
# portsdb -Fu
# portaudit -Fd
# portaudit -a
portsパッケージアップグレード
# portupgrade -a

時々コンフリクトで失敗することもある。たとえば、ファイル所属のパッケージ移動でファイルが重なる場合など。この場合は、コンフリクトで出たパッケージのほうを先にportupgradeしてやるとアップグレード可能になることが多い。

portsからのパッケージインストール
# portinstall xxx/zzzzzz
パッケージ情報
# pkg_info
アンインストール
# pkg_deinstall xxxx-xx.x

Xなど

# portinstall japanese/anthy
# portinstall japanese/scim-anthy
# portinstall japanese/sazanami-ttf
# portinstall x11/xorg
# portinstall x11/gnome2

依存関係がいっぱい。丸一日かかるかも。

/etc/X11/xorg.conf
Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
        RgbPath      "/usr/X11R6/lib/X11/rgb"
        ModulePath   "/usr/X11R6/lib/modules"
        FontPath     "/usr/X11R6/lib/X11/fonts/misc/"
        FontPath     "/usr/X11R6/lib/X11/fonts/TTF/"
        FontPath     "/usr/X11R6/lib/X11/fonts/Type1/"
        FontPath     "/usr/X11R6/lib/X11/fonts/CID/"
        FontPath     "/usr/X11R6/lib/X11/fonts/75dpi/"
        FontPath     "/usr/X11R6/lib/X11/fonts/100dpi/"
        FontPath     "/usr/X11R6/lib/X11/fonts/TrueType/"
EndSection

Section "Module"
        Load  "extmod"
        Load  "glx"
#       Load  "dri"
        Load  "dbe"
        Load  "record"
        Load  "xtrap"
        Load  "type1"
        Load  "freetype"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
        Option "XkbModel" "jp106"
        Option "XkbLayout" "jp"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/sysmouse"
EndSection

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
        Option       "dpms"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "HWcursor"                  # [<bool>]
        #Option     "NoAccel"                   # [<bool>]
        Identifier  "Card0"
        Driver      "vmware"
        VendorName  "VMWare Inc"
        BoardName   "Unknown Board"
        BusID       "PCI:0:15:0"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        DefaultDepth 24
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Modes     "800x600" "640x480"
        EndSubSection
EndSection
.xinitrc
GTK_IM_MODULE=scim
export GTK_IM_MODULE
scim -d &
XMODIFIERS=@im=SCIM
export XMODIFIERS
exec gnome-session

startxで立ち上げたあと、「デスクトップ」「設定」「サウンド」から、サウンドサーバを有効にし、効果音を鳴らすようにする。

本体のアップデート

STABLEにするか。

# cvsup -g -L 2 -h cvsup3.jp.freebsd.org /usr/share/examples/cvsup/stable-supfile
# cd /usr/src
# lv UPDATING #一応危険じゃないか読む
# make clean
# make buildworld
# make buildkernel
# make installkernel
# reboot

ここで一旦再起動

# cd /usr/src
# make installworld
# mergemaster

rails環境

portinstallで以下を入れる