Mageia - 08 - 共通事項 - ツール・フォント

クラウディア 
1. 概要
2. アップグレード
3. インストール
4. sshd
5. カスタマイズ
6. ftpd
7. フォント

1. 概要

 わたしの使用する、ツール・フォントのたぐいをインストールします。

2. アップグレード

 以降の作業で、端末上での作業中にコピペするのに不自由なので、ブラケットペーストモードをオフにしておきます。  (詳細は、「シェル - bash」の「ブラケットペーストモード」の項をご参照ください)  「root」ユーザ権限で。

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

set enable-bracketed-paste off
 システム全体をアップグレードしておきます。  システムのインストール直後であれば、何も必要ないかもしれません。  なんと「dnf」が使えるようです。  「root」ユーザ権限で。  アップデート。

dnf update
 アップグレード。

dnf upgrade -y

3. インストール

 「root」ユーザ権限で。

dnf install -y openssh-server rcs sudo tree vim vsftpd
 「sudo」の設定に関しては、「メンテナンス・トラブルシュート - コマンド・ユーティリティ - sudo」をご参照ください。  上記は、「FreeBSD」のものですが、「Linux」へ対しても使えます。

4. sshd

 有効化して、起動します。  「root」ユーザ権限で。

service sshd enable
service sshd start

5. カスタマイズ

 以下は、すべてのユーザで。  「vim」に以下の設定を行います。 ・行番号を表示 ・ビジュアルモードを無効 ・オートインデントを有効に  「bash」に以下の設定を行います。 ・/sbin にパスが通っていないので、追加 ・ls のデフォルトをドットファイル・カラー表示を基本に ・上下の矢印キーでコマンド履歴の補完

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

cp ~/.vim/after/indent/vim.vim ~/.vim/after/plugin/.

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'
export PS1='\u@\h $PWD > '
EOF

source ~/.bashrc

6. ftpd

 デフォルトでは、anonymous ユーザのみ接続するようになっていますので、以下のように設定します。 ・anonumous 接続なし ・ログインユーザから IPv4 で接続 ・書き込み可  「root」ユーザ権限で。

vi /etc/vsftpd/vsftpd.conf

# Example config file /etc/vsftpd/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
# 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
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
#local_umask=022
#

# 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=YES

pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES

seccomp_sandbox=NO
allow_writeable_chroot=YES
 12行目をコメント化(anonymous の接続を禁止)。  15、18行目のコメントをはずします(ログインユーザの接続を許可、書き込み可)。  113行目を NO から YES へ変更(IPv4 で接続許可)。  122行目を コメント化(IPv6 でのオープンを無効化)。  128、129行目を追加。  これがないと接続しても、サーバ内のファイルのリストが取得できません。  有効化して、起動します。

service vsftpd enable
service vsftpd start
 次ページのファイアウォールの設定が必要です。

7. フォント

 リポジトリにパッケージがないので、「Ubuntu」のものをダウンロードして、インストールします。  必要なパッケージをインストールします。  以下、「root」ユーザ権限で。

dnf install -y dpkg
 「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
ハイスピードプラン健康サポート特集