#freeze
''目次''
#contents
~
参考サイト:
>[[CentOS FAQ>http://pocketstudio.jp/centos/centos_faq_jp.html]]
----
*準備 [#x9709c51]
[[CentOS.org:http://www.centos.org]]の[Downloads]ページよりインストールCDイメージをダウンロードしてCDに焼く。~
-[[CentOS-5.1-i386-bin-1of6.iso:http://ftp.riken.jp/Linux/centos/5.1/isos/i386/CentOS-5.1-i386-bin-1of6.iso]]
-[[CentOS-5.1-i386-bin-2of6.iso:http://ftp.riken.jp/Linux/centos/5.1/isos/i386/CentOS-5.1-i386-bin-2of6.iso]]
-[[CentOS-5.1-i386-bin-3of6.iso:http://ftp.riken.jp/Linux/centos/5.1/isos/i386/CentOS-5.1-i386-bin-3of6.iso]]
-[[CentOS-5.1-i386-bin-4of6.iso:http://ftp.riken.jp/Linux/centos/5.1/isos/i386/CentOS-5.1-i386-bin-4of6.iso]]
-[[CentOS-5.1-i386-bin-5of6.iso:http://ftp.riken.jp/Linux/centos/5.1/isos/i386/CentOS-5.1-i386-bin-5of6.iso]]
-[[CentOS-5.1-i386-bin-6of6.iso:http://ftp.riken.jp/Linux/centos/5.1/isos/i386/CentOS-5.1-i386-bin-6of6.iso]]
*インストール [#ybe6deec]
CDブートでインストール開始。~
+''[graphical mode]'' → そのままEnter
+''メディアチェック'' → [Skip]
+''インストーラ起動''
+''言語選択'' → [Japanese]
+''キーボード'' → [日本語]
+''インストール方法'' → [インストール]
+''パーティション設定'' → [選択したドライブ上のすべてのパーティションを削除して...]
+''ブートローダ'' → デフォルトのまま
+''ネットワークデバイス設定'' → IPアドレス、ホスト名等を設定~
[編集]から~
[Enable IPv4 support]-[Manual configuration]でIPとNetmaskを設定~
[Enable IPv6 support]はチェックを外す~
ホスト名,ゲートウェイ,DNSを設定する
+''地域設定'' → [アジア/東京]~
システムクロックでUTCを使用 → [OFF]
+''rootパスワード設定''
+''インストールパッケージ選択'' → チェックをすべて外す~
[今すぐカスタマイズする]を選択~
※選択するもの~
--開発 - 開発ツール
--ベースシステム - ベース([オプションパッケージ]でfirstboot-tuiは外す)
--言語 - 日本語サポート
+(CD入れ替えながら続行)
終了
*初期設定 [#h835b4db]
''日本語対応''
# vi /etc/sysconfig/i18n
LANG="ja_JP.UTF-8"
↓
LANG="ja_JP.eucJP" ← eucJPに変更
''ユーザーの作成''
# useradd XXXXX ← ユーザーXXXXXの作成
# passwd XXXXX ← ユーザーXXXXXのパスワード設定
Changing password for user XXXXX.
New UNIX password: ← パスワード入力
Retype new UNIX password: ← パスワード入力(再)
passwd: all authentication tokens updated successfully.
''rootになれるユーザーを限定する''
# usermod -G wheel XXXXX ← ユーザをwheelグループに追加
# vi /etc/pam.d/su
#auth required pam_wheel.so use_uid
↓
auth required pam_wheel.so use_uid ← コメントを外す
''削除''~
# yum -y remove postgresql-libs
# yum -y remove telnet
# yum -y remove subversion
# yum -y remove apr
# yum -y remove apr-util
# yum -y remove yum-updatesd
# yum -y remove openssh
# yum -y remove neon
''yumの設定''
# rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5 ← CentOS RPM 認証鍵のインポート
# yum -y install yum-fastestmirror ← yum-fastestmirrorのインストール
# yum -y update ← 既存パッケージのUpdate
# reboot ← 再起動
''SELinuxの無効化''
# getenforce ← 状態確認
Enforcing ← 有効
# setenforce 0 ← 無効化
# getenforce ← 状態確認
Permissive ← 無効
# vi /etc/sysconfig/selinux ← 設定ファイル編集
SELINUX=enforcing
↓
SELINUX=disabled ← システム起動時に無効化
''仮想コンソールの削減''~
Ctrl+Alt+F[1-6]で仮想コンソールに移れるがメモリ使用量を減らす為半分を停止する。
# vi /etc/inittab
# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
#4:2345:respawn:/sbin/mingetty tty4 ← コメントアウト
#5:2345:respawn:/sbin/mingetty tty5 ← コメントアウト
#6:2345:respawn:/sbin/mingetty tty6 ← コメントアウト
''不要サービスの停止''
# chkconfig acpid off
下記のサービスの自動起動を停止
acpid
apmd
atd
autofs
avahi-daemon
avahi-dnsconfd
bluetooth
cups
gpm
ip6tables
irda
pcscd
sendmail
参考:[[サービスの管理:http://uchida.ac/centos/5/hosoku/security/service/index.html]]
*バックアップのスケジュール [#n4962399]