Fedora - 32 - 共通事項 - sshd・rcs・vim・ftpd

 クラウディア
1. 概要
2. インストール
3. sshd
4. vim の設定
5. ftpd

1. 概要

 わたしの使用する、ツールの類の、インストール、設定に関する記述です。

2. インストール

 以下、「root」ユーザで  まずは、リポジトリのアップデート・アップグレード。

yum -y update
 インストール。

yum -y install rcs vim vsftpd
 rcs は、インストールのみで機能します。

3. sshd

 「sshd」は、インストールされているので、有効化・起動するだけです。  「root」ユーザで

systemctl enable sshd.service
systemctl start  sshd.service

4. vim の設定

 各ユーザで

mkdir -pv ~/.vim/after/indent
mkdir -pv ~/.vim/after/plugin

cat << EOF >> ~/.vim/after/indent/vim.vim
set number
set mouse-=a
EOF

cp ~/.vim/after/indent/vim.vim ~/.vim/after/plugin/.
 「vim」の設定を含め、「bash」の設定をカスタマイズします。  「root」ユーザ以外は、「~/.bashrc」の権限を変更します。  「root」ユーザで

chown ユーザGID:ユーザUID /home/ユーザパス/.bashrc
 末尾に以下を記述して、下記の設定を行います。 ・rcs のチェックイン・チェックアウトのデフォルトをロックモードへ ・ls のデフォルトをドットファイル・カラー表示を基本に ・vi で vim を起動 ・上下の矢印キーでコマンド履歴の補完 ・プロンプトの形式を「ユーザ名@ホスト名 /カレントディレクトリ > 」へ

mkdir -pv ~/RCS
ci -l .bashrc << EOF
EOF

cat << EOF >> ~/.bashrc

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

source ~/.bashrc
 前半は、rcs を使って「~/.bashrc」のバックアップをとっています。

5. ftpd

 設定を変更します。(IPv4 で接続)  「root」ユーザで

mkdir -pv /etc/vsftpd/RCS
ci -l /etc/vsftpd/vsftpd.conf << EOF
EOF

vi /etc/vsftpd/vsftpd.conf

# 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
 を下記に書き換えます。

# 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=YES
#
# 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=NO
 ファイアウォールで、「ftp」のポートを開放。  「GNOME(WorkStaion)」のみ特別で・・・。

firewall-cmd --add-service=ftp --zone=FedoraWorkstation --permanent
firewall-cmd --reload
 その他のデスクトップでは。

firewall-cmd --add-service=ftp --zone=public --permanent
firewall-cmd --reload
 ちなみに、現在有効なゾーンを見るには

$ firewall-cmd --get-default-zone
public
 ftpd のサービスを有効化して、起動。

systemctl enable vsftpd.service
systemctl start  vsftpd.service
ハイスピードプラン