OpenBSD 簡介與安裝

类别:软件工程 点击:0 评论:0 推荐:
1.0 – 介紹 OpenBSD 1.1 – 什麼是OpenBSD? 1.2 -? OpenBSD可以在什麼系統執行? 1.3 -? OpenBSD 真的是免費的嗎? 1.4 – 為何我要用到OpenBSD? 1.5 – 誰在維持 OpenBSD的發展與運作?

?

1.1 – 何謂 OpenBSD?

OpenBSD 計劃產生一個自由有用地、跨平台4.4BSD的仿UNIX操作系統. 我們所重視的地方在輕便可攜帶性高,標準規格化,正確性以及它的安全性. OpenBSD 支援SVR4 (Solaris), FreeBSD, Linux, BSDI, SunOS, and HPUX 的二進位環境的原始系統.

?

1.2 - OpenBSD可以在什麼系統執行?

OpenBSD 2.7 可以在以下平台執行:

i386 - CD bootable sparc - CD bootable hp300 amiga mac68k powerpc pmax mvme68k

pmax, powerpc 的部份並未包含在2.7的光碟裡.不過它們可以從任何OpenBSD ftp 的網站中下戴.

bootable 指OpenBSD 可以從光碟中直接啟動. 這些啟動光碟可以數種硬體平台上啟動,(詳見第三節說明).

先前OpenBSD版本同時包含數種平台的版本:

arc – 從2.4版以後移除, 但可以在OpenBSD 2.3版本中找到. mvme88k alpha – 可以在未來的版本中再出現.

詳見8.12說明多處理器的支援.

1.3 - OpenBSD 真的是免費的嗎?

OpenBSD 合部都是免費的。 OpenBSD的所有部分都有合理版權期限允許使用者自由分配。如此一來不管是個人或是商業用途,都可以有效地重複利用大部份OpenBSD原始碼。OpenBSD可以包含除了由原始BSD版本所許可範圍之外更多的限制。有版權的軟體並不能包括在正規發行的OpenBSD版本中。這是打算可以保障OpenBSD可以自由地使用。例如,OpenBSD可以在政府機關,非營利事業機構,商業組織中自由地讓個人或大專院校學生或老師使用。

欲讀取更多的公開許可證,可以到以下網站中閱讀:

http://www.openbsd.org/policy.html.

OpenBSD的維護者從他們自己所擁有的資源來支援發展計畫使其茁壯。例如程式設計所花的時間,架設多種平台設備,利用網路資源來發佈OpenBSD,使用者可以自由享用。他們並且花時間回答使用者所遇見的問題並研究解決使用者發現錯誤的報告。

OpenBSD 發展者並不是獨力完成,而是大家聚集自己一點小小的貢獻、時間、設備和資源來合力完成,因此造成各個版本間有很大的差異。

?

1.4 -為何要用到OpenBSD?

新手最常想知道OpenBSD 有沒有比其他免費UNIX-like 系統好用. 這個問題並沒有答案,而且有數不盡(無用)的主題被激烈地討論著。不管在任何情況之下,千萬不要在OpenBSD 的mailing list中問相關的問題。

以下列出一些我們認為OpenBSD是一個有用的作業系統的理由. OpenBSD 到底好不好只有你自己可以回答。

OpenBSD 可以在多種不同平台上作業. OpenBSD 要考慮完成眾多UNIX-like作業系統的專業安全性,必須要花費長逹一年半的時間並具備超過十種的原始碼的篩選而成。 OpenBSD 系統原始碼就像UNIX-like的系統完全不收任何費用. OpenBSD 在分散式環境中,整合了適合建立防火牆(firewalls)的先進技術與個人網路服務。 OpenBSD 的優勢來自於各個區域強大時時進行發展過程,在程式設計師與最終使用者的共同社區中,提供了新興的技術的工作機會。 OpenBSD 提供了一般人參與發展與測試這個產品的機會。

?

1.5 -誰在維持 OpenBSD的發展與運作?

OpenBSD的維護來自各地不同的國家的發展小組。這個計畫的協調來自於位於加拿大的Theo de Raadt。

?

2.0- 磁碟安裝 如何在OpenBSD的安裝當中設定磁碟標籤

OpenBSD安裝的主要部分之一就是建立你最初的標籤。這會直接的發生在(對i386的使用者)格式化硬碟之後。在安裝期間你用磁碟標籤去建立含有不同的掛入點的磁碟。在安裝期間,你可以從磁碟標籤內部去設定你的掛入點,但這不是完全必要的考慮,因為以後你將會被提示去確認你所做的選擇。不過它會使你的安裝過程稍微順利一點。

