Fedora - 37 - 共通事項 - ツール・フォント

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

1. 概要

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

2. sshd

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

systemctl enable sshd
systemctl start  sshd
 「service」コマンドは、あるものの、「enable」のオプションを受け付けていないようです。  以下の作業で、クリップボードから端末へテキストをはりつけるときに不自由なので、ブラケットモードをオフにします。

vi /etc/inputrc
 下記の1行を末尾に加えます。

set enable-bracketed-paste off
 有効化するために、ログインしなおします。

3. インストール

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

dnf update -y
 インストール。

dnf install -y curl dpkg numlockx rcs vim vsftpd
 フォント「MigMix」は、「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
 「rcs」は、インストールのみで機能します。

4. vim の設定

 各ユーザで、「vim」「bash」をカスタマイズします。  「vim」に対して、「行番号を表示」「ビジュアルモードを無効」「オートインデント」という設定にします。  「bash」に対して、以下の設定を行います。 ・rcs のチェックイン・チェックアウトのデフォルトをロックモードへ ・ls のデフォルトをドットファイル・カラー表示を基本に ・vi で vim を起動 ・上下の矢印キーでコマンド履歴の補完 ・プロンプトの形式を「ユーザ名@ホスト名 /カレントディレクトリ > 」へ

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

alias ci='ci -l'
alias co='co -l'
alias ls='ls -a --color'
alias vi='/usr/bin/vim'

bind '"\e[A": history-search-backward'
bind '"\e[B": history-search-forward'

export PS1='\u@\h $PWD > '
EOF
exit

source ~/.bashrc

5. ftpd

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

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)」「KDE」は特別で・・・。

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
systemctl start  vsftpd
ハイスピードプラン