DTIが提供するVPS、「ServersMan@VPS」のStandardプラン(HD 30G, メモリ 512M)が開通したので色々いじってます。シンプルセットを選択し、まっさらな状態で、最低限やっといたほうがよさそうな作業をメモ。
とにかくSSHでログオンする。最初は root ユーザの権限しかもらってないので、適宜、ユーザを作成します。その後、もろもろを設定するセットアップ作業になります。
#useradd -G wheel testuser
#passwd testuser
Changing password for user testuser.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
追加したユーザが sudo できるように設定。
#visudo
# 追加したユーザを sudo できるようにする
testuserALL=(ALL) ALL
# グループ単位で sudo できるようにする
%wheel ALL=(ALL) ALL
sshd_config を書き換えて root でのログインを出来ないように。
※前のステップで作成したユーザでログインできることを確認してから作業する。
#vi /etc/ssh/sshd_config
PermitRootLogin no
書き換えたら、sshd をリブート
# /etc/init.d/sshd restart
文字コードの設定。
#vi /etc/sysconfig/i18n
"ja_JP.UTF-8"
利用しないサービスをオフ。
#/etc/init.d/saslauthd stop
#/sbin/chkconfig saslauthd off
#/etc/init.d/xinetd stop
#/sbin/chkconfig xinetd off