FreeBSD インストール
2017 May 06.
Release 11.0 CDインストール
インストール先のHDDのスライス(パーティション)は、論理パーティションではインストールできず、基本パーティションとすればインストールできた。
CDインストール後
  qiita.com/whitebell/items/ca5d47dae1f521b7afda より
    portsで使用するミラーFTPサーバー設定
      /etc/make.conf
        MASTER_SITE_OVERRIDE=ftp://ftp.jp.freebsd.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/
    共有メモリ
      shmmaxは搭載メモリの半分、shmallはshmmaxの1/4096。
      /etc/sysctl.conf
        kern.ikpc.shmmax=1073741824
        kern.ipc.shmall=262144
    FreeBSDのアップデート
      # freebsd-update fetch
      # freebsd-update install
    ports collectionの更新
      ソースコードからアプリケーションをインストールするためのファイル群。
        (初回)
          # portsnap fetch
          # portsnap extract
        (2回目以降)
          # portsnap fetch
          # portsnap update
    pkgのインストール
      コンパイル済みバイナリpackagesの管理ツール。
      # pkg bootstrap
        Do you want to fetch and install it now? (y/N)と聞かれるのでy。
    portsでインストールしたプログラムのアップデート管理
      # pkg install ports-mgmt/portmaster
      # reboot
    ports検索ユーティリティpsearchのインストール
      # pkg install ports-mgmt/psearch
  同時に開けるファイル数上限設定
    /etc/sysctl.conf
        kern.maxfiles=65535
  一般ユーザーの追加
    # adduser
    一般ユーザーを wheel グループに追加する。
xfceのインストール
( silversack.my.coocan.jp/bsd/xfce411x-buildxfce.htm より )
  # pkg install x11/xorg
  # pkg install japanese/font-std
  # pkg install japanese/font-vlgothic
  # pkg install japanese/font-takao
  # pkg install japanese/uim-mozc textproc/uim-gtk
  # pkg install x11-fonts/bitstream-vera
  # pkg install x11-wm/xfce4 audio/xfce4-mixer deskutils/xfce4-volumed deskutils/xfce4-xkb-plugin print/xfce4-print sysutils/xfce4-battery-plugin sysutils/xfce4-mount-plugin sysutils/xfce4-power-manager
  # pkg install x11/lightdm
  # Xorg -configure
    もし、画面が真っ暗になったら # shutdown -r now
    xorg.conf.new がカレントディレクトリにできている。
  # cp xorg.conf.new /etc/X11/xorg.conf
  /etc/X11/xorg.conf
    「Section "Module"」に
        Load  "freetype"
    「Section "Files"」に
        FontPath  "/usr/local/lib/X11/fonts/bitstream-vera/"
    を追記。
  nvidiaドライバのインストール
  ( silversack.my.coocan.jp/bsd/nvidia-driver.html より)
 ドライバ: VGA compatible controller: NVIDIA Corporation C61 [GeForce 6150SE nForce 430] => 304ドライバ
    # vi /etc/rc.conf
      linux_enable="YES"
    # vi /etc/sysctl.conf
      compat.linux.osrelease=2.6.18
    # reboot
    # pkg install x11/nvidia-driver-340 x11/nvidia-settings x11/nvidia-xconfig
    # vi /etc/devfs.conf
      link   /tmp   shm
    # vi /etc/fstab
      linprocfs   /compat/linux/proc   linprocfs   rw   0   0
    # vi /boot/loader.conf
      nvidia_load="YES"
    # nvidia-xconfig
  X window 用デーモン設定
    # vi /etc/rc.conf
      dbus_enable="YES"
      hald_enable="YES"
      polkitd_enable="YES"
( buccya.blogspot.jp/2016/11/loaderconf.html より )
  nVidia設定
    /boot/loader.conf
      nvidia-modeset_load="YES"
  uim mozcの設定の追加
    .xinitrcのファイルに、以下も追加
      uim-toolbar-gtk-systray &
  /usr/local/etc/X11/xorg.conf.d/input.conf を作成する
    Section "InputClass"
   Identifier    "Keyboard Defaults"
   Driver      "keyboard"
   MatchIsKeyboard  "on"
   Option      "XkbRules" "xorg"
   Option      "XkbModel" "jp106"
   Option      "XkbLayout" "jp"
   Option      "XkbOptions" "ctrl:nocaps"
    EndSection
  /usr/local/etc/polkit-1/localauthority/50-local.d/org.freedesktop.consolekit.pkla
    [Local restart]
    Idendity=unix-group:power
    Action=org.freedesktop.consolekit.system.restart
    ResultAny=yes
    ResultInactive=yes
    ResultActive=yes
     [Local shutdown]
    Idendity=unix-group:power
    Action=org.freedesktop.consolekit.system.stop
    ResultAny=yes
    ResultInactive=yes
    ResultActive=yes
    [Local restart - multiple]
    Idendity=unix-group:power
    Action=org.freedesktop.consolekit.system.restart-multiple-users
    ResultAny=yes
    ResultInactive=yes
    ResultActive=yes
    [Local shutdown - multiple]
    Idendity=unix-group:power
    Action=org.freedesktop.consolekit.system.stop-multiple-users
    ResultAny=yes
    ResultInactive=yes
    ResultActive=yes
    [Suspend Hibernate]
    Idendity=unix-group:power
    Action=org.freedesktop.upower.*
    ResultAny=yes
    ResultInactive=yes
    ResultActive=yes
  # pw groupadd power
  # pw usermod [ユーザー名] -G wheel,operator,power
  # startx
    X起動を確認し、exit
  lightDM設定
    # vi /etc/rc.conf
      lightdm_enable="YES"