首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 操作系统 > 其他操作系统 > OpenBSD安裝說明
【标  题】:OpenBSD安裝說明
【关键字】:OpenBSD
【来  源】:http://www.cublog.cn/u/18970/showart.php?id=111737

OpenBSD安裝說明

1. OpenBSD 官方網站 http://www.openbsd.org/
  2. 本篇紀錄實作安裝過程與所需的設定, 詳細內容可以參考 http://www.openbsd.org/faq/faq4.html
  3. 本篇假設至少已有 OpenBSD 的開機媒介
 
 
實做平台 :
   
  OpenBSD 3.6 - i386
     
     
系統安裝 :
   
  註 : 強烈建議使用單顆硬碟單獨安裝, 不要使用多重開機, 以免因意外造成重要資料損毀!
   
  1.開始安裝 :
     
 
這裡我們使用光碟開機
 
下面可以看到開機光碟開機的畫面, 開完之後會停在 CLI 模式, 這裡我們輸入 I 來安裝新的系統
    rootdev=0x1100 rrootdev=0x2f00 rawdev=0x2f02
erase ^?, werase ^W, kill ^U, intr ^C, status ^T
(I)nstall, (U)pgrade or (S)hell? i

     
    隨後設定終端機型態與鍵盤類型, 這裡我們按 ENTER 使用預設
    Welcome to the OpenBSD/i386 3.6 install program.

This program will help you install OpenBSD in a simple and rational way. At
any prompt except password prompts you can run a shell command by typing
'!foo', or escape to a shell by typing '!'. Default answers are shown in []'s
and are selected by pressing RETURN. At any time you can exit this program by
pressing Control-C and then RETURN, but quitting during an install can leave
your system in an inconsistent state.

Specify terminal type: [vt220] Enter
Do you wish to select a keyboard encoding table? [no] Enter

     
    系統提示如果硬碟上有資料尚未備份, 請輸入 no 結束安裝前導程式,
    以免因操作失誤導致資料損毀, 或輸入 yes 繼續安裝
    IS YOUR DATA BACKED UP? As with anything that modifies disk contents, this
program can cause SIGNIFICANT data loss.

It is often helpful to have the installation notes handy. For complex disk
configurations, relevant disk hardware manuals and a calculator are useful.

Proceed with install? [no] y

     
     
  2.建立磁碟安裝空間 (partition & slice)
     
    選擇要使用的硬碟, 並使用全部的磁碟空間來安裝
    Cool! Let's get to it...

You will now initialize the disk(s) that OpenBSD will use. To enable all
available security features you should configure the disk(s) to allow the
creation of separate filesystems for /, /tmp, /var, /usr, and /home.

Available disks are: wd0.
Which one is the root disk? (or done) [wd0] Enter

Do you want to use *all* of wd0 for OpenBSD? [no] y

     
    建立分割區 (slice)
    先列出目前的切割狀況(p)並以megabytes為單位(m) , 可以輸入 ? 取得更多指令說明
    註 : 系統顯示出來的硬碟轉速 (rpm) 可能會跟實際上的數值不相同, 但是可以不用理會
    You will now create an OpenBSD disklabel inside the OpenBSD MBR
partition. The disklabel defines how OpenBSD splits up the MBR partition
into OpenBSD partitions in which filesystems and swap space are created.

The offsets used in the disklabel are ABSOLUTE, i.e. relative to the
start of the disk, NOT the start of the OpenBSD MBR partition.

# using MBR partition 3: type A6 off 63 (0x3f) size 12578832 (0xbff010)

Treating sectors 63-12578895 as the OpenBSD portion of the disk.
You can use the 'b' command to change this.

Initial label editor (enter '?' for help at any prompt)
> p m
device: /dev/rwd0c
type: ESDI
disk: ESDI/IDE disk
label: ST320011A
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 12483
total sectors: 12582912
free sectors: 12578832
rpm: 3600

