作業日記@HatenaBlog

各種の作業メモ

OpenBSD4.1ディスク環境設定

パーティション構成

ラベル ディレクト サイズ
a: / 8GB
b: swap 2GB
  • label editor
Entering '?' at most prompts will give you (simple) context sensitive help.
> _
    
    
offset: [63]〈Enter〉 size: [20964762] 8g〈Enter〉 Rounding to nearest cylinder: 16777467 FS type: [4.2BSD]〈Enter〉 mount point: [none] /〈Enter〉
offset: [16777530]〈Enter〉 size: [4187295]〈Enter〉 FS type: [swap]〈Enter〉
Write new label?: [y]〈Enter〉 No more disks to initialize. _ OpenBSD filesystem: wd0a / _ The next step *DESTROYS* all existing data on these partitions! Are you really sure that you're ready to proceed? [no] y〈Enter〉

ネットワーク設定

System hostname? (short form, e.g. 'foo') myhost
Configure the network? [yes]〈Enter〉
Which one do you wish to initialize? (or 'done') [pcn0]〈Enter〉
Symbolic (host) name for pcn0? [myhost]〈Enter〉
The media options for pcn0 are currently
________media: Ethernet autoselect (autoselect)
Do you want to change the media options? [no]〈Enter〉
IPv4 address for pcn0? (or 'none' or 'dhcp') dhcp〈Enter〉
Issuing hostname-associated DHCP request for pcn0.
DHCPDISCOVER on pcn0 to 255.255.255.255 port 67 interval 2
DHCPOFFER from 192.168.x.x
DHCPREQUEST on pcn0 to 255.255.255.255.port 67
DHCPACK from 192.168.x.x
bound to 192.168.x.y -- renewal in 43200 seconds.
IPv6 address for pcn0? (or 'rtsol' or 'none') [none]〈Enter〉
No more interfaces to initialize.
DNS domain name? (e.g. 'bar.com') [my.domain]〈Enter〉
DNS nameserver? (IP address or 'none') [192.168.x.x AAA.BBB.CCC.DDD]〈Enter〉
Use the nameserver now? [yes]〈Enter〉
Default IPv4 route? (IPv4 address. 'dhcp' or 'none') [dhcp]〈Enter〉
Edit hosts with ed? [no]〈Enter〉
Do you want to do any manual network configuration? [no]〈Enter〉

インストール