既然在安裝期間,你不用有任何的標籤存在,但是它們將來還是要被設定。你所要建立的第一個標籤設定為’a’。這個標籤將會是你要安裝的地方(/…)你可以看見電腦所提出的分割建議以及大小。建議你要成為伺服器主機至少要單獨的設定這些標籤。如果你只是要當一般的電腦使用者只要建立一的根目錄(/)就可以了。當你要建立分割你最初的root partition (`a` label ),記住要保持一些空間給你的swap標籤。現在這些基礎的說明已經介紹完畢,這裡有一個例子去示範如何在安裝過程中使用標籤。在這第一個例子中假設 OpenBSD 將是這台電腦上唯一的作業系統,以及將做完整安裝。

If this disk is shared with other operating systems, those operating systems

should have a BIOS partition entry that spans the space they occupy completely.

For safety, also make sure all OpenBSD file systems are within the offset and

size specified in the 'A6' BIOS partition table.? (By default, the disklabel

editor will try to enforce this).? If you are unsure of how to use multiple

partitions properly (ie. seperating /,? /usr, /tmp, /var, /usr/local, and other

things) just split the space into a root and swap partition for now.

這裡介紹了一堆就是要你開始分割磁區

# using MBR partition 3: type A6 off 63 (0x3f) size 4991553 (0x4c2a41)

?

Treating sectors 63-16386300 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)

> d a

> a a

offset: [63]

size: [16386237] 64M

Rounding to nearest cylinder: 131040

FS type: [4.2BSD]

mount point: [none] /

fragment size: [1024]

block size: [8192]

cpg: [16]

> a b

offset: [131103]

size: [16255197] 64M

Rounding to nearest cylinder: 131040

FS type: [swap]

?

在這個掛入點,我們設定了64M的root partition空間給/,以及64M的swap partition空間。注意!電腦內定的offset初始值是63,這就是你所要的值。當它設定為這個大小之後,磁碟標籤會將你的設定的大小顯示在這個區段。不管如何,你並不需要去輸入大小在相同的地方。在這個例子中你也可以注意到電腦會自動將swap的磁碟標籤設定為`b`。這個正確的假定就跟一般核心程式會在標示為`b`的磁碟上找到swap一樣,而且你也恰好可以跟著這個指導方針去設定`b`當你的swap partition。

在下一的例子將會讓你略過剛剛那兩個設定去建立更多標籤。這代表著它並不會完整的安裝,像這些大小並不夠去安裝OpenBSD全部的東西。顯示建立所有的分割區只是會不斷的重覆而已。

?

> a d

offset: [262143]

size: [16124157] 64M

Rounding to nearest cylinder: 131040

FS type: [4.2BSD]

mount point: [none] /tmp

fragment size: [1024]

block size: [8192]

cpg: [16]

> a e

offset: [393183]

size: [15993117] 64M

Rounding to nearest cylinder: 131040

FS type: [4.2BSD]

mount point: [none] /var

fragment size: [1024]

block size: [8192]

cpg: [16]

在上面這個練習,有二件事情你要注意到。第一件,offset會自動幫你算出下一個適當的步驟。當做到這邊的安裝時,你根本不需要去改變它的offset;另外就是標籤`c`必須要跳過,因為標籤`c`是代表著所有的磁碟空間。因為這樣,所以你在任何時候都不能去設定它。

一旦你的標籤全部設定完成之後,要將所有設定的標籤寫入磁碟,而且離開這個設定磁碟標籤的程式。要將所有的東西寫入磁碟並離開(而且繼續安裝)就輸入下面的指令:

> w

> q

所有擁有很多驅動程式的人請注意!假如你的BIOS沒有辦法去支撐一個驅動程式的大小,OpenBSD也同樣無法去支援BIOS。不同的OpenBSD也許可以去控制你的驅動程式,使它剛剛好。如果你是在一個BIOS沒有支援你的驅動程式的環境之下,你可以試著去使用Maxtor EZ的驅動程式或者是其他類似的產品。

一旦你的系統被安裝,你就不需要太常去使用到磁碟標籤。但有時候你還是必須要去使用到,當你想要對磁碟作增加、移除或者是重新調整的時候。你必須要做的第一件事情就是先查看你的磁碟標籤的情況。去做這個簡單的輸入:

# disklabel wd0 _d a  刪除分割區A

> _a a  建立分割區A

offset: [63] _按enter

size: [16386127] _64M

Rounding to nearest cylinder: 131040

