FreeBSD-7.0R(server)


サーバPC

以下は7.0-RELEASEをゲストOSとして導入する時の内容

ホストOS側の設定

  • ホストOSの仮想マシンマネージャーのqemu上に構築
    Xen上ではブートローダが"BTX halted"してしまう。
  • ディスクサイズ=4000MB
  • メモリサイズ=512MB
  • CPU数=1

インストール

  • インストーラ
    • スワップ無し
    • DistributionはA Minimal
    • sshdを開始
  • /etc/fstabファイルにasyncを追加
    # Device     Mountpoint  FStype  Options         Dump    Pass#
    /dev/ad0s1a  /           ufs     rw,async        1       1
    /dev/acd0    /cdrom      cd9660  ro,noauto       0       0
  • 一般ユーザーを追加
  • /etc/ttysを修正
    # Pseudo terminals
    ttyp0   none                    network off secure
    ttyp1   none                    network off secure
    ttyp2   none                    network off secure
    ttyp3   none                    network off secure
  • /etc/rc.confは以下
    # -- sysinstall generated deltas -- # Sun May 18 09:56:29 2008
    # Created: Sun May 18 09:56:29 2008
    # Enable network daemons for user convenience.
    # Please make all changes to this file, not to /etc/defaults/rc.conf.
    # This file now contains just the overrides from /etc/defaults/rc.conf.
    defaultrouter="192.168.1.1"
    hostname="server.mydomain.ddo.jp"
    ifconfig_re0="inet 192.168.1.2  netmask 255.255.255.0"
    inetd_enable="NO"
    keymap="jp.106"
    keyrate="fast"
    ntpdate_enable="YES"
    ntpdate_flags="-b ntp1.plala.or.jp"
    sshd_enable="YES"

システムのアップデート

  • freebsd-update
    Looking up update.FreeBSD.org mirrors... 1 mirrors found.
    Fetching public key from update1.FreeBSD.org... done.
    Fetching metadata signature for 6.3-RELEASE from update1.FreeBSD.org... done.
    Fetching metadata index... done.
    Fetching 2 metadata files... done.
    Inspecting system... done.
    Preparing to download files... done.
    Fetching 6 patches.... done.
    Applying patches... done.
    
    The following files will be updated as part of updating to 6.3-RELEASE-p2:
    /boot/kernel/kernel
    /lib/libpthread.so.2
    /usr/lib/libpthread.a
    /usr/lib/libssh.a
    /usr/lib/libssh.so.3
    /usr/sbin/sshd
    server# freebsd-update install
    Installing updates... done.

portsの準備

  • portsnapは標準で入っている。
    /etc/portsnap.confがあることを確認(中身は特にいじらなかった) (初回のみ。30分くらい時間がかかる)
    server# portsnap fetch
    Looking up portsnap.FreeBSD.org mirrors... 4 mirrors found.
    Fetching public key from portsnap2.FreeBSD.org... done.
    Fetching snapshot tag from portsnap2.FreeBSD.org... done.
    Fetching snapshot metadata... done.
    Fetching snapshot generated at Sun May 18 09:13:59 JST 2008:
    03f47962bf2c8bb28403d668b3948295bb02d1dbf246fe100% of   51 MB  169 kBps 00m00s
    Extracting snapshot... done.
    Verifying snapshot integrity... done.
    Fetching snapshot tag from portsnap2.FreeBSD.org... done.
    Fetching snapshot metadata... done.
    Updating from Sun May 18 09:13:59 JST 2008 to Mon May 19 08:24:29 JST 2008.
    Fetching 4 metadata patches... done.
    Applying metadata patches... done.
    Fetching 0 metadata files... done.
    Fetching 50 patches.....10....20....30....40....50 done.
    Applying patches... done.
    Fetching 7 new ports or files... done.
  • portsupgrade
    server# cd /usr/ports/ports-mgmt/portupgrade
    server# make install
    (ESCか[Cancel]を選択してunchanged) 
    server# make clean
server# portversion -v
db41-4.1.25_4               =  up-to-date with port
perl-5.8.8_1                =  up-to-date with port
portupgrade-2.4.3_2,2       =  up-to-date with port
ruby-1.8.6.111_2,1          =  up-to-date with port
ruby18-bdb-0.6.2            =  up-to-date with port

PukiWikiのインストール

  • apache
    cd /usr/ports/www/apache22/
    make install
    make clean
apache-2.2.8                =  up-to-date with port
autoconf-2.61_2             =  up-to-date with port
autoconf-wrapper-20071109   =  up-to-date with port
expat-2.0.1                 =  up-to-date with port
gettext-0.16.1_3            =  up-to-date with port
gmake-3.81_2                =  up-to-date with port
help2man-1.36.4_1           =  up-to-date with port
libiconv-1.11_1             =  up-to-date with port
libtool-1.5.24              =  up-to-date with port
m4-1.4.9,1                  =  up-to-date with port
p5-gettext-1.05_1           =  up-to-date with port
  • PHP
    cd /usr/ports/lang/php5-extensions
    make install
    make clean
libxml2-2.6.31              =  up-to-date with port
pcre-7.7                    =  up-to-date with port
pecl-filter-0.11.0          =  up-to-date with port
pecl-hash-1.5               =  up-to-date with port
pecl-json-1.2.1             =  up-to-date with port
php5-5.2.6                  =  up-to-date with port
php5-ctype-5.2.6            =  up-to-date with port
php5-dom-5.2.6              =  up-to-date with port
php5-extensions-1.1         =  up-to-date with port
php5-iconv-5.2.6            =  up-to-date with port
php5-pcre-5.2.6             =  up-to-date with port
php5-pdo-5.2.6              =  up-to-date with port
php5-pdo_sqlite-5.2.6       =  up-to-date with port
php5-posix-5.2.6            =  up-to-date with port
php5-session-5.2.6          =  up-to-date with port
php5-simplexml-5.2.6        =  up-to-date with port
php5-spl-5.2.6              =  up-to-date with port
php5-sqlite-5.2.6           =  up-to-date with port
php5-tokenizer-5.2.6        =  up-to-date with port
php5-xml-5.2.6              =  up-to-date with port
php5-xmlreader-5.2.6        =  up-to-date with port
php5-xmlwriter-5.2.6        =  up-to-date with port
pkg-config-0.23_1           =  up-to-date with port
  • Apacheのモジュールがインストールされなかった。
    make reinstall
[ ] APACHE     Build Apache module
[ ] MULTIBYTE  Enable zend multibyte support
  • 設定ファイル
    • /usr/local/etc/apache22/httpd.conf
      server# diff httpd.conf.org httpd.conf
      103a104
      > LoadModule php5_module libexec/apache22/libphp5.so
      138c139
      < ServerAdmin you@example.com
      ---
      > ServerAdmin root@mydomain.ddo.jp
      379a381,382
      >
      >     AddType application/x-httpd-php .php
      431c434
      < #Include etc/apache22/extra/httpd-userdir.conf
      ---
      > Include etc/apache22/extra/httpd-userdir.conf

ただしLoadModule?の行はインストールで自動的に入った。 make installで表示される行

AddType application/x-httpd-php-source .phps
  • /etc/rc.conf
    apache22_enable="YES"

IMAP

  • 何も考えずにportsからインストール
    cd /usr/ports/mail/courier-imap
    make install
    make clean
  • /usr/local/etc/authlib/authdaemonrcは変更なし。(authdaemonrc.distから変更なし。)
  • /usr/local/etc/courier-imap/*も変更なし。(*.distから変更なし。)
  • /etc/rc.confに追記
    courier_authdaemond_enable="YES"
    courier_imap_imapd_enable="YES"
  • sendmailで受信したメールをMaildirに振り分ける
    cd /usr/ports/mail/procmail
    make install
    make clean
server# cat .forward
"|IFS=' ' && p=/usr/local/bin/procmail && test -f $p && exec $p -Yf- || exit 75 #xxxxxxxx"
server# cat .procmailrc 
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
MAILDIR=$HOME/Maildir/
DEFAULT=$MAILDIR/
LOGFILE=$MAILDIR/procmail.log
#SENDMAIL=/usr/local/sbin/sendmail      # postfix
SENDMAIL=/usr/sbin/sendmail
TIMEOUT=60

:0
$DEFAULT

samba

cd /usr/ports/japanese/samba3/
make

最新の20件

2008-12-27 2016-06-18 2008-05-19 2016-07-23 2016-07-14 2016-05-29 2016-05-13 2016-04-08 2008-12-27 2008-10-11
  • FreeBSD-7.0R(server)
2008-09-27 2008-05-19 2008-04-19 2008-04-12 2008-02-11 2008-02-10 2008-02-09 2008-02-08 2008-02-07

今日の1件

  • FreeBSD-7.0R(server)(1)

  • counter: 122
  • today: 1
  • yesterday: 0
  • online: 1