16 partitions:
# size offset fstype [fsize bsize cpg]
a: 6142.0M 0.0M unused 0 0
c: 6144.0M 0.0M unused 0 0
>

     
    刪除(d)原有的 'a' 切割區
    > d a
     
    接著開始切割 slice, 這裡我們將切出 / , swap , /tmp , /var , /home , /usr 等 slice
    其代號分別為 a, b, d, e, f, g
    註 : 至少必須切出 'a' 和 'b' 兩個 slice, 其中 'a' 是 root 根目錄 'b' 是 swap
    註 : 實際需要的 slice 與 容量大小請依需求自行調整
    註 : 最後一個 slice (/usr) 在 size 的部分我們按 Enter 表示使用剩餘的所有空間
    註 : 'c' slice 代表實體硬碟,
     
    使用 a 來新增我們需要的 slice, 後面接著 slice 的代號
    > a a
offset: [63] Enter
size: [12578832] 256M
Rounding to nearest cylinder: 524097
FS type: [4.2BSD] Enter
mount point: [none] /
> a b
offset: [524160] Enter
size: [12054735] 512M
Rounding to nearest cylinder: 1048320
FS type: [swap] Enter
> a d
offset: [1572480] Enter
size: [11006415] 256M
Rounding to nearest cylinder: 524160
FS type: [4.2BSD] Enter
mount point: [none] /tmp
> a e
offset: [2096640] Enter
size: [10482255] 256M
Rounding to nearest cylinder: 524160
FS type: [4.2BSD] Enter
mount point: [none] /var
> a f
offset: [2620800] Enter
size: [9958095] 2g
Rounding to nearest cylinder: 4194288
FS type: [4.2BSD] Enter
mount point: [none] /home
> a g
offset: [6815088] Enter
size: [5763807] Enter
FS type: [4.2BSD] Enter
mount point: [none] /usr
>

     
    再確認一次剛剛所切割的狀況, 正確無誤後我們按 q 離開並按 Enter 存檔
    > p m
device: /dev/rwd0c
type: ESDI
disk: ESDI/IDE disk
label: ST320011A
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 12483
total sectors: 12582912
free sectors: 0
rpm: 3600

16 partitions:
# size offset fstype [fsize bsize cpg]
a: 255.9M 0.0M 4.2BSD 2048 16384 16 # /
b: 511.9M 255.9M swap
c: 6144.0M 0.0M unused 0 0
d: 255.9M 767.8M 4.2BSD 2048 16384 16 # /tmp
e: 255.9M 1023.8M 4.2BSD 2048 16384 16 # /var
f: 2048.0M 1279.7M 4.2BSD 2048 16384 16 # /home
g: 2814.4M 3327.7M 4.2BSD 2048 16384 16 # /usr
> q
Write new label?: [y] Enter

     
    接著確認掛載點, 如果確認先前的操作無誤, 可以直接按 Enter 直到重複的 slice 出現為止
    並按 y 開始格式化檔案系統
    Mount point for wd0d (size=262080k)? (or 'none' or 'done') [/tmp] Enter
Mount point for wd0e (size=262080k)? (or 'none' or 'done') [/var] Enter
Mount point for wd0g (size=2097144k)? (or 'none' or 'done') [/home] Enter
Mount point for wd0h (size=2881903k)? (or 'none' or 'done') [/usr] Enter
Mount point for wd0d (size=262080k)? (or 'none' or 'done') [/tmp] done
No more disks to initialize.

OpenBSD filesystems:
wd0a /
wd0d /tmp
wd0e /var
wd0f /home
wd0g /usr

