| OpenBSD 入门 [转贴 2005-07-07 22:48:45 | 发表者: linky_fan] | |
OpenBSD 入门 OpenBSD, NetBSD, FreeBSD是同门三兄弟!OpenBSD以安全著称, 支持的平台很多!现在主要有三个分支:stable, release, current. 每六个月出一个release! 主要版本号是:3.1stable, 3.3release, 3.4 current. 3.4release 11月1日发行! floppy33.fs 桌面PC版本, 它支持一般的PCI, ISA NICs, IDE, SCSI接口, 还有一些PCMCIA接口。
floppyB33.fs 服务器版本, 支持很多的RAID, 和一些SCSI。但一些基本的SCSI, ISA NICs, EISA都删除了! floppyC33.fs 笔记本电脑版本, 支持Cardbus, PCMCIA. 我想, 一般都是桌面PC, 我自己的就是, 下载floppy33.fs. bsd, bsd.rd, base33.tgz, etc33.tgz, comp33.tgz, man33.tgz, misc33.tgz, game33.tgz, xbase33.tgz,xfont33.tgz, xserv33.tgz, xshare33.tgz.
我还下载了ports.tar.gz, src.tar.gz, sys.tar.gz, 系统安装后这些ports tree, 内核源码都没安装, 要自己手动安装的。 # fdformat /dev/fd0
# dd if=floppy33.fs of=/dev/fd0 bs=32k 2. windows下(请参考OpenBSD主站上的安装指南) erase ^?, werase ^W, kill ^U, intr ^C, status ^T
(I)nstall, (U)pgrade or (S)hell? I 选择I, 安装新系统, 如果是从原来的系统上升级则选择U, 或者你可以选择S, 在SHELL下操作, 其实当你在安装过程序中自己有某些设置错误Ctrl + c中止后, 也是回到这个SHEEL下操作的!在SHEEL下执行install就是安装系统。 Welcome to the OpenBSD/i386 3.3 install program.
This program will help you install OpenBSD in a simple and rational way. At Specify terminal type: [vt220] Enter 选择键盘类型, 一些都是US。 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 Proceed with install? [n] y 下面我们继续安装: Cool! Let's get to it...
You will now initialize the disk(s) that OpenBSD will use. To enable all 选择从哪个硬盘上安装, 我的系统只挂了一个小硬盘, 所以只一个! Available disks are: wd0. 是否整个硬盘都安装OpenBSD, 是. Do you want to use *all* of wd0 for OpenBSD? [no] yes
Treating sectors 63-6303024 as the OpenBSD portion of the disk. Initial label editor (enter '?' for help at any prompt) 现在我们来进行硬盘分区, 这里打入?寻求帮助! Available commands:
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. > 我分了五个区, a 根分区 200M, b 交换分区 300M , d 100M /tmp, e 100M /var , f 最后的全给 /usr, 使用 d删除分区,a 创建分区,p 查看分区情况,q 退出!
d a 删除a分区 a a 创建a分区 p g 查看分区, 大小以G显示 p m 查看分区, 大小以M显示 下面我们挂载分区: The root filesystem will be mounted on wd0a.
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 / 格式化分区: The next step creates a filesystem on each partition, ERASING existing data.
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) 配置主机名 Enter system hostname (short form, e.g. 'foo'): OpenBSD
配置网络: Configure the network? [y] Enter
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 设置root密码, 不会显示出来的! Password for root account? (will not echo)
Password for root account? (again) 现在我们选择安装方式, 我是FTP安装!硬盘安装就设置相应的东西就行了! 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 下面我们设置FTP服务器的地址! 是否要设置代理? FTP, HTTP安装都一样, 如果需要设置一下! HTTP/FTP proxy URL? ( e.g. ‘http://proxy.8080’, or ‘none’ ) [ none ] Entry
查看FTP列表: Do you want to see a list of potential ftp servers? [ y ] n
设置FTP的地址 Server IP address, or hostname ? 我的FTP地址
Does the server support passive mode ftp? [ y ] 设置放置安装文件的目录, 根据自己的设置写目录 Server directory? [ pub/OpenBSD/3.3/i386 ] openbsd/OpenBSD
是否匿名登陆, 不是, 则输入用户名, 密码! Login? [ anonymous ] usernme
Password? [ will no echo ] password 下面是选择要安装的软件包:我试过, 如果你的FTP上有几个包它会显示几个包, 但有几个包是一定要的:bsd, base33.tgz, etc33.tgz, comp33.tgz, man33.tgz. 打入all将选择全部安装: 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 File Name? (or 'done') [bsd.rd] all The following sets are available. Enter a filename, 'all' to select [X] bsd 选择好包后, 开始下载安装: Ready to install sets? [y] Enter
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 现在基本包安装完成!设置一下时区, 还有你以后要不要运行X: Extract more sets? [n] Enter 然后输入:Shanghai, Making all device nodes...done. CONGRATULATIONS! Your OpenBSD install has been successfully completed! 现在重启, 系统已安装完成! ftp://ftp.ca.openbsd.org/pub/OpenBS...i386/src.tar.gz
ftp://ftp.ca.openbsd.org/pub/OpenBS...i386/sys.tar.gz 安装ports tree, 下载ports.tar.gz, 然后copy /usr/ , tar xzvf ports.tar.gz . ftp://ftp.ca.openbsd.org/pub/OpenBS...86/ports.tar.gz
安装cvsup, #ftp://ftp.ca.openbsd.org/pub/OpenBS...p-16.1f..tar.gz
#pkg_add cvsup-16.1f.tar.gz 编辑cvsup-supfile, OpenBSD里的编辑器是mg, 类似于emacs。 #Defaults that apply to all the collections
*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. OpenBSD-all #OpenBSD-src #OpenBSD-www #OpenBSD-ports #OpenBSD-x11 #OpenBSD-xf4 保存, # mg cvsup-supfile
# cd / # mkdir cvsup # cd # cvusp –g –L 2 cvsup-supfile 就可升级ports tree等了! cvsup.uk.openbsd.org]
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-src - The src repository
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 网络配置 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33224
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 我的网卡是ne0, 但不知怎么的, 系统安装好后, 在/etc/中建立的文件却是hostname.ne3, 我只好自己手动改成 hostname.ne0, inet 192.168.0.1 netmask 255.255.255.0 NONE
inet 指定ip地址, netmask指定网络掩码。 inet 10.0.0.38 255.255.255.0 NONE media 100baseTX mediaopt full-duplex
现在指定网关, 修改/etc/mygate, 写入网关IP就行了。 | |
|
标签: linux | |