2019/10/28(月)日本語表示できるようにFreeBSD12 に色々インストールした

pkgコマンドで色々インストールした。

# pkg install doas xorg xfce xdm


doasの設定
/usr/local/etc/doas.confを作成し次を書き込む。
これでwheelグループはパスワードありで使うことが出来、rootはパスなしで使える。
$ cat /usr/local/etc/doas.conf
permit :wheel
permit nopass keepenv root

xfceの設定
/etc/rc.conf に次を追加。
$ tail /etc/rc.conf
dbus_enable="YES"


xdmの設定
/etc/ttys の下の方のttyv8の off を on にする。
$ tail /etc/ttys
ttyv7 "/usr/libexec/getty Pc" xterm onifexists secure
ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure
# Serial terminals
# The 'dialup' keyword identifies dialin lines to login, fingerd etc.
ttyu0 "/usr/libexec/getty 3wire" vt100 onifconsole secure
ttyu1 "/usr/libexec/getty 3wire" vt100 onifconsole secure
ttyu2 "/usr/libexec/getty 3wire" vt100 onifconsole secure
ttyu3 "/usr/libexec/getty 3wire" vt100 onifconsole secure
# Dumb console
dcons "/usr/libexec/getty std.9600" vt100 off secure

~/.xsession を次のように設定しておく。
$ cat .xsession
export LANG=ja_JP.UTF-8
. /usr/local/etc/xdg/xfce4/xinitrc


ntpの設定
/etc/rc.confに次を追記。
$ tail /etc/rc.conf
ntpd_enable="YES"

これで再起動をするとグラフィカルなログイン画面になる。


Xのフォントが汚いので日本語フォントを導入。
# pkg install ja-font-ipa ja-font-ipaex


映りも良くないためドライバを当てる。
今回は nForce630a のオンボードチップなので対応しているドライバを調べる。
https://www.nvidia.co.jp/Download/driverResults.aspx/123876/jp
ということで nvidia-driver-304 を導入しようとしたらエラーが発生。
Linuxバイナリのエミュレーションが無いとの事。

Cannot install package: kernel missing 64-bit Linux support

そこで rc.conf に linux_enable="YES" を追記し再起動。
$ tail /etc/rc.conf
linux_enable="YES"


再度ドライバのインストール。
# pkg install nvidia-driver-304

loader.conf に nvidia_load="YES" を追記。
$ cat /boot/loader.conf
nvidia_load="YES"


これでグラフィカルな画面で日本語がまともに表示されるようになった。

2019/10/28(月)FreeBSD12.0をインストールした

FreeBSD12 をインストールした。

FreeBSD公式 https://www.freebsd.org/ja/


FreeBSD-12.0-RELEASE-amd64-disc1.iso.xz をダウンロードし、これを使った。
このディスクイメージは基本的な部分しか入っていないので、インストールしてから色々インストールが必要。


公式にある手順に従いインストールを行った。

第2章 FreeBSD のインストール - FreeBSDハンドブック
https://www.freebsd.org/doc/ja_JP.eucJP/books/handbook/bsdinstall.html


インストール時にユーザが作れるので wheel グループに追加しておいた。
ログインシェルはtcshにした。ネットで設定を調べ ~/.tcshrc を少し編集しておいた。
インストール後にログインし、sudoコマンドも入っていないので、su - でrootになりアップデートをした。

システムのアップデート
設定ファイル /etc/freebsd-update.conf はデフォルトのままで次のコマンドを実行。
# freebsd-update fetch
# freebsd-update install

Ports Collectionのインストール
# portsnap fetch
# portsnap extract

pkgコマンドのインストール
# pkg

ドキュメントのインストール
# pkg install ja-freebsd-doc

sudoコマンドと doasコマンドはどちらを入れるべきだろうか?

インストール直後に気になったのは時間がずれているのでこれを修正する必要がある。
他には X Window System のインストールと日本語環境の構築を行う予定。

2019/10/18(金)OpenBSD6.6 リリース

OpenBSD6.6がリリースされた。

色々変わったことが有るようだが、アップグレードが sysupgradeで行えるようになった。
機会を見て Pine64 にインストールしている OpenBSD6.5 を更新してみることにする。


OpenBSD 6.6 Released
https://openbsd.org/66.html

