- 1. 概要
- 2. 準備
- 3. インストール
- 4. フォント
- 5. vim 設定
- 6. ftpd 設定(NG)
1. 概要
わたしの使用する、ツール・フォントの類をインストール・設定しておきます。
「Mandrake」系は、パッケージ管理は、「urpmi」を使用するものだと思っていたら、検索用の「urpmq」や「urpmf」がない。
途方に暮れていたら、どうも「dnf」がインストールされているようです。
2. 準備
インストール時点で、「sshd」が起動しています。
リモートログインして作業可能です。
まずは、パッケージのアップデートから。
「root」ユーザ権限で。
dnf update -y
これの時間が、長かった。
ダウンロードで、20分近くかかり、通信量が 2GB 超ありました。
なんか、「boot」イメージまで書き換えているようなメッセージがありましたので、ここで、いったん再起動しました。
インストールしたものは、「ROSA 12.1」なのですが、アップデートすると「ROSA 12.5」になるようです(2024年4月4日)。
以降の作業を楽にするために、「bash」の「ブラケットペーストモード」は、デフォルトでオフにします。
vi /etc/inputrc
末尾へ下記を追加します。
set enable-bracketed-paste off
反映させるために、ログインしなおします。
3. インストール
わたしの使用するものをインストールします。
「root」ユーザ権限で。
dnf install -y curl dpkg fonts-ttf-japanese fonts-ttf-japanese-extra fonts-otf-google-noto-sans-cjk-jp locales-ja numlock rcs vim vsftpd
「MigMix」はありませんでしたが、日本語フォントは、いくつかあるようなので、インストールしてみましたが、結局、「MigMix」が一番、わたしの好みにあいますので、「MigMix」を使うこちにします。
4. フォント
「MigMix」をダウンロードして、インストールします。
「ROSA」には、パッケージが存在しないので、「Ubuntu」のものを使います。
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
5. vim 設定
「vim」について「行番号を表示」「ビジュアルモードを無効」という設定にします。
「vim」の設定を含め、「bash」の設定をカスタマイズします。
・「rcs」のチェックイン・チェックアウトのデフォルトをロックモードへ
・「ls」のデフォルトをドットファイル・カラー表示
・上下の矢印キーでコマンド履歴の補完
・プロンプトの形式を「ユーザ名@ホスト名 /カレントディレクトリ > 」に
各ユーザで。
mkdir -pv ~/.vim/after/indent
mkdir -pv ~/.vim/after/plugin
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
PATH="$PATH":/usr/sbin
alias ci='ci -l'
alias co='co -l'
alias ls='ls -a --color'
alias vi='vim'
bind '"\e[A": history-search-backward'
bind '"\e[B": history-search-forward'
export PS1='\u@\h $PWD > '
EOF
exit
source ~/.bashrc
6. ftpd 設定(NG)
インストール時点で、起動されます。
設定を変更します。(IPv4 で接続、アップロード可)
「root」ユーザ権限で。
vi /etc/vsftpd/vsftpd.conf
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=YES
#
# Uncomment this to allow local users to log in.
#local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
#write_enable=YES
12行目を、「YES」から「NO」へ。
15、18行目のコメントをはずします。
変更したら、起動。
ls_recurse_enable=YES
#
# When "listen" directive is enabled, vsftpd runs in standalone mode and
# listens on IPv4 sockets. This directive cannot be used in conjunction
# with the listen_ipv6 directive.
listen=NO
#
# This directive enables listening on IPv6 sockets. By default, listening
# on the IPv6 "any" address (::) will accept connections from both IPv6
# and IPv4 clients. It is not necessary to listen on *both* IPv4 and IPv6
# sockets. If you want that (perhaps because you want to listen on specific
# addresses) then you must run two copies of vsftpd with two configuration
# files.
# Make sure, that one of the listen options is commented !!
listen_ipv6=YES
108行を「YES」へ。
113行を「YES」へ。
122行を「NO」へ。
編集が終わったら「ftpd」を起動します。
service vsftpd start
ところが、今回、これで、クライアントから接続すると、パスワードエラーになる、なので、今のところうまくいっていないのです(2024年4月4日)。