FS type: [4.2BSD] _按enter

Mount point: [none] _/

Fragment size: [1024] _按enter

Block size: [8192] _按enter

Cpg: [16] _按enter

> _a b  建立分割區B

offset: [131103] _按enter

size: [16255197] _64M

Rounding to nearest cylinder: 131040

FS type: [swap] _按enter

> _a d  建立分割區D

offset: [262143] _按enter

size: [16124157] _64M

Rounding to nearest cylinder: 131040

FS type: [4.2BSD] _按enter

Mount point: [none] _/tmp

Fragment size: [1024] _按enter

Block size: [8192] _按enter

Cpg: [16] _按enter

> _a e  建立分割區E

offset: [393183] _按enter

size: [15993117] _64M

Rounding to nearest cylinder: 131040

FS type: [4.2BSD] _按enter

Mount point: [none] _/var

Fragment size: [1024] _按enter

Block size: [8192] _按enter

Cpg: [16] _按enter

> _a g  建立分割區G

offset: [524223] _按enter

size: [15862077] _300M

Rounding to nearest cylinder: 614880

FS type: [4.2BSD] _按enter

Mount point: [none] _/usr

Fragment size: [1024] _按enter

Block size: [8192] _按enter

Cpg: [16] _按enter

> _a h  建立分割區H

offset: [1139103] _按enter

size: [16386127] _*? 打*號的意思是要將剩下的空間全部用掉

FS type: [4.2BSD] _按enter

Mount point: [none] _/home

Fragment size: [1024] _按enter

Block size: [8192] _按enter

Cpg: [16] _按enter

> _w 寫入硬碟

> _q  離開分割硬碟程式

You will now have the opportunity to enter filesystem information information for wd0.

You will be prompted for the mount point (full path, including the prepending ‘/’ character) for each BSD partition on wd0.? Enter “none” to skip a partition or “done” when you are finished.

?

The following partitions will be used for the root filesystem and swap:

??????? Wd0a ???? /

??????? Wd0b????? swap

?

Mount point for wd0d (size=65520k) [/ tmp, RET, none, or done]? _ 按enter

Mount point for wd0e (size=65520k) [/ var, RET, none, or done]? _ 按enter

Mount point for wd0g (size=307440k) [/ usr, RET, none, or done]? _ 按enter

Mount point for wd0h (size=192656k) [/ home, RET, none, or done]? _ done

讓你檢查你的掛入點是否正確,沒有問題後再打入done就可以了!

?

Nowq you can select another disk to initialize.? ( Do not re-select a disk you have already entered information for).? Available disks are:

Wd0

Wd1

?

Which one? [ done]

問你要不要再選擇其它硬碟做分割。

You have configured the following devices and mount points:

Wd0a /

Wdod / tmp

Wd0e / var

Wd0e / usr

Wd0h / home

?

Filesystems will now be created on these devices.

If you made any mistakes, you way edit this now.

Edit using ed? [n]_ 問你要不要校正?如果沒錯就按enter略過

The next step will overwrite any existing data on :

跟你說再來的步驟會直接寫入現有的資料上。

??????????????? wd0a wd0d wd0e wd0g wd0h

Are you really sure that you’re ready to proceed? [n] _y 問你要不要繼續

[…]

?

you will now be given the opportunity to configure the network. This will be useful if you need to transfer the installation sets via FYP, HTTP, or NFS. Even if you choose not to transfer installation sets that way, this information will be preserved and copied into the new root filesystem.

接著進入網路設定的部分

Configure the network [y]

Enter system hostname (short form): [ ] _cad5   設定區網的主機名稱

Enter DNS domain name: [ ] _ net47.ee.oit.edu.tw 設定本身的主機名稱

?

If you have any devices being configured by a DHCP server

It is recommended that you do not enter a default route or any name server.

?

You may configure the following network interfaces (the interfaces marked with [X] have been successfully configured):

電腦會自動幫你偵測到你所擁有的網路卡,你只要作選擇就可以了!

??????? [ ] es3

??????? [ ] fxp0

Configure which interface? (or, enter ‘done’ ) [es3]

IP address (or ‘dhcp’)? [ ] _192.192.73.67

Symbolic (host) name? [ cad5]

Netmask ? [255.255.255.0]

Your network interface might require non-default media directives. The default media is :

?? Media: Ethernet 100baseTX half-duplex

This is a list of supported media:

??????? Media autoselect

Media 100baseTX mediaopt full-duplex

Media 100baseTX mediaopt half-duplex

Media 100baseTX

