antiX - 23 - 共通事項 - ツール・フォント
- 1. 概要
- 2. インストール
- 3. vim・bash 設定
- 4. ftpd
- 5. numlockx
1. 概要
わたしの使用する、コマンド・フォントの類のインストールや設定です。
「sshd」は、デフォルトでインストール済、起動済です。
「bash」の「ブラケットペーストモード」は、念のため、あらかじめオフにしておきます。
「root」ユーザ権限で。
vi /etc/inputrc
下記の1行を末尾に加えます。
set enable-bracketed-paste off
リポジトリを更新しておきます。
更新。
apt update
アップグレード。
apt upgrade -y
2. インストール
まとめてインストールします。
以下、「root」ユーザ権限で。
apt install -y fonts-migmix numlockx rcs vim vsftpd
3. vim・bash 設定
「vim」を「行番号を表示」「ビジュアルモードを無効」という設定にします。
「bash」をいじって、「rcs」のチェックイン・チェックアウトのデフォルトをロックモードへ、「ls」のデフォルトをドットファイル・カラー表示を基本に、上下の矢印キーでコマンド履歴の補完、プロンプトの形式を「ユーザ名@ホスト名 /カレントディレクトリ > 」にします。
「root」ユーザ、ログインユーザそれぞれで・・・。
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'
bind '"\e[A": history-search-backward'
bind '"\e[B": history-search-forward'
export PS1='\u@\h $PWD > '
EOF
exit
source ~/.bashrc
4. ftpd
「vsftpd」はインストール時点で、起動しますが、少し設定を変更します。
「root」ユーザ権限で。
vi /etc/vsftpd.conf
「IPv4」で接続、書き込み可にします。
# Run standalone? vsftpd can run either from an inetd or as a standalone
# daemon started from an initscript.
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.
listen_ipv6=YES
#
# Allow anonymous FTP? (Disabled by default).
anonymous_enable=NO
#
# 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
を下記へ変更します。
# Run standalone? vsftpd can run either from an inetd or as a standalone
# daemon started from an initscript.
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.
listen_ipv6=NO
#
# Allow anonymous FTP? (Disabled by default).
anonymous_enable=NO
#
# 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
デフォルトでは、ドットファイルが表示されないので、表示したい場合は、末尾に1行追加します。
force_dot_files=YES
変更後
service vsftpd restart
5. numlockx
ログイン時点で、Num Lock キーを有効にします。
ログインユーザで
sh
cat << 'EOF' >> ./.desktop-session/startup
/usr/bin/numlockx on
EOF
exit
|
|