2019/08/26(月)NetBSD8.1 インストール後のあれこれ

sshでログインし作業した。

前回設定した .profile .exrc は次の通り。
~/.profile に追記した内容。
export TMOUT=3000
export HISTSIZE=1000000
export HISTFILE=$HOME/.history
~/.exrc を作成し記入した内容。
"" nvi Option
set autoindent
set autowrite
set flash
set list
set number
set ruler
set shiftwidth=4
set showmatch

パッケージ管理システムとして pkgin コマンドがある。
このコマンドは、apt や yum のコマンドのように使える。
# pkgin update
# pkgin upgrade
省略でコマンドが入力できるのでそちらを使ってもいい。
# pkgin 
Usage: pkgin [-cdfFhlnPtvVy] command [package ...]

Commands and shortcuts:
list                (ls  ) - List installed local packages
avail               (av  ) - List all available remote packages
search              (se  ) - Search for a remote package
install             (in  ) - Install or upgrade packages
update              (up  ) - Refresh local and remote package lists
upgrade             (ug  ) - Upgrade only packages marked with the keep flag
full-upgrade        (fug ) - Upgrade all packages
remove              (rm  ) - Remove packages and any dependent packages
keep                (ke  ) - Mark packages that should be kept
unkeep              (uk  ) - Mark packages that can be autoremoved
export              (ex  ) - Display PKGPATH for all keep packages
import              (im  ) - Import keep package list from file
show-keep           (sk  ) - Display keep packages
show-no-keep        (snk ) - Display autoremovable packages
autoremove          (ar  ) - Remove orphaned dependencies
clean               (cl  ) - Remove downloaded package files
show-deps           (sd  ) - List remote package direct dependencies
show-full-deps      (sfd ) - List remote package full dependencies
show-rev-deps       (srd ) - List local package reverse dependencies
provides            (prov) - Show which shared libraries a package provides
requires            (req ) - Show which shared libraries a package requires
show-category       (sc  ) - List all packages belonging to a category
show-pkg-category   (spc ) - Show categories a package belongs to
show-all-categories (sac ) - List all known categories
pkg-content         (pc  ) - Show remote package content
pkg-descr           (pd  ) - Show remote package long-description
pkg-build-defs      (pbd ) - Show remote package build definitions
stats               (st  ) - Show local and remote package statistics




The NetBSD Guide http://www.netbsd.org/docs/guide/en/index.html

2019/08/26(月)NetBSD8.1 をインストール

NetBSD 8.1 をインストールしてみた。

公式サイト The NetBSD Project


NetBSDはインストール時に多くのプログラムを導入しないため、インストール後の設定が重要である。

次のサイトを参考にさせてもらった。
NetBSDで遊ぼうのこーな https://legacyos.ichmy.0t0.jp/netbsd/
NetBSD 解説 http://www.ki.nu/software/NetBSD2/


まず、公式サイトからCDイメージを入手し、VirtualBoxで仮想環境を構築。
ディスクブートするとインストールが出来る。尚、日本語インタフェースは準備されていない。
フルインストールを行い、ネットワークインタフェースやタイムゾーン、sshの設定を行っておいた。
rootパスワードを設定し、一般ユーザを追加しwheelグループに入れておいた。


ディスクを抜いて再起動し、sshで接続。
インストール直後は2.2GBほどの容量になった。
localhost$ df -h 
Filesystem         Size       Used      Avail %Cap Mounted on
/dev/wd0a           14G       2.2G        11G  17% /
kernfs             1.0K       1.0K         0B 100% /kern
ptyfs              1.0K       1.0K         0B 100% /dev/pts
procfs             4.0K       4.0K         0B 100% /proc
tmpfs              256M         0B       256M   0% /var/shm
sshでログイン後、シェルとviの設定を行った。
シェルは ~/.profile に追加記入をし、 viは ~/.exrc を作成し記述した。

パッケージのインストール
rootに変わって、パッケージ取得先を設定。
$ su -
# vi .profile
コメントアウトされていた次の一行を有効にした。
export PKG_PATH="http://cdn.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -p)/$(uname -r|cut -f '1 2' -d.|cut -f 1 -d_)/All"

これでパッケージのダウンロードを http://cdn.NetBSD.org/ から行うようになる。

次のコマンドで sudo コマンドを導入。
# pkg_add -v sudo
sudo の設定ファイルは /usr/pkg/etc/sudoers にある。
設定は次のコマンドで行う。
# visudo
設定ファイルが開くので少し編集するだけで使えるようになる。
今回はこの一行を有効にした。
# %wheel ALL=(ALL) NOPASSWD: ALL

意味は wheelグループに所属するユーザは全てのコマンドが管理者として実行可能であり、
パスワード認証が不要。


次回はその他のプログラムを追加していく。

2019/07/01(月)OpenBSD の vi

インストールされているのはnviであるので、vimはインストールされていない。
viコマンドはハードリンクによりex、viewと同じ実体である。
/usr/bin/ex
/usr/bin/vi
/usr/bin/view

viの設定は、次のファイルに書く。
  1. /etc/vi.exrc
  2. $HOME/.nexrc
  3. $HOME/.exrc
vi.exrc はシステム全体にする設定を書く。
.nexrc、.exrc は個人の設定を書き込む。設定は .nexrc が先に読み込まれる。


マニュアルによると次のオプションがある。
altwerase [off]
vi only. Select an alternate word erase algorithm.

autoindent, ai [off]
Automatically indent new lines.

autoprint, ap [on]
ex only. Display the current line automatically.

autowrite, aw [off]
Write modified files automatically when changing files or
suspending the editor session.

backup [""]
Back up files before they are overwritten.

beautify, bf [off]
Discard control characters.