Announce: https://marc.info/?l=openbsd-tech&m=157132024225971&w=2

Upgrade Guide: https://openbsd.org/faq/upgrade66.html

Changelog: https://openbsd.org/plus66.html

2019/10/03(木)vimの設定

OpenBSDのviはnviである。日本語が表示できない。

しょうがないのでvimをインストールした。
その為、vimの設定をした。
まず、ホームディレクトリに次の内容の.vimrcを作った。
OpenBSD-PINE64$ cat .vimrc 

"" Plugin

""""""""""""""""""""""""""""""""""""""""
" 次のコマンドを実行しておく
" git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
""""""""""""""""""""""""""""""""""""""""

    set nocompatible
    filetype off
    set rtp+=~/.vim/bundle/Vundle.vim

    call vundle#begin()

    Plugin 'VundleVim/Vundle.vim'


    Plugin 'w0rp/ale'

    Plugin 'dhruvasagar/vim-table-mode'
    Plugin 'thinca/vim-quickrun'
    Plugin 'alvan/vim-closetag'
    Plugin 'scrooloose/nerdtree'

    Plugin 'nathanaelkane/vim-indent-guides'
    Plugin 'vim-scripts/AnsiEsc.vim'
    "Plugin 'Shougo/neocomplete.vim'
    "Plugin 'Shougo/neosnippet.vim'

    Plugin 'vim-perl/vim-perl'
    Plugin 'hotchpotch/perldoc-vim'

    Plugin 'lervag/vimtex'

    Plugin 'tomasr/molokai'

    Plugin 'Shougo/deoplete.nvim'
    Plugin 'roxma/nvim-yarp'
    Plugin 'roxma/vim-hug-neovim-rpc'


    Plugin 'scrooloose/syntastic'
    Plugin 'tpope/vim-endwise'




    call vundle#end()

    filetype plugin indent on


    colorscheme molokai


    "let g:ale_linters = {'perl': ['perl -c']}


    let g:deoplete#enable_at_startup = 1

    " vimを立ち上げたときに、自動的にvim-indent-guidesをオンにする
    let g:indent_guides_enable_on_vim_startup = 1


    " vim-indent-guides
    let g:indent_guides_auto_colors=0
    autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd   ctermbg=110
    autocmd VimEnter,Colorscheme * :hi IndentGuidesEven  ctermbg=140

    let g:indent_guides_guide_size=2





"" Option

set ruler
set title
set wildmenu wildmode=list:full


" setting

" 入力中のコマンドをステータスに表示する
set showcmd


" 見た目系
" 行番号を表示
set number
" 現在の行を強調表示
set cursorline
" 現在の行を強調表示(縦)
set cursorcolumn
" 行末の1文字先までカーソルを移動できるように
set virtualedit=onemore
" インデントはスマートインデント
set smartindent
" ビープ音を可視化
set visualbell
" 括弧入力時の対応する括弧を表示
set showmatch
" ステータスラインを常に表示
set laststatus=2
" コマンドラインの補完
set wildmode=list:longest
" 折り返し時に表示行単位での移動できるようにする
nnoremap j gj
nnoremap k gk
" シンタックスハイライトの有効化
syntax enable


" Tab系
" 不可視文字を可視化(タブが「?-」と表示される)
"set list listchars=tab:\?\-
set list
set listchars=tab:≫-,trail:-,eol:⏎,extends:≫,precedes:≪,nbsp:%
" Tab文字を半角スペースにする
set expandtab
" 行頭以外のTab文字の表示幅(スペースいくつ分)
set tabstop=8
" 行頭でのTab文字の表示幅
set shiftwidth=4
set softtabstop=4

" 検索系
" 検索文字列が小文字の場合は大文字小文字を区別なく検索する
set ignorecase
" 検索文字列に大文字が含まれている場合は区別して検索する
set smartcase
" 検索文字列入力時に順次対象文字列にヒットさせる
set incsearch
" 検索時に最後まで行ったら最初に戻る
set wrapscan
" 検索語をハイライト表示
set hlsearch
" ESC連打でハイライト解除
nmap <Esc><Esc> :nohlsearch<CR><Esc>

次のコマンドを実行。
OpenBSD-PINE64$ git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

vimを立ち上げ、exコマンド :PluginUpdate を実行すると必要なプラグインが導入される。
OK キャンセル 確認 その他