The next step *DESTROYS* all existing data on these partitions!
Are you really sure that you're ready to proceed? [no] y
/dev/rwd0a: 524096 sectors in 520 cylinders of 16 tracks, 63 sectors
255.9MB in 2 cyl groups (328 c/g, 161.44MB/g, 20608 i/g)
/dev/rwd0d: 524160 sectors in 520 cylinders of 16 tracks, 63 sectors
255.9MB in 2 cyl groups (328 c/g, 161.44MB/g, 20608 i/g)
/dev/rwd0e: 524160 sectors in 520 cylinders of 16 tracks, 63 sectors
255.9MB in 2 cyl groups (328 c/g, 161.44MB/g, 20608 i/g)
/dev/rwd0f: 4194288 sectors in 4161 cylinders of 16 tracks, 63 sectors
2048.0MB in 13 cyl groups (328 c/g, 161.44MB/g, 20608 i/g)
/dev/rwd0g: 5763804 sectors in 5719 cylinders of 16 tracks, 63 sectors
2814.4MB in 18 cyl groups (328 c/g, 161.44MB/g, 20608 i/g)
/dev/wd0a on /mnt type ffs (rw, asynchronous, local, ctime=Wed Nov 10 02:03:49 2004)
/dev/wd0f on /mnt/home type ffs (rw, asynchronous, local, nodev, nosuid, ctime=Wed Nov 10 02:03:49 2004)
/dev/wd0d on /mnt/tmp type ffs (rw, asynchronous, local, nodev, nosuid, ctime=Wed Nov 10 02:03:49 2004)
/dev/wd0g on /mnt/usr type ffs (rw, asynchronous, local, nodev, ctime=Wed Nov 10 02:03:49 2004)
/dev/wd0e on /mnt/var type ffs (rw, asynchronous, local, nodev, nosuid, ctime=Wed Nov 10 02:03:49 2004)

     
     
  3.設定主機名稱
     
    設定主機名稱 (如果有合法的主機名稱請在這裡作設定!)
    System hostname? (short form, e.g. 'foo') saxo
     
     
  4.設定網路環境
     
    請先確認您的 IP 相關資訊以確保可以連線到網際網路, 後續將會透過網際網路來安裝系統
    這裡我們以手動設定為例而非 DHCP (自動取得),
     
    若您的網路環境為 DHCP 請在第五行的地方 (或相似之處) 輸入 'dhcp', 並依系統提示操作.
    註 : 安裝過程中請 不要 使用 DHCP 來設定第二張以上的網卡, 否則將會發生錯誤.
     
    以下為範例說明 :
    ip = 192.168.0.106
    子網路 = 255.255.255.0 (因為跟系統預設的內容一樣, 所以我們直接按 Enter 即可)
    網域 = eeto.net (這裡要輸入的為 '網域名稱' 而非 FQDN, 意即不包含主機名稱)
    名稱解析伺服器 = 168.95.1.1 (此為 hinet DNS, 請輸入距離較近的名稱解析伺服器位置來代替)
    預設閘道器 = 192.168.0.6
    Configure the network? [yes] Enter
Available interfaces are: le1.
Which one do you wish to initialize? (or 'done') [le1] Enter
Symbolic (host) name for le1? [saxo] Enter
IPv4 address for le1? (or 'none' or 'dhcp') 192.168.0.106
Netmask? [255.255.255.0] Enter
No more interfaces to initialize.
DNS domain name? (e.g. 'bar.com') [my.domain] eeto.net
DNS nameserver? (IP address or 'none') [none] 168.95.1.1
Use the nameserver now? [yes] Enter
Default IPv4 route? (IPv4 address, 'dhcp' or 'none') 192.168.0.6
add net default: gateway 192.168.0.6
Edit hosts with ed? [no] Enter
Do you want to do any manual network configuration? [no] Enter

     
    設定管理者(root)密碼, 請注意當輸入的時候並不會出現星號(*), 下面只是假設密碼為 pAssWOrd
    Password for root account? (will not echo) pAssWOrd
Password for root account? (again) pAssWOrd
     
     
  5.選擇安裝途徑
     
    接著我們輸入 f 表示透過 FTP 來安裝我們的系統
    註 : 在狀況許可下, 建議以贊助的方式購買系統光碟 :P
    You will now specify the location and names of the install sets you want to