cdpath [environment variable CDPATH, or current directory]
The directory paths used as path prefixes for the cd command.

cedit [no default]
Set the character to edit the colon command-line history.

columns, co [80]
Set the number of columns in the screen.

comment [off]
vi only. Skip leading comments in shell, C and C++ language
files.

edcompatible, ed [off]
Remember the values of the `c' and `g' suffixes to the s, & and ~
commands, instead of initializing them as unset for each new
command.

escapetime [1]
The tenths of a second ex/vi waits for a subsequent key to
complete an key mapping.

errorbells, eb [off]
ex only. Announce error messages with a bell.

exrc, ex [off]
Read the startup files in the local directory.

extended [off]
Use extended regular expressions (EREs) rather than basic regular
expressions (BREs). See re_format(7) for more information on
regular expressions.

filec []
Set the character to perform file path completion on the colon
command line.

flash [off]
Flash the screen instead of beeping the keyboard on error.

hardtabs, ht [0]
Set the spacing between hardware tab settings. This option
currently has no effect.

iclower [off]
Makes all regular expressions case-insensitive, as long as an
upper-case letter does not appear in the search string.

ignorecase, ic [off]
Ignore case differences in regular expressions.

keytime [6]
The tenths of a second ex/vi waits for a subsequent key to
complete a key mapping.

leftright [off]
vi only. Do left-right scrolling.

lines, li [24]
vi only. Set the number of lines in the screen.

list [off]
Display lines in an unambiguous fashion.

lock [on]
Attempt to get an exclusive lock on any file being edited, read
or written.

magic [on]
When turned off, all regular expression characters except for `^'
and `$' are treated as ordinary characters. Preceding individual
characters by `\' re-enables them.

matchtime [7]
vi only. The tenths of a second ex/vi pauses on the matching
character when the showmatch option is set.

mesg [on]
Permit messages from other users.

noprint [""]
Characters that are never handled as printable characters.

number, nu [off]
Precede each line displayed with its current line number.

octal [off]
Display unknown characters as octal numbers, instead of the
default hexadecimal.

open [on]
ex only. If this option is not set, the open and visual commands
are disallowed.

paragraphs, para [IPLPPPQPP LIpplpipbpBlBdPpLpIt]
vi only. Define additional paragraph boundaries for the and
commands.

path [""]
Define additional directories to search for files being edited.

print [""]
Characters that are always handled as printable characters.

prompt [on]
ex only. Display a command prompt.

readonly, ro [off]
Mark the file and session as read-only.

recdir [/tmp/vi.recover]
The directory where recovery files are stored.

remap [on]
Remap keys until resolved.

report [5]
Set the number of lines about which the editor reports changes or
yanks.

ruler [off]
vi only. Display a row/column ruler on the colon command line.

scroll, scr [($LINES - 1) / 2]
Set the number of lines scrolled.

searchincr [off]
Makes the / and ? commands incremental.

sections, sect [NHSHH HUnhshShSs]
vi only. Define additional section boundaries for the [[ and ]]
commands.

secure [off]
Turns off all access to external programs.

shell, sh [environment variable SHELL, or /bin/sh]
Select the shell used by the editor.

shellmeta [~{
Set the meta characters checked to determine if file name
expansion is necessary.

shiftwidth, sw [8]
Set the autoindent and shift command indentation width.

showmatch, sm [off]
vi only. Note matching `' and `(' for `' and `)' characters.

showmode, smd [off]
vi only. Display the current editor mode and a "modified" flag.

sidescroll [16]
vi only. Set the amount a left-right scroll will shift.

tabstop, ts [8]
This option sets tab widths for the editor display.

taglength, tl [0]
Set the number of significant characters in tag names.

tags, tag [tags]
Set the list of tags files.

term, ttytype, tty [environment variable TERM]
Set the terminal type.

terse [off]
This option has historically made editor messages less verbose.
It has no effect in this implementation.

tildeop [off]
Modify the ~ command to take an associated motion.

timeout, to [on]
Time out on keys which may be mapped.

ttywerase [off]
vi only. Select an alternate erase algorithm.

verbose [off]
vi only. Display an error message for every error.

w300 [no default]
vi only. Set the window size if the baud rate is less than 1200
baud.

w1200 [no default]
vi only. Set the window size if the baud rate is equal to 1200
baud.

w9600 [no default]
vi only. Set the window size if the baud rate is greater than
1200 baud.

warn [on]
ex only. This option causes a warning message to be printed on
the terminal if the file has been modified since it was last
written, before a ! command.

window, w, wi [environment variable LINES - 1]
Set the window size for the screen.

windowname [off]
Change the icon/window name to the current file name even if it
can't be restored on editor exit.

wraplen, wl [0]
vi only. Break lines automatically, the specified number of
columns from the left-hand margin. If both the wraplen and
wrapmargin edit options are set, the wrapmargin value is used.

wrapmargin, wm [0]
vi only. Break lines automatically, the specified number of
columns from the right-hand margin. If both the wraplen and
wrapmargin edit options are set, the wrapmargin value is used.

wrapscan, ws [on]
Set searches to wrap around the end or beginning of the file.

writeany, wa [off]
Turn off file-overwriting checks.

2018/11/18(日)オープンソースなゲーム

オープンソース
ゲーム

Quake III Arena

Raspberry Pi 3で懐かしのFPSゲーム「Quake III Arena」をプレイする
https://pc.watch.impress.co.jp/docs/topic/feature/1014184.html

名作FPS Quake3 ArenaをRaspberry Pi3で遊びたい【インストールから実行まで】
https://blog.supersonico.info/?p=2266


DOOM

Setting up Raspbian (and DOOM!)
https://learn.sparkfun.com/tutorials/setting-up-raspbian-and-doom
OK キャンセル 確認 その他