1. 概要
「vim」は、インストール済でした。
この手のものは、端末から、「root」ユーザのコマンドでインストールするのが手っ取り早いのです。
2. sshd
あらかじめインストールされています。
有効化して、起動します。
「root」ユーザ権限で。
systemctl enable sshd
systemctl start sshd
ファイアウォールのポートは、デフォルトで開放されておりました。
3. リポジトリ追加
わたしが使用するアプリケーションは、「Release-x86_64-Unsupported」に存在するものが、多数あります。
「Dnfdragora」で、リポジトリを追加することはできるのですが、どうもテンポラリなものでしかないようで、恒久的な設定を行うには、以下の手順が必要なようです。
以前は、「OpenMandriva Control Center」で設定していましたが。
「OpenMandriva Control Center」を使うより、コマンドでやった方が、確実であることがわかりました。
以降の作業で、端末上での作業中にコピペするのに不自由なので、まず、ブラケットペーストモードをオフにしておきます。
(詳細は、「シェル - bash」の「ブラケットペーストモード」の項をご参照ください)
わたしの知っている「vim」を動かすために、「vim」で起動します。
以下、「root」ユーザ権限で。
まず、「vim」のインストールから。
dnf install -y vim
編集。
vim /etc/inputrc
下記の1行を末尾に加えます。
set enable-bracketed-paste off
いったん、リポジトリを更新しておきます。
dnf update -y
dnf upgrade
現在、有効なリポジトリを確認するには。
dnf repolist all
わたしの追加したい、リポジトリを追加します。
今回、「rolling-x86_64-unsupported」のリポジトリが定義ファイルに存在しなかったので、まず、ファイルに追加することろから。
vim /etc/yum.repos.d/openmandriva-rolling-x86_64.repo
末尾に下記の行を追加します。
[rolling-x86_64-unsupported]
name="OpenMandriva Rolling - Unsupported - x86_64"
baseurl=http://mirror.openmandriva.org/rolling/repository/x86_64/unsupported/release/
http://abf-downloads.openmandriva.org/rolling/repository/x86_64/unsupported/release/
# Alternative if mirror.openmandriva.org is down
# mirrorlist=http://mirrors.openmandriva.org/mirrors.php?platform=rolling&arch=x86_64&repo=unsupported&release=release
# fastestmirror=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-OpenMandriva
type=rpm-md
enabled=0
エラーになるリポジトリの無効化と有用なリポジトリの有効化。
dnf config-manager --disable release-x86_64-extra
dnf config-manager --disable release-updates-x86_64-extra
dnf config-manager --enable rolling-x86_64
dnf config-manager --enable rolling-x86_64-extra
dnf config-manager --enable rolling-x86_64-non-free
dnf config-manager --enable rolling-x86_64-unsupported
4. インストール
再度パッケージを更新して、アップグレードします。
dnf update -y
dnf upgrade
必要な、ツール等をインストールします。
dnf install -y krb5-appl-clients rcs
5. vim
以下は、すべてのユーザで。
「vim」に以下の設定を行います。
・行番号を表示
・ビジュアルモードを無効
・オートインデントを有効に
「bash」に以下の設定を行います。
・/sbin にパスが通っていないので、追加
・ls のデフォルトをドットファイル・カラー表示を基本に
・上下の矢印キーでコマンド履歴の補完
・Ctrl+W で単語削除する際、「/」で停止
・プロンプトの形式を「ユーザ名@ホスト名 /カレントディレクトリ > 」へ
mkdir -pv ~/.vim/after/indent
mkdir -pv ~/.vim/after/plugin
touch ~/.vim/after/indent/vim.vim
sh
cat << 'EOF' >> ~/.vim/after/indent/vim.vim
set number
set mouse-=a
set autoindent
EOF
exit
cp ~/.vim/after/indent/vim.vim ~/.vim/after/plugin/.
sh
cat << 'EOF' >> ~/.bashrc
export PATH="$PATH":/sbin
alias ci='ci -l'
alias co='co -l'
alias ls='ls -a --color'
bind '"\e[A": history-search-backward'
bind '"\e[B": history-search-forward'
stty werase undef
bind '"\C-W": unix-filename-rubout'
bind '"\C-w": unix-filename-rubout'
export PS1='\u@\h $PWD > '
EOF
exit
source ~/.bashrc
6. フォント
必要なパッケージをインストールしてから、フォントをインストールします。
「root」ユーザ権限で。
インストール。
dnf install -y dpkg diffutils gnutar noto-sans-cjk-fonts noto-sans-mono-cjk-fonts
「MigMix」のダウンロード・インストール。
curl http://archive.ubuntu.com/ubuntu/pool/universe/f/fonts-migmix/fonts-migmix_20200307-1_all.deb --output /tmp/fonts-migmix_20200307-1_all.deb
dpkg -i /tmp/fonts-migmix_20200307-1_all.deb