- 論壇徽章:
- 13
|
本帖最后由 ulovko 于 2013-04-06 11:09 編輯
FROM: http://blog.chinaunix.net/uid-25256412-id-3233391.html
1> 安裝 OpenBSD5.1 的準(zhǔn)備工作
下載地址:ftp://ftp.openbsd.org/pub/OpenBSD/5.1/amd64/install51.iso
官方最新FAQ:ftp://ftp.openbsd.org/pub/OpenBSD/doc/history/obsd-faq49.pdf
官方最新PF:ftp://ftp.openbsd.org/pub/OpenBSD/doc/history/pf-faq49.pdf
簡體中文FAQ 4.6:
obsd_FAQ46.zip
(424.82 KB, 下載次數(shù): 221)
2012-06-05 17:26 上傳
點(diǎn)擊文件名下載附件
簡體中文FAQ 4.8:
obsd_FAQ48.zip
(365.37 KB, 下載次數(shù): 187)
2012-06-09 10:32 上傳
點(diǎn)擊文件名下載附件
install-openbsd01.png (127.57 KB, 下載次數(shù): 505)
下載附件
2012-06-04 14:42 上傳
=== OpenBSD5.1 系統(tǒng)配套歌曲 ===
MP3格式:ftp://ftp.openbsd.org/pub/OpenBSD/songs/song51.mp3
OGG格式:ftp://ftp.openbsd.org/pub/OpenBSD/songs/song51.ogg
=== OpenBSD5.1 系統(tǒng)配套歌曲 ===
2> 請開始安裝 OpenBSD5.1
安裝教程:http://www.openbsd.org/faq/faq4.html#InstStart
啟動計(jì)算機(jī)開始安裝:
install-openbsd02.png (14.48 KB, 下載次數(shù): 460)
下載附件
2012-06-04 14:42 上傳
install-openbsd03.png (13.37 KB, 下載次數(shù): 456)
下載附件
2012-06-04 14:42 上傳
install-openbsd04.png (10.12 KB, 下載次數(shù): 567)
下載附件
2012-06-04 14:42 上傳
install-openbsd05.png (13.46 KB, 下載次數(shù): 491)
下載附件
2012-06-04 14:42 上傳
install-openbsd06.png (8.29 KB, 下載次數(shù): 477)
下載附件
2012-06-04 14:42 上傳
install-openbsd07.png (9.2 KB, 下載次數(shù): 556)
下載附件
2012-06-04 14:42 上傳
install-openbsd08.png (6.53 KB, 下載次數(shù): 450)
下載附件
2012-06-04 14:42 上傳
重啟計(jì)算機(jī):
install-openbsd09.png (13.15 KB, 下載次數(shù): 507)
下載附件
2012-06-04 14:42 上傳
使用剛剛創(chuàng)建的普通用戶登陸:
install-openbsd10.png (12.4 KB, 下載次數(shù): 511)
下載附件
2012-06-04 14:42 上傳
install-openbsd11.png (11.23 KB, 下載次數(shù): 433)
下載附件
2012-06-04 14:42 上傳
登陸后查看郵件:
切換到root,向dmesg@openbsd.org發(fā)送機(jī)器信息為社區(qū)的發(fā)展盡一份心力(PS: 不要老發(fā)虛擬機(jī)信息)!
install-openbsd12.png (9.29 KB, 下載次數(shù): 535)
下載附件
2012-06-04 14:42 上傳
# visudo (如圖中所示,允許wheel組使用sudo ^_^)
install-openbsd13.png (4.6 KB, 下載次數(shù): 521)
下載附件
2012-06-04 14:42 上傳
測試 sudo是否配置成功:
install-openbsd14.png (12.27 KB, 下載次數(shù): 492)
下載附件
2012-06-04 14:42 上傳
3> 簡單認(rèn)識OpenBSD5.1
- # cat /etc/myname (查看主機(jī)名)
- obsd5.kotzu.org
- # cat /etc/hostname.em0 (查看網(wǎng)卡配置)
- dhcp
- # cat /etc/hostname.em0 (靜態(tài)地址會是這樣)
- 192.168.1.11 255.255.255.0 NONE NONE (依次是:inet ipaddress netmask broadcastaddress options)
- # cat /etc/mygate (配置網(wǎng)關(guān)地址)
- 192.168.1.1
- # cat /etc/resolv.conf (配置DNS)
- search kotzu.org
- nameserver 202.106.46.151
- nameserver 202.106.0.20
- lookup file bind
-
install-openbsd15.png (6.34 KB, 下載次數(shù): 452)
下載附件
2012-06-04 14:42 上傳
復(fù)制代碼 4> 關(guān)于boot菜單 /etc/boot.conf
- boot> set timeout 60 (boot delay, 5 seconds by default)
- boot> boot -s (To boot into single-user mode)
- #/bin/sh /etc/netstart (Start the network while in single-user mode)
- boot> boot -s /bsd.old (To boot an old kernel in single-user mode)
- # man boot
- FILES
- /usr/mdec/biosboot first stage bootstrap
- /usr/mdec/pxeboot PXE bootstrap
- /boot system bootstrap
- /etc/boot.conf system bootstrap's startup file
- /bsd kernel image
- /bsd.sp kernel image for single processor machines
- /bsd.mp kernel image for multiprocessor machines
- /bsd.rd kernel image for installation/recovery
- EXAMPLES
- Boot the default kernel:
- boot> boot
- Remove the 5 second pause at boot-time permanently, causing boot to load
- the kernel immediately without prompting:
- # echo "boot" > /etc/boot.conf
- Use serial console. A null modem cable should connect the specified
- serial port to a terminal. Useful for debugging.
- boot> set tty com0
- Invoke the serial console at every boot:
- # echo "set tty com0" > /etc/boot.conf
復(fù)制代碼 5> 使用本地化語言(簡體中文)
- $ ls /usr/share/locale/zh_
- zh_CN.GB18030/ zh_CN.eucCN/ zh_TW.Big5/ zh_TW.eucTW/
- zh_CN.UTF-8/ zh_TW.BIG5/ zh_TW.UTF-8/
- $ vim ~/.profile
- export LANG="zh_CN.UTF-8"
- export LC_CTYPE="zh_CN.UTF-8" (字符類型)
- export LC_COLLATE="zh_CN.UTF-8" (字符對比規(guī)則)
- export LC_TIME="zh_CN.UTF-8" (時間類型)
- export LC_NUMERIC="zh_CN.UTF-8" (數(shù)字類型)
- export LC_MONETARY="zh_CN.UTF-8" (貨幣類型)
- export LC_MESSAGES="zh_CN.UTF-8" (消息/提示類型)
- export LC_ALL="zh_CN.UTF-8"
- :wq
- $ exit (注銷生效)
- 恭喜閣下終于看到母語了^_^
- --------------------------------------------4.8之前的版本可能要用zh_CN.eucCN
- # cd /usr/src/share/locale/ctype
- # vim Makefile
- LOCALES += zh_CN.eucCN
- LOCALESRC_zh_CN.eucCN = zh_CN.eucCN
- LOCALES += zh_CN.UTF-8
- LOCALESRC_zh_CN.UTF-8 = en_US.UTF-8
- :wq
- # cd ..
- # make && make install && make clean
復(fù)制代碼 About eucCN: http://zh.wikipedia.org/wiki/EUC
6> 配置PACKAGE & PORTS & SRC
PACKAGE:- $ vi ~/.profile
- export PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/5.1/packages/`machine -a`/
- # export PKG_PATH=ftp://ftp.jaist.ac.jp/pub/OpenBSD/5.1/packages/`machine -a`/
- export FETCH_PACKAGES=yes
- :wq
- $ exit (注銷生效)
- $ sudo pkg_add -v axel (安裝axel)
- axel-2.4 : libiconv-1.14: ok
- axel-2.4 : gettext-0.18.1p1: ok
- axel-2.4 : ok
- $ axel -V
- Axel version 2.4 (OpenBSD)
- Copyright 2001-2002 Wilmer van der Gaast.
-
- $ sudo pkg_add -v wget (安裝wget)
- wget-1.13.4 : libidn-1.22: ok
- wget-1.13.4 : ok
- $ wget -V
- GNU Wget 1.13.4 built on openbsd5.1.
- ...
- ...
復(fù)制代碼 PORTS & SRC:
- # axel -a 'ftp://ftp.openbsd.org/pub/OpenBSD/5.1/src.tar.gz' (下載src)
- # axel -a 'ftp://ftp.openbsd.org/pub/OpenBSD/5.1/sys.tar.gz' (下載sys)
- # axel -a 'ftp://ftp.openbsd.org/pub/OpenBSD/5.1/ports.tar.gz' (下載ports)
- # axel -a 'ftp://ftp.openbsd.org/pub/OpenBSD/5.1/xenocara.tar.gz' (里面包含顯卡驅(qū)動)
- # cd /usr/src
- # tar -zxvpf ~/src.tar.gz (Installing the Source Code)
- # tar -zxvpf ~/sys.tar.gz (Installing the Sys Code)
- # cd /usr
- # tar -zxvpf ~/ports.tar.gz (Installing the Ports Collection)
- # tar -zxvpf ~/xenocara.tar.gz (Installing the Drivers Collection)
-
xenocara.png (10.77 KB, 下載次數(shù): 513)
下載附件
2012-06-05 16:34 上傳
復(fù)制代碼 Customizing Download Sources:
- # cd /usr/ports/infrastructure/templates
- # cp network.conf.template ../db/network.conf
- # vi ../db/network.conf (其實(shí)默認(rèn)的就不錯,哥們你看著辦吧^_^)
- # vim /etc/mk.conf
- WRKOBJDIR=/usr/obj/ports
- DISTDIR=/usr/distfiles
- PACKAGE_REPOSITORY=/usr/packages
- FETCH_CMD=/usr/local/bin/axel -a -S4
- MASTER_SITE_OVERRIDE=\
- ftp://ftp.openbsd.org/pub/OpenBSD/distfiles/${DIST_SUBDIR}/\
- ftp://ftp.jaist.ac.jp/pub/OpenBSD/distfiles/${DIST_SUBDIR}/
- :wq
復(fù)制代碼- The working directory of ports. This is controlled by the WRKOBJDIR variable, which specifies the directory which will contain the working directories.
- The directory containing distribution files. This is controlled by the DISTDIR variable.
- The directory containing newly built binary packages. This is controlled by the PACKAGE_REPOSITORY variable.
7> PKG_ADD & PORTS 安裝 VIM
ports安裝 VIM:
- # cd /usr/ports
- # make print-index
- # grep -i ^vim INDEX (Finding Software by Name)
- # make search key=vim (Finding by Keyword)
- ...
- ...
- Port: vim-7.3.154p2-no_x11
- Path: editors/vim,-main,no_x11
- Info: vi clone, many additional features
- Maint: Chris Kuethe <ckuethe@openbsd.org>
- Index: editors
- L-deps: STEM->=0.10.38:devel/gettext converters/libiconv
- B-deps: STEM->=0.10.38:devel/gettext STEM->=1.21:textproc/groff archivers/bzip2
- R-deps: STEM->=0.10.38:devel/gettext
- Archs: any
- ...
- ...
- (L-deps->:libraries used by this port B-deps->:lists software that is required to build this port
- R-deps->:non-library software that must be present to actually run this port)
- # cd editors/vim && make install clean
復(fù)制代碼 package安裝 VIM:
- # man pkg_add
- pkg_add can be used to install new packages, to replace existing packages with other flavors
- (option -r) or to update packages to newer versions (option -u) [PS:這個跟FreeBSD可不同哦!]
- # vi ~/.profile (注意這里是root,也需要配置!)
- export PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/5.1/packages/`machine -a`/
- export FETCH_PACKAGES=yes
- :wq
- # exit (注銷生效)
- # pkg_add -v vim (安裝VIM)
- Ambiguous: vim could be vim-7.3.154p2-no_x11 vim-7.3.154p2-gtk2
- (很人性化吧,還有提示的喲!你會發(fā)現(xiàn)ports里面抓,和現(xiàn)在都有這么多不同的vim?
- OpenBSD稱之為Flavors! 其實(shí)就是不同的Option罷了^_^, 閑言少敘,書歸正轉(zhuǎn)!)
- # pkg_add -v vim-7.3.154p2-no_x11
- vim-7.3.154p2-no_x11: ok
- # vim --version
- VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Feb 13 2012 07:40:51)
- Included patches: 1-8, 11-20, 22-26, 28-34, 38-50, 52-62, 65-78, 80-84, 86, 88-94
- ...
- ...
- # vim ~/.vimrc
- set nomodeline (這個一定要寫,目前有這個安裝漏洞)
- set nocp
- set hls is
- set ic
- set cindent
- set autoindent
- set backspace=2
- set nobackup
- set noswapfile
- set shiftwidth=2
- set tabstop=2
- set softtabstop=2
- set expandtab
- set ruler
- set mouse=v
- syntax on
- "set bg=dark (更改背景色調(diào)/默認(rèn)為light, " 為注釋!)
- :wq (詳情:vimtutor)
- # cp .vimrc ~ko/.vimrc (給普通用戶也送一份)
- # chown -R ko:ko ~ko/ (更改為合適的權(quán)限)
復(fù)制代碼 Customizing Alias:
- $ vim ~/.profile
- #
- # sh/ksh initialization
- set autolist
- alias cl='clear'
- alias df='df -h'
- alias la='ls -la'
- alias lh='ls -lh'
- alias lf='ls -FA'
- alias ll='ls -l'
- :wq
- $ exit (注銷生效)
復(fù)制代碼 X> Reserved for future use....
Basic FreeBSD Setup as Desktop: http://72891.cn/thread-3751834-1-1.html
Basic NetBSD Setup as Desktop: http://72891.cn/thread-3751787-1-1.html
Basic OpenBSD Setup as Desktop: http://72891.cn/thread-3751016-1-1.html
Basic Debian Setup as Desktop: http://72891.cn/thread-3751791-1-1.html
Basic Ubuntu Setup as Desktop: http://72891.cn/thread-3746337-1-1.html
Basic Fedora Setup as Desktop: http://72891.cn/thread-3761672-1-1.html
Basic PC-BSD Setup as Desktop: http://72891.cn/thread-3751857-1-1.html
|
評分
-
查看全部評分
|