Media 100baseT mediaopt full-duplex

Media 100baseT

Media 100baseT mediaopt half-duplex

If the default is not satisfactory, and you wish to use another media, copy that line from above (ie. “media 100baseTX”)

Media directives? [ ] 按enter

?

You may configure the following network interfaces ( the interfaces marked with [X] have been successfully configured ) :

[X ] es3

[? ] fxp0

設定網路的IP位址

Configure which interface? (or, enter `done` ) [done] _按enter

Enter IP address of default route: [none] _192.192.73.1

Enter IP address of primary nameserver: [none] _192.192.73.2

Would you like to use the nameserver now? [y] _按enter

?

You will now be given the opportunity to escape to the command shell to do any additional network configuration you may need.? This may include adding additional routes, if needed.? In addition, you might take this opportunity to redo the default route in the event that it failed above.

Escape to shell? [n] _

問你要不要去改變現有的shell ?

?

/dev/wd0a on /mnt type ffs ( local )

/dev/wd0d on /mnt/tmp type ffs ( local )

/dev/wd0e on /mnt/var type ffs ( local )

/dev/wd0g on /mnt/usr type ffs ( local )

/dev/wd0h on /mnt/home type ffs ( local )

?

Please enter the initial password that the root account will have.

Password ( will not echo ): _0710

Password ( again ): _0710

設定密碼

?

It is now time to extract the installation sets onto the hard disk.? Make sure the sets are either on a local device ( i.e. tape ,CD-ROM ) or on a network server.? You will have the chance to repeat this step or to extract sets from several places, so you don`t have to try to load all the sets in one try and can recover from some errors.

選擇安裝路徑

Install from ( f )tp, ( h )ttp, ( t )ape, ( C )D-ROM, ( N )FS or local ( d )isk? _c

The following CD-ROM devices are installed on your system; please select the CD-ROM device containing the partition with the installation set:

acd0

cd0

Which is the CD-ROM with the installation media? [abort] acd0

電腦會自動幫你偵測到你的CD-ROM device。選擇你要的!

Partition? [ C ] _內定為C磁碟

?

There are two CD-ROM filesystem types currently supported by this program:

?Cd9660??????? ISO-9660

?Ffs??????????? Berkeley Fast Filesytem

?

Which filesystem type? [cd9660]

Enter the directory relative to the mount point that

Contains the file. [ /i386 ] _/i386  輸入擋案路徑

?

You will now be asked for files to extract. ?N addition to the files listed in the selector you may enter any file located in /i386.? you can also enter `all` to install all the standard sets, or `list` to list the files available in /i386.

When you are done selecting files, enter `done`.

Some of these sets are required for your install and some are optional ---

Consult the intallation notes if you are not sure which sets are required!

?

The following sets are available for extraction.

Enter filename, `list` , `all` , or `done`.

You nay de-select a set by prepending? a `_` to it`s name.

選擇你要的套件

[ X ] base25.tar.gz

[ X ] etc25.tar.gz

[? ] misc25.tar.gz

[? ] comp25.tar.gz

[? ] man25.tar.gz

[? ] game25.tar.gz

[? ] xbase25.tar.gz

[? ] xshare5.tar.gz

[? ] xfont25.tar.gz

[? ] xserv25.tar.gz

[ X ] bsd

File name [ ]? _* 輸入*號代表全選,會出現以下的劃面,告訴你已經全部選取了!

The following sets are available for extraction.

Enter filename, `list` , `all` , or `done`.

You nay de-select a set by prepending? a `_` to it`s name.

?

[ X ] base25.tar.gz

[ X ] etc25.tar.gz

[ X ] misc25.tar.gz

[ X ] comp25.tar.gz

[ X ] man25.tar.gz

[ X ] game25.tar.gz

[ X ] xbase25.tar.gz

[ X ] xshare5.tar.gz

[ X ] xfont25.tar.gz

[ X ] xserv25.tar.gz

[ X ] bsd

File name [ ]? _-game* 代表將已選取的`game`項目去除!會再出現一次你所要按裝的套件。

The following sets are available for extraction.

Enter filename, `list` , `all` , or `done`.

You nay de-select a set by prepending? a `_` to it`s name.

?

[ X ] base25.tar.gz

[ X ] etc25.tar.gz

[ X ] misc25.tar.gz

[ X ] comp25.tar.gz

[ X ] man25.tar.gz

[? ] game25.tar.gz

[ X ] xbase25.tar.gz

[ X ] xshare5.tar.gz

[ X ] xfont25.tar.gz

