Jan 28, 2011

CentOS 5.5 i386 on VMware Fusion3 インストール

OSインストール

とりあえずネットワークの設定だけして他は何も入れない。

http://www.centos.org/

最新の状態にアップデート

# yum check-update
# yum update


ntpのインストールと設定

# yum install ntp
# cp -a /etc/ntp.conf /etc/ntp.conf.org
# cat <<INPUT > /etc/ntp.conf
server 210.173.160.57
server 133.100.9.2
restrict default ignore
restrict 127.0.0.1
restrict 210.173.160.57 mask 255.255.255.255 noquery nomodify notrap notrust
restrict 133.100.9.2 mask 255.255.255.255 noquery nomodify notrap notrust
driftfile /etc/ntp/drift
authenticate no
INPUT

※ 上記 NTPサーバのIPアドレスは必要に応じて変更

参考サイト
http://www.ipa.go.jp/security/awareness/administrator/secure-web/chap4/4_ntpd.html
http://www.venus.dti.ne.jp/~yoshi-o/NTP/NTP-Table.html


時刻合わせ

# ntpdate 210.173.160.57


/etc/skel/ に設定追加

# cat <<INPUT >> /etc/skel/.bashrc
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias vi='vim'
INPUT

.vimrc も作成 .vimrcサンプル


ユーザー作成

# groupadd -g gid groupname
# useradd -u uid -g groupname username
# passwd username


/etc/ssh/sshd_config の設定

# vi /etc/ssh/sshd_config

PermitRootLogin no


/etc/inittab の設定

# vi /etc/inittab

tty2-6をコメントアウト


SELinux の無効化

# vi /etc/selinux/config

SELINUX=disabled


ホスト名の変更

# vi /etc/sysconfig/network

HOSTNAME=xxx.xxx.xxx


開発用ツールのインストール

# yum install kernel-headers
# yum install kernel-devel
# yum install gcc


サービス自動起動設定

// ON
# chkconfig ntpd on

// 状況に応じて
# chkconfig autofs off
# chkconfig iptables off
# chkconfig ip6tables off
# chkconfig irqbalance off
# chkconfig messagebus off

# chkconfig netfs off
# chkconfig nfslock off
# chkconfig portmap off
# chkconfig rpcgssd off
# chkconfig rpcidmapd off

# chkconfig anacron off
# chkconfig acpid off
# chkconfig apmd off
# chkconfig atd off
# chkconfig auditd off
# chkconfig avahi-daemon off
# chkconfig bluetooth off
# chkconfig cpuspeed off
# chkconfig --level 1 cpuspeed off
# chkconfig cups off
# chkconfig firstboot off
# chkconfig gpm off
# chkconfig haldaemon off
# chkconfig hidd off
# chkconfig isdn off
# chkconfig kudzu off
# chkconfig lvm2-monitor off
# chkconfig --level 1 lvm2-monitor off
# chkconfig mcstrans off
# chkconfig mdmonitor off
# chkconfig microcode_ctl off
# chkconfig pcscd off
# chkconfig rawdevices off
# chkconfig readahead_early off
# chkconfig readahead_later off
# chkconfig restorecond off
# chkconfig xfs off
# chkconfig sendmail off

# chkconfig smartd off

# chkconfig yum-updatesd off

No comments:

Post a Comment