AWS-MarketPlaceのCentOS6.4を初期セットアップ備忘

準備物
AMI:ami-9ffa709e
  CentOS-6.4-x86_64-GA-EBS-9ededd96-9ff7-4ba1-ae15-2c99f7e93990-ami-d79bf0be.1
  aws-marketplaceのCentOS release 6.4 (Final)

タイムゾーンの設定
# date
2013年  6月 29日 土曜日 06:22:52 UTC
# cp -p /usr/share/zoneinfo/Japan /etc/localtime
cp: overwrite `/etc/localtime’? y
# date
2013年  6月 29日 土曜日 15:23:13 JST

SELinuxを無効にする
# getenforce
Enforcing
# setenforce 0
# setenforce 0
Permissive

# vi /etc/sysconfig/selinux
# SELINUX= can take one of these three values:
#     enforcing – SELinux security policy is enforced.
#     permissive – SELinux prints warnings instead of enforcing.
#     disabled – No SELinux policy is loaded.
#SELINUX=enforcing
SELINUX=disable
# SELINUXTYPE= can take one of these two values:
#     targeted – Targeted processes are protected,
#     mls – Multi Level Security protection.
SELINUXTYPE=targeted

iptablesを無効化→AWSだから
# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  —  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     icmp —  anywhere             anywhere
ACCEPT     all  —  anywhere             anywhere
ACCEPT     tcp  —  anywhere             anywhere            state NEW tcp dpt:ssh
REJECT     all  —  anywhere             anywhere            reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
REJECT     all  —  anywhere             anywhere            reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

iptablesのサービスを停止
# /etc/rc.d/init.d/iptables stop
iptables: Flushing firewall rules: [  OK  ]
iptables: Setting chains to policy ACCEPT: filter [  OK  ]
iptables: Unloading modules: [  OK  ]

iptablesのサービス自動起動を停止
# chkconfig iptables off

iptablesのサービス状態を確認
# service iptables status
iptables: Firewall is not running.

パッケージを最新に更新しておく
# yum update
Installed:
  kernel.x86_64 0:2.6.32-358.11.1.el6

Updated:
  coreutils.x86_64 0:8.4-19.el6_4.2                              coreutils-libs.x86_64 0:8.4-19.el6_4.2
  curl.x86_64 0:7.19.7-37.el6_4                                  dbus-glib.x86_64 0:0.86-6.el6
  e2fsprogs.x86_64 0:1.41.12-14.el6_4.2                          e2fsprogs-libs.x86_64 0:1.41.12-14.el6_4.2
  gzip.x86_64 0:1.3.12-19.el6_4                                  initscripts.x86_64 0:9.03.38-1.el6.centos.1
  iputils.x86_64 0:20071127-17.el6_4                             kernel-firmware.noarch 0:2.6.32-358.11.1.el6
  krb5-libs.x86_64 0:1.10.3-10.el6_4.3                           libblkid.x86_64 0:2.17.2-12.9.el6_4.3
  libcom_err.x86_64 0:1.41.12-14.el6_4.2                         libcurl.x86_64 0:7.19.7-37.el6_4
  libselinux.x86_64 0:2.0.94-5.3.el6_4.1                         libselinux-utils.x86_64 0:2.0.94-5.3.el6_4.1
  libss.x86_64 0:1.41.12-14.el6_4.2                              libuuid.x86_64 0:2.17.2-12.9.el6_4.3
  libxml2.x86_64 0:2.7.6-12.el6_4.1                              module-init-tools.x86_64 0:3.9-21.el6_4
  mysql-libs.x86_64 0:5.1.69-1.el6_4                             openldap.x86_64 0:2.4.23-32.el6_4.1
  openssl.x86_64 0:1.0.0-27.el6_4.2                              selinux-policy.noarch 0:3.7.19-195.el6_4.12
  selinux-policy-targeted.noarch 0:3.7.19-195.el6_4.12           tzdata.noarch 0:2013c-1.el6
  upstart.x86_64 0:0.6.5-12.el6_4.1                              util-linux-ng.x86_64 0:2.17.2-12.9.el6_4.3

Complete!

タイトルとURLをコピーしました