load. You will be able to repeat this step until all of your sets have been
successfully loaded. If you are not sure what sets to install, refer to the
installation notes for details on the contents of each.

Sets can be located on a (m)ounted filesystem; a (c)drom, (d)isk or (t)ape
device; or a (f)tp, (n)fs or (h)ttp server.
Where are the install sets? (or 'done') f

     
    若有使用 proxy server 請在這裡輸入位置, 否則請按 Enter 繼續,
    接著按 Enter 列出可用的 ftp 伺服器列表
    HTTP/FTP proxy URL? (e.g. 'http://proxy:8080', or 'none') [none] Enter
Display the list of known ftp servers? [yes] Enter
Getting the list from 129.128.5.191

     
    請選擇較近的伺服器來安裝, 這裡我們選擇第 56 個伺服器也就是交大伺服器, 其餘按 Enter 即可
    註 : 列表實在太多了所以 skipping 掠過 ( 好吧!我承認我懶 XD )
    ...skipping
Server? (IP address, hostname, list#, 'done' or '?') 56
Using openbsd.csie.nctu.edu.tw/pub/OpenBSD Taiwan
Server? (IP address, hostname, list#, 'done' or '?') [openbsd.csie.nctu.edu.tw] Enter
Does the server support passive mode ftp? [yes] Enter
Server directory? [pub/OpenBSD/3.6/i386] Enter
Login? [anonymous] Enter

     
     
  6.選擇安裝元件
     
    接著系統會列出所有的元件, [X] 表示要安裝.
    這裡我們按 Enter 表示要新增 bsd.mp 套件 (支援多顆 CPU)
    註 : 請依個人習慣與需要選擇套件, 或參考官方網站說明
    註 : 最後五個名稱以 x 開頭的表示 Xwindow 的套件, 所以這裡我們並不安裝
    The following sets are available. Enter a filename, 'all' to select
all the sets, or 'done'. You may de-select a set by prepending a '-'
to its name.

[X] bsd
[X] bsd.rd
[ ] bsd.mp
[X] base36.tgz
[X] etc36.tgz
[X] misc36.tgz
[X] comp36.tgz
[X] man36.tgz
[X] game36.tgz
[ ] xbase36.tgz
[ ] xetc36.tgz
[ ] xshare36.tgz
[ ] xfont36.tgz
[ ] xserv36.tgz

File Name? (or 'done') [bsd.mp] Enter

     
    接著輸入 -game36.tgz 來取消 game36.tgz 的選取
    The following sets are available. Enter a filename, 'all' to select
all the sets, or 'done'. You may de-select a set by prepending a '-'
to its name.

[X] bsd
[X] bsd.rd
[X] bsd.mp
[X] base36.tgz
[X] etc36.tgz
[X] misc36.tgz
[X] comp36.tgz
[X] man36.tgz
[X] game36.tgz
[ ] xbase36.tgz
[ ] xetc36.tgz
[ ] xshare36.tgz
[ ] xfont36.tgz
[ ] xserv36.tgz

File Name? (or 'done') [xbase36.tgz] -game36.tgz

     
    確定了安裝的元件之後我們輸入 done 來繼續下一個步驟
    The following sets are available. Enter a filename, 'all' to select
all the sets, or 'done'. You may de-select a set by prepending a '-'
to its name.

[X] bsd
[X] bsd.rd
[X] bsd.mp
[X] base36.tgz
[X] etc36.tgz
[X] misc36.tgz
[X] comp36.tgz
[X] man36.tgz
[ ] game36.tgz
[ ] xbase36.tgz
[ ] xetc36.tgz
[ ] xshare36.tgz
[ ] xfont36.tgz
[ ] xserv36.tgz

File Name? (or 'done') [game36.tgz] done

     
    這裡我們按 Enter 來開始下載剛剛所選取的元件
    並輸入 done 來繼續下個步驟
    Ready to install sets? [yes] Enter
Getting bsd ...
100% |**************************************************| 5232 KB 01:42
Getting bsd.rd ...
100% |**************************************************| 4614 KB 01:28
Getting bsd.mp ...
100% |**************************************************| 5285 KB 01:42
Getting base36.tgz ...
100% |**************************************************| 31396 KB 10:08
Getting etc36.tgz ...
100% |**************************************************| 1655 KB 00:32
Getting misc36.tgz ...
100% |**************************************************| 2193 KB 00:42
Getting comp36.tgz ...
100% |**************************************************| 18232 KB 05:52
Getting man36.tgz ...
100% |**************************************************| 6792 KB 02:12

Sets can be located on a (m)ounted filesystem; a (c)drom, (d)isk or (t)ape
device; or a (f)tp, (n)fs or (h)ttp server.
Where are the install sets? (or 'done') done

     
     
  7.系統設定
     
    這裡我們按 Enter 來啟動 ssh daemon(遠端加密連線), 否則請按 n 取消這項功能
    Start sshd(8) by default? [yes] Enter
     
    由於先前我們並沒有選取 Xwindow 元件, 所以輸入 n 表示不使用, 否則請按 Enter 表示預設啟用
    Do you expect to run the X Window System? [yes] n
     
    如果您是使用標準的輸出輸入裝置, 也就是直接連接在主機上的鍵盤與螢幕
    請直接按 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] Asia
What sub-timezone of 'Asia' are you in? ('?' for list) Taipei
Setting local timezone to 'Asia/Taipei'...done.

     
    接著系統會產生各項裝置點 (也就是 /dev 資料夾), 這會花上一點點的時間.
   

並安裝開機的一些設定

    Making all device nodes...done.
Installing boot block...
boot: /mnt/boot
proto: /usr/mdec/biosboot
device: /dev/rwd0c
/usr/mdec/biosboot: entry point 0
proto bootblock size 512
/mnt/boot is 3 blocks x 16384 bytes
fs block shift 2; part offset 63; inode block 120, offset 3624
using MBR partition 3: type 166 (0xa6) offset 63 (0x3f)
done.

     
    到這裡就表示已經成功的安裝好系統摟!!
    輸入 halt 來重開機就可以進入系統了 (記得要將開機光碟取出來喔XD)
    CONGRATULATIONS! 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
syncing disks... done

The operating system has halted.
Please press any key to reboot.

FreeBSD下构建安全的Web服务器 ZT:【上一篇】
NetBSD+AMP+eAccelerator+mediawiki+Discuz!:【下一篇】
【相关文章】
  • 在OpenBSD下配置DHCP服务器
  • 配置用于OpenBSD(3.9)的PXE网络启动、FTP安装服务器(PDF电子档下载)
  • OpenBSD的系统引导过程
  • 用OpenBSD 作 DHCPD SERVER
  • 配置用于OpenBSD(3.9)的PXE网络启动,FTP安装服务器(PDF下载)
  • OpenBSD tips 2
  • OpenBSD tips 2
  • OpenBSD下添加新硬盘.分区.格式化.挂载
  • OpenBSD下添加新硬盘.分区.格式化.挂载
  • OpenBSD内核配置详解
  • 【随机文章】
  • [UMU WSH 教程](14) 天下无敌 WMI 介绍
  • 字节对齐的影响因素
  • 基本路由器的检验命令
  • 亲密接触ASP.Net(14)
  • “应用”万兆以太网(4)
  • Linux内核调试工具:Kdb应用指南(1)
  • 菜鸟宝典:常用的网络命令集
  • 关于HP的student ID
  • HP-UX系统和网络管理Ⅰ--笔记5
  • 我的意思,在渐变时,可以从有色渐变到透
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 软讯网络 All Rigths Reserved.