[ X ] xserv25.tar.gz

[ X ] bsd

File name [ ]? _done 如果沒問題就打入done,結束選取套件。

Ready to extract selected file sets? [y]? 準備好開始按裝剛剛所選取的套件?

?

?

/i386/base25.tar.gz:

100%?? |***************************************|? 17774KB? 00:00 E

TA

/i386/etc25.tar.gz:

100%?? |***************************************|??? 161KB? 00:00 E

TA

/i386/bsd:

100%?? |***************************************|?? 2281KB? 00:00 E

TA

/i386/misc25.tar.gz:

100%?? |***************************************|?? 1637KB? 00:00 E

TA

/i386/comp25.tar.gz:

100%?? |***************************************|?? 11481KB? 00:00 E

TA

/i386/man25.tar.gz:

100%?? |***************************************|??? 3543KB? 00:00 E

TA

/i386/xbase25.tar.gz:

100%?? |***************************************|??? 5376KB? 00:00 E

TA

/i386/xshare25.tar.gz:

100%?? |***************************************|??? 1482KB? 00:00 E

TA

/i386/xfont25.tar.gz:

100%?? |***************************************|??? 6017KB? 00:00 E

TA

/i386/xserv25.tar.gz:

100%?? |***************************************|?? 15188KB? 00:00 E

TA

?

Extract more sets? [ n ]? 問你要不要再作更多的設定

Copying fstab … done.

Copying hostname .x10…done

Copying hosts … done.

Copying myname … done.

Copying mygate … done.

Copying resolv .conf … done.

Select a time zone for your location.? Timezones are represented on the system by a directory structure rooted in “/usr/share/timezone”.? Most timezones can be selected by entering a token like “MET” or “GMT-6”.? Other zones are grounped by continent.? With detailed zone information.

Separated by a slash (“ / ”), e.g .? “US/Pacific” or “Canada/Mountain”.

?

To get a listing of what`s available in /usr/share/zoneinfo, enter “ ? ” at the prompts below.

?

What timezone are you in [ `?` for list ] [GMT]? _? ?打?查看有那些時區

Africa/???? Chile/??? GMT???? Jamaica???? Navajo????? UCT

America/?? Cuba???? GMT+0?? Japan?????? PRC??????? US/

Antarctica/?? .????????? .????????? .?????????? .????????? .

Arctic/?????? .???????? .????????? .?????????? .????????? .

Asia/?????? ?.???????? .????????? .?????????? .????????? .

? .????????? .???????? .????????? .?????????? .????????? .

.????????? .???????? .????????? .?????????? .????????? .

What timezone are you in [ `?` for list ] [GMT]? _Asai ?輸入亞洲(Asai)

There are several timezones available with zone `Asai`

Select a sub-timezone [`?` for list]:_? 打?查看有那些地區可用

Atlantic??????? Eastern???????? Pacific

?? .????????????? .????????????? .

?? .????????????? .????????????? .

?? .????????????? .????????????? .

Select a sub-timezone [`?` for list]:_Taipei??? 輸入taipei,之後會進入一連串的說明畫面

You have selected timezone “Asai/Taipei” .

Installing timezone link…done

Installing boot block…

Boot:? /mnt/boot

Proto:? /usr/mdec/biosboot

Device: /dev/rwd0c

/usr/mdec/biosboot: entry point 0

proto bootblock size 512

room for 12 filesystem blocks at 0x16f

Will load 6 blocks of size 8192 each.

Using disk geometry of 63 sectors and 128 heads.

0: 19 @( 0? 93? 45 )? (5903-5921)

1: 63 @( 0? 94? 1 )? (5922-5984)

2: 14 @( 0? 95? 1 )? (5985-5998)

/mnt/boot:? 3? entries total

using MBR partition 3:? type 166? (0xa6) offset 63 (0x3f)

?

Do you expect to run X window on this machine? [ y or n ] _y

問你要不要在這台機器上執行X window?

Enabling machdep.allowaperture.? Read xf86(4) for more information.

?

Making all device nodes (by running /dev/MAKEDEV) ……done

Unmounting filesystems… /mnt/usr /mnt/var /mnt/tmp /mnt … Done

Done.

接著會進入恭喜你完成安裝OpenBSD的畫面。

CONGRATULATIONS!? You have successfully installed OpenBSD!? To boot the installed system, enter halt at the command prompt.? Once the system has halted, reset the machine and boot from the disk.

?

#_reboot  執行重新開機

?

大功告成!!!

?

?

本文地址:http://com.8s8s.com/it/it35817.htm