1. 概要
わたしの使用する、ツール・アプリケーションのインストール・設定等です。
2. インストール
コマンドラインで起動するアプリケーションがインストールされていないなどのときは、「cnf(command not found)」というコマンドを使用するようです。
例えば「ifconfig」であれば
$ cnf ifconfig
The program 'ifconfig' can be found in following packages:
* net-tools-deprecated [ path: /bin/ifconfig, repository: zypp (repo-oss) ]
* net-tools-deprecated [ path: /usr/bin/ifconfig, repository: zypp (repo-oss) ]
Try installing with:
zypper install net-tools-deprecated
と、「zypper」コマンドでインストールしなさいということになります。
てことで、「root」ユーザで
zypper install -y vsftpd net-tools-deprecated rcs
3. sshd
「sshd」は、デフォルトでインストールされているようです。
ファイアウォールで、ポートも閉じられているので
firewall-cmd --add-service=ssh --zone=public --permanent
firewall-cmd --reload
「root」ユーザで起動します。
systemctl enable sshd
service sshd start
4. vim
「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/.
5. bash
「bash」の設定をカスタマイズします。
(「vi」で「vim」は、起動する模様)
・rcs のチェックイン・チェックアウトのデフォルトをロックモードへ
・ls のデフォルトをドットファイル・カラー表示を基本に
・上下の矢印キーでコマンド履歴の補完
・プロンプトの形式を「ユーザ名@ホスト名 /カレントディレクトリ > 」へ
mkdir -pv ~/RCS
ci -l ~/.bashrc << EOF
EOF
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
source ~/.bashrc
6. ftpd
「root」ユーザで
vi /etc/vsftpd.conf
# Uncomment this to enable any form of FTP write command.
write_enable=NO
「YES」へ変更します。
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=YES
「NO」へ変更します。
# 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. To listen on IPv4 and IPv6
# sockets, you must run two copies of vsftpd with two configuration files.
# Make sure, that one of the listen options is commented !!
listen_ipv6=YES
184行を「YES」、189行を「NO」へ変更します。
ファイアウォールのポートを開けます。
firewall-cmd --add-service=ftp --zone=public --permanent
firewall-cmd --reload
再起動。
systemctl enable vsftpd
service vsftpd start