MX Linux - 19 - 基本操作 - ifconfig・sshd・rcs・vim・ftpd
- 1. 概要
- 2. インストール
- 3. vim
- 4. ftpd
1. 概要
わたしの使用する、ツール等のインストール・カスタマイズ方法です。
2. インストール
root ユーザで
apt update
apt upgrade
apt install net-tools openssh-server rcs vim vsftpd
sshd は、インストール後に起動するので、特に何もすることはありません。
rcs は、次項で、コマンドに alias を設定する以外、設定する項目はありません。
3. vim
「行番号を表示」「ビジュアルモードを無効」という設定にします。
mkdir -pv ~/.vim/after/indent
mkdir -pv ~/.vim/after/plugin
touch ~/.vim/after/indent/vim.vim
echo "set number" >> ~/.vim/after/indent/vim.vim
echo "set mouse-=a" >> ~/.vim/after/indent/vim.vim
cp ~/.vim/after/indent/vim.vim ~/.vim/after/plugin/.
vim の設定を含め、bash の設定をカスタマイズします。
末尾に以下を記述して、下記の設定を行います。
・rcs のチェックイン・チェックアウトのデフォルトをロックモードへ
・ls のデフォルトをドットファイル・カラー表示を基本に
・上下の矢印キーでコマンド履歴の補完
・プロンプトの形式を「ユーザ名@ホスト名 /カレントディレクトリ > 」へ
echo "" >> ~/.bashrc
echo "alias ci='ci -l'" >> ~/.bashrc
echo "alias co='co -l'" >> ~/.bashrc
echo "alias ls='ls -a --color'" >> ~/.bashrc
echo "" >> ~/.bashrc
echo "bind '\"\\e[A\": history-search-backward'" >> ~/.bashrc
echo "bind '\"\\e[B\": history-search-forward'" >> ~/.bashrc
echo "" >> ~/.bashrc
echo "export PS1='\u@\h $PWD > '" >> ~/.bashrc
4. ftpd
インストール時点で、起動されます。
設定を変更します。(IPv4 で接続、アップロード可)
vi /etc/vsftpd.conf
# 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
14行目を、「NO」から「YES」へ。
22行目をコメントアウト。
31行目のコメントをはずします。
変更したら、再起動。
service vsftpd restart
|
|