stable是非常稳定的版本, release是发行版, 还有一些错误, 慢慢会发展成stable版, current是新功能版, 属最新技术的版本! 一般主要使用的是release, stable, current不支持使用, 它的错误较多, 一般用户使用不方便!具体信息可查看OpenBSD主站上的介绍!
主要安装方式:CD-ROM, FTP, LocalFilesystem等!
安装前的准备
一、 下载所需要的文件:floppy33.fs, 这可从一般的OpenBSD FTP站点上下载!
国内的OpenBSD很少, 我一个都没找到! 在安装时从国外的站点上下载文件很慢, 我上次晚上安装时到了那里就不管理它了, 到第二天早上才去继续安装!
下面说说启动盘的镜像文件:floppy33.fs, floppyB33.fs, floppyC33.fs
floppyB33.fs 服务器版本, 支持很多的RAID, 和一些SCSI。但一些基本的SCSI, ISA NICs, EISA都删除了!
floppyC33.fs 笔记本电脑版本, 支持Cardbus, PCMCIA.
下面是安装所需要的一些基本文件, 我把它下载下来放到内部网的FTP上了, 这样安装起来快一些:
二、制作启动盘
现在我们已下载了软盘镜像, 开始制作启动盘
1. Unix 下:
我是在slackware上制作的, 我在windows 下用rawrite2.exe没作成功!
# dd if=floppy33.fs of=/dev/fd0 bs=32k
主要工具都放在FTP站点上的TOOLS目录里, 主要有: rawrite, fdimage, ntrw, rawrite不能在windows NT, windows 2000 or XP下使用!
相关操作可自己找资料, 都很简单, 在DOS下操作!
现在我们要收集自己计算机上的信息:什么平台, 硬盘上的资料要不要备份?, 网卡信息(IP,subnet masks, gateway, DNS) 一些isa卡可以安装时以dmesg查看!
已下载了安装所需要的文件!现在我们进行的是FTP安装, 我将下载的文件放在FTP上, 目录是openbsd/OpenBSD下!这样安装快很多!
安装过程
用软盘启动系统!我们会看到蓝色背景的字!这里是OpenBSD的开机信息!然后我们会看到下面的这个:
(I)nstall, (U)pgrade or (S)hell? I
选择I, 安装新系统, 如果是从原来的系统上升级则选择U, 或者你可以选择S, 在SHELL下操作, 其实当你在安装过程序中自己有某些设置错误Ctrl + c中止后, 也是回到这个SHEEL下操作的!在SHEEL下执行install就是安装系统。
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? [n] y
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? [n] y
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
Treating sectors 63-6303024 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 [unit] - print label.
M - show entire OpenBSD man page for disklabel.
e - edit drive parameters.
a [part] - add new partition.
b - set OpenBSD disk boundaries.
c [part] - change partition size.
d [part] - delete partition.
D - set label to default.
g [d|b] - Use [d]isk or [b]ios geometry.
m [part] - modify existing partition.
n [part] - set the mount point for a partition.
r - recalculate free space.
u - undo last change.
s [path] - save label to file.
w - write label to disk.
q - quit and save changes.
x - exit without saving changes.
X - toggle expert mode.
z - zero out partition table.
? [cmnd] - this message or command specific help.
Numeric parameters may use suffixes to indicate units:
'b' for bytes, 'c' for cylinders, 'k' for kilobytes, 'm' for megabytes,
'g' for gigabytes or no suffix for sectors (usually 512 bytes).
Non-sector units will be rounded to the nearest cylinder.
Entering '?' at most prompts will give you (simple) context sensitive help.
>
d a 删除a分区
a a 创建a分区
p g 查看分区, 大小以G显示
p m 查看分区, 大小以M显示
下面我们挂载分区:
wd0b will be used for swap space.
Mount point for wd0d (size=122976k), none or done? [/tmp] Enter
Mount point for wd0e (size=82152k), none or done? [/var] Enter
Mount point for wd0g (size=2097144k), none or done? [/usr] Enter
Mount point for wd0h (size=4194288k), none or done? [/home] Enter
Mount point for wd0d (size=122976k), none or done? [/tmp] done
Done - no available disks found.
You have configured the following partitions and mount points:
wd0a /
wd0d /tmp
wd0e /var
wd0g /usr
wd0h /home
Are you really sure that you're ready to proceed? [n] y
/dev/rwd0a: 307440 sectors in 305 cylinders of 16 tracks, 63 sectors
200MB in 20 cyl groups (16 c/g, 7.88MB/g, 1920 i/g)
/dev/rwd0b: 245952 sectors in 244 cylinders of 16 tracks, 63 sectors
300MB in 16 cyl groups (16 c/g, 7.88MB/g, 1920 i/g)
/dev/rwd0d: 164304 sectors in 163 cylinders of 16 tracks, 63 sectors
100MB in 11 cyl groups (16 c/g, 7.88MB/g, 1920 i/g)
/dev/rwd0e: 4194288 sectors in 4161 cylinders of 16 tracks, 63 sectors
100MB in 261 cyl groups (16 c/g, 7.88MB/g, 1920 i/g)
/dev/rwd0f: 8388576 sectors in 8322 cylinders of 16 tracks, 63 sectors
2300MB in 521 cyl groups (16 c/g, 7.88MB/g, 1920 i/g)
/dev/wd0a on /mnt type ffs (rw, asynchronous, local, ctime=Thu Oct 10 21:
50:36 2 002)
/dev/wd0h on /mnt/home type ffs (rw, asynchronous, local, nodev, nosuid,
ctime=Thu Oct 10 21:50:36 2002)
/dev/wd0d on /mnt/tmp type ffs (rw, asynchronous, local, nodev, nosuid,
ctime=Thu Oct 10 21:50:36 2002)
/dev/wd0g on /mnt/usr type ffs (rw, asynchronous, local, nodev, ctime=Th
u Oct 10 21:50:36 2002)
/dev/wd0e on /mnt/var type ffs (rw, asynchronous, local, nodev, nosuid,
ctime=Th u Oct 10 21:50:36 2002)
Available interfaces are: ne3.
Which one do you wish to initialize? (or 'done') [ne3] Enter
Symbolic (host) name for fxp0? [puffy] Enter
The default media for fxp0 is
media: Ethernet autoselect (100baseTX full-duplex)
Do you want to change the default media? [n] Enter
IP address for fxp0? (or 'dhcp') 202.116.92.235
Netmask? [255.255.255.0] 255.255.254.0
Done - no available interfaces found.
DNS domain name? (e.g. 'bar.com') [my.domain] OpenBSD.localhost
DNS nameserver? (IP address or 'none') [none] 202.116.64.1
Use the nameserver now? [y] Enter
Default route? (IP address, 'dhcp' or 'none') 202.116.92.1
add net default: gateway 202.116.92.1
Edit hosts with ed? [n] Enter
Do you want to do any manual network configuration? [n] Enter
Password for root account? (again)
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? f
Does the server support passive mode ftp? [ y ]
Password? [ will no echo ] password
all the sets, or 'done'. You may de-select a set by prepending a '-'
to its name.
[X] bsd
[ ] bsd.rd
[X] base33.tgz
[X] etc33.tgz
[X] misc33.tgz
[X] comp33.tgz
[X] man33.tgz
[X] game33.tgz
[ ] xbase33.tgz
[ ] xshare33.tgz
[ ] xfont33.tgz
[ ] xserv33.tgz
File Name? (or 'done') [bsd.rd] all
The following sets are available. Enter a 2004413214015.htm, '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] base33.tgz
[X] etc33.tgz
[X] misc33.tgz
[X] comp33.tgz
[X] man33.tgz
[X] game33.tgz
[X] xbase33.tgz
[X] xshare33.tgz
[X] xfont33.tgz
[X] xserv33.tgz
File Name? (or 'done') [done] doen
Getting bsd ...
100% |**************************************************| 4472 KB 00:03
Getting bsd.rd ...
100% |**************************************************| 4190 KB 00:02
Getting base33.tgz ...
100% |**************************************************| 30255 KB 00:21
Getting etc33.tgz ...
100% |**************************************************| 1469 KB 00:01
Getting misc33.tgz ...
100% |**************************************************| 1828 KB 00:01
Getting comp33.tgz ...
100% |**************************************************| 16207 KB 00:13
Getting man33.tgz ...
100% |**************************************************| 5921 KB 00:04
Getting game33.tgz ...
100% |**************************************************| 2545 KB 00:01
Getting xbase33.tgz ...
100% |**************************************************| 9073 KB 00:06
Getting xshare33.tgz ...
100% |**************************************************| 1574 KB 00:02
Getting xfont33.tgz ...
100% |**************************************************| 30666 KB 00:21
Getting xserv33.tgz ...
100% |**************************************************| 14948 KB 00:11
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
Extract more sets? [n] Enter
Do you expect to run the X Window System? [y] y
Saving configuration files......done.
Generating initial host.random file ......done.
What timezone are you in? ('?' for list) [US/Pacific] ? 寻求帮助!
Africa/ Chile/ GB-Eire Israel NZ-CHAT Turkey
America/ Cuba GMT Jamaica Navajo UCT
Antarctica/ EET GMT+0 Japan PRC US/
Arctic/ EST GMT-0 Kwajalein PST8PDT UTC
Asia/ EST5EDT GMT0 Libya Pacific/ Universal
Atlantic/ Egypt Greenwich MET Poland W-SU
Australia/ Eire HST MST Portugal WET
Brazil/ Etc/ Hongkong MST7MDT ROC Zulu
CET Europe/ Iceland Mexico/ ROK posix/
CST6CDT Factory Indian/ Mideast/ Singapore posixrules
Canada/ GB Iran NZ SystemV/ right/
What timezone are you in? ('?' for list) [US/Pacific] Asia
然后输入:Shanghai,
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
room for 12 filesystem blocks at 0x16f
Will load 7 blocks of size 8192 each.
Using disk geometry of 63 sectors and 240 heads.
0: 9 @(203 150 55) (3078864-3078872)
1: 63 @(203 151 1) (3078873-3078935)
2: 24 @(203 152 1) (3078936-3078959)
3: 16 @(203 8 47) (3069910-3069925)
/mnt/boot: 4 entries total
using MBR partition 1: type 166 (0xa6) offset 3069360 (0x2ed5b0)
...done.
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.
# reboot
安装后配置
我们安装了基本的系统,但只有最基本的东西, 像内核源代码, ports tree都没安装!
在安装时我们安装了X, 现在我们配置X-windows, 运行xf86cfg设置!OpenBSD的默认桌面是fvwm。
现在我们给系统添加新用户adduser, 在第一次使用时会有一些基本的设置, 如密码使用什么加密, 有好几种, 我选择了最常用的md5。
首先, 我们开始安装内核源代码, 为以后编译内核作准备!
如果你有CD,则只需要从CD中取出src.tar.gz,cd /usr/src 然后tar xvzf src.tar.gz, 上篇, 我们是从FTP安装的, 因此, 我们要下载两个包:src.tar.gz, sys.tar.gz.
ftp://ftp.ca.openbsd.org/pub/OpenBS...i386/sys.tar.gz
下载cvsup-16.1f.tar.gz, 如果没安装X则下载 cvsup-16.1f-no_X.tar.gz
#pkg_add cvsup-16.1f.tar.gz
*default release=cvs
*default delete use-rel-suffix
*default umask=002
*default host=cvsup.uk.openbsd.org
*default base=/cvsup
*default prefix=/cvsup
#If your network link is T1 or faster, comment out the following line.
*default compress
OpenBSD-all
#OpenBSD-src
#OpenBSD-www
#OpenBSD-ports
#OpenBSD-x11
#OpenBSD-xf4
# cd /
# mkdir cvsup
# cd
# cvusp –g –L 2 cvsup-supfile
安装软件同FreeBSD下一样, 以后再说说编译内核吧!
主要cvsup站点:
cvsup.de.openbsd.org
cvsup2.de.openbsd.org
cvsup.hu.openbsd.org
cvsup.fr.openbsd.org
cvsup.ca.openbsd.org
cvsup.usa.openbsd.org
cvsup.kr.openbsd.org
cvsup.no.openbsd.org
cvsup.pt.openbsd.org
anoncvs.de.openbsd.org
rt.fm
skeleton.phys.spbu.ru
cvsup.jp.OpenBSD.org
mirror.osn.de
openbsd.informatik.uni-erlangen.de
OpenBSD-ports - The ports repository
OpenBSD-www - The www repository
OpenBSD-x11 - The XFree86-3 repository
OpenBSD-xf4 - The XFree86-4 repository
OpenBSD-all - All OpenBSD repositories
因为与FreeBSD等配置有点出入, 所以我在这里指出来!
我自己是使用局域网, 所以只介绍这个方面的, 如果有人使用的是PPP方式, 可自行查看官方站点上的FAQ。
可能很多使用OpenBSD的人是从FreeBSD下转过来的, 但OpenBSD的网络设置与FreeBSD有所不同, 它的网络配置没有写进rc.conf, 而是作为单独的文件存放的。
网卡IP存放在/etc/hostname.网卡型号名, 网关存放在/etc/mygate
主机名存放在/etc/myname, 名字服务器地址没变, 存放在/etc/resolv.conf
我们使用ifconfig –a 查看网卡型号:(这个是我已配置好的)
inet 127.0.0.1 netmask 0xff000000
lo1: flags=8008<LOOPBACK,MULTICAST> mtu 33224
ne0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
address: 00:e0:4c:e0:45:0c
media: Ethernet autoselect (10baseT)
inet ***.***.***.*** netmask 0xfffffe00 broadcast ***.***.***.***
pflog0: flags=0<> mtu 33224
pfsync0: flags=0<> mtu 2020
关于这个hostname.*文件的格式:
当然你也可以指定详细的网卡说明:
主机名, 写入/etc/myname.
/etc/resolv.conf, 与别的系统一样的, 这个就不用说了!
到这里我们的OpenBSD系统已安装完成, 以后的操作我会再写出来,还过几天3.4release就要出来了, 到时我升级到3.4再写出来。
有问题可到linuxeden.com的FreeBSD版,我会与你一起讨论。我常混在www.linuxsir.com ( bsd 版), www.chinaunix.net (bsd版), www.freebsdchina.org, www.linuxfans.org, www.cnfug.org 等。
注:本文参考了OpnBSD.org的在线文档, 各位如有不明白的地方可到Openbsd.org主站上观看它的FAQ。,
文章来源于领测软件测试网 https://www.ltesting.net/
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备2023014753号-2
技术支持和业务联系:info@testage.com.cn 电话:010-51297073