Password for root account? (will not echo) パスワード〈Enter〉
Password for root account? (again) パスワード〈Enter〉
_
Let's install the sets!
Location of sets? (cd disk ftp http or 'done') [cd] ftp〈Enter〉
〜〜〜
Server? (IP address, hostname, list#, 'done' or '?') 41〈Enter〉
Server? (IP address, hostname, list#, 'done' or '?') [ftp.nara.wide.ad.jp]〈Enter〉
Does the server support passive mode ftp? [yes]〈Enter〉
Server directory? [pub/OpenBSD/4.1/i386]〈Enter〉
Login? [anonymous]〈Enter〉
ftp: connect to address 2001:200:0:1::800:21: No route to host
〜〜〜
Set name? (or 'done') [bsd.mp] all〈Enter〉
〜〜〜
Set name? (or 'done') [bsd.mp] -bsd.mp〈Enter〉
〜〜〜
Set name? (or 'done') [bsd.mp] done〈Enter〉
〜〜〜
Ready to install sets? [yes]〈Enter〉
Getting bsd ...
〜〜〜
Location of sets? (cd disk ftp http or 'done') [done]〈Enter〉

インストール後の設定

Start sshd(8) by default? [yes]〈Enter〉
Start ntpd(8) by default? [no]〈Enter〉
Do you expect to run the X Window System? [no] y〈Enter〉
Change the default console to com0? [no]〈Enter〉
Saving configuration files...done.
Generating initial host.random file...done.
What timezone are you in? ('?' for list) [Canada/Mountain] Japan〈Enter〉

インストール完了

haltコマンドを入力してマシン再起動。
CONGRATURATIONS! Your OpenBSD install has been successfully completed!
To boot the new system,, enter halt at the command prompt. Once the
system has halted, reset the machine and boot from the disk.
# halt〈Enter〉
syncing disks... done
.
The operating system has halted.
Please press any key to reboot.

一般ユーザー追加

参考サイト http://nobug.tukusi.ne.jp/netbsd-guide/trans/chap-2boot.html rootでログインする。
# groupadd hogehoge
# useradd -g hogehoge -G wheel -m hogehoge
# passwd hogehoge
New password:パスワード
Retype new password:パスワード
  1. グループhogehogeを作成
  2. useraddコマンド
    1. オプション-g:グループhogehogeに所属
    2. オプション-G:セカンドグループwheelに所属(rootへsuできる)
    3. オプション-m:ホームディレクトリを作成(/home/hogehoge)
  3. passwdコマンドでhogehogeのパスワード設定

Xorg設定

# xorgconfig -textmode〈Enter〉
mouse Auto
Keyboard Japanese 106-key
keyboard layout Japan
monitor High Frequency SVGA, 1024x768 @ 70 Hz
VertRefresh 50 - 70
card vmware
screen 24 bits, 16Mb colors

packageの設定

パッケージの取得先 ftp://ftp.netlab.is.tsukuba.ac.jp/pub/os/OpenBSD/4.1/packages/i386 パッケージのパスを設定
# PKG_PATH=ftp://ftp.netlab.is.tsukuba.ac.jp/pub/os/OpenBSD/4.1/packages/i386
# export PKG_PATH

KDEをインストール

参考ページ http://www.running-dog.net/bsd/43/kde.html http://homepage.mac.com/evelinae/atsushi/KDEOniBook/
# pkg_add ${PKG_PATH}kde-i18n-ja-3.5.6.tgz
以下、同様に次のパッケージを追加。
  • tcsh-6.14.00p1.tgz
  • kdebase-3.5.6.tgz
  • ja-fonts-gnu-1.2

Anthy

OpenBSDのパッケージがftpサイトに無いので、ソースからコンパイルする。 ダウンロード元 http://sourceforge.jp/projects/anthy/ 本稿執筆時点における最新版 http://prdownloads.sourceforge.jp/anthy/25384/anthy-8916.tar.gz
  1. /tmpにanthy-8916.tar.gzをDL
  2. tar -xvzf anthy-8916.tar.gzで展開
  3. 展開したディレクトリ内へcd
  4. ./configure
  5. make && make install

SCIMコンパイル&インストール

SCIM公式サイト http://www.scim-im.org/
  1. scim Version 1.4.6のソースをDL
  2. tarを展開
  3. ./configure
  4. make
  5. make install

/etc/rc.conf

 --- etc/rc.conf Wed Mar  1 14:01:04 2006
 +++ /etc/rc.conf        Thu Sep 14 15:55:01 2006
 @@ -39,6 +39,7 @@
 
 # For normal use: "-L sm-mta -bd -q30m", and note there is a cron job
 sendmail_flags="-L sm-mta -C/etc/mail/localhost.cf -bd -q30m"
 +sendmail_flags="NO"
 spamd_flags=NO         # for normal use: "" and see spamd-setup(8)
 spamd_grey=NO          # use spamd greylisting if YES
 spamlogd_flags=""      # use eg. "-i interface" and see spamlogd(8)
 @@ -50,7 +51,7 @@
 identd_flags=NO                # for non-inetd use: "-b -elo"
 
 # On some architectures, you must also disable console getty in /etc/ttys
 -xdm_flags=NO           # for normal use: ""
 +xdm_flags="NO"         # for normal use: ""
 
 # For enabling console mouse support (i386 alpha amd64)
 wsmoused_flags=NO      # for ps/2 or usb mice: "", serial: "-p /dev/cua00"