VPS: さくらVPS512
OS: CentOS5.5 x86_64
■ホスト名変更
/etc/sysconfig/network
HOSTNAME=***
■IPv6無効
/etc/sysconfig/network
NETWORKING_IPV6=no
/etc/modprof.conf
alias ipv6 off
options ipv6 disable=1
■ 32bit RPMの削除&yum update
yum erase *.i386 *.i686
yum update
■ SSHの設定
/etc/ssh/sshd_config
# ポート番号を 22 (デフォルト)から10022へ変更する
#Port 22
Port 10022
# SSHのプロトコルをSSH2のみ対応
Protocol 2
# rootでのログインを不可
PermitRootLogin no
# パスワードでのログインを許可
PasswordAuthentication yes
# パスワードなしでのログインを不可
PermitEmptyPasswords no
# hoge というユーザだけログインを許可
AllowUsers hoge
■ FireWallの設定(サンプル)
/etc/sysconfig/iptables
# Generated by iptables-save v1.3.5 on Mon Jan 30 21:54:37 2012
*filter
:INPUT DROP [3:228]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [6:760]
-A INPUT -i lo -j ACCEPT
-A INPUT -s 10.0.0.0/255.0.0.0 -j DROP
-A INPUT -s 172.16.0.0/255.240.0.0 -j DROP
-A INPUT -s 192.168.0.0/255.255.0.0 -j DROP
-A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 10022 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -o lo -j ACCEPT
COMMIT
# Completed on Mon Jan 30 21:54:37 2012
■不要なデーモンのOFF
/sbin/chkconfig auditd off
/sbin/chkconfig autofs off
/sbin/chkconfig avahi-daemon off
/sbin/chkconfig bluetooth off
/sbin/chkconfig cups off
/sbin/chkconfig firstboot off
/sbin/chkconfig gpm off
/sbin/chkconfig haldaemon off
/sbin/chkconfig hidd off
/sbin/chkconfig kudzu off
/sbin/chkconfig lvm2-monitor off
/sbin/chkconfig mcstrans off
/sbin/chkconfig mdmonitor off
/sbin/chkconfig messagebus off
/sbin/chkconfig netfs off
/sbin/chkconfig nfslock off
/sbin/chkconfig pcscd off
/sbin/chkconfig portmap off
/sbin/chkconfig rawdevices off
/sbin/chkconfig restorecond off
/sbin/chkconfig rpcgssd off
/sbin/chkconfig rpcidmapd off
/sbin/chkconfig smartd off
/sbin/chkconfig xfs off
/sbin/chkconfig sendmail off
■日本語対応
vi /etc/sysconfig/i18n
-------------------------------
LANG="C"
SYSFONT="latarcyrheb-sun16"
-------------------------------
↓↓↓↓↓↓↓↓↓↓↓
-------------------------------
LANG="ja_JP.UTF-8"
SUPPORTED="ja_JP.UTF-8:ja_JP:ja"
SYSFONT="latarcyrheb-sun16"
-------------------------------