1,569 views

■概要

Scientific Linux 6.3インストール直後に初期設定を行った際の備忘録です。GNOME端末を使って設定をするので、GNOME端末の使い方がわからない場合は、GNOME端末でviコマンドを使う方法を参照のこと。
※GNOME端末を使って黄色文のとおり入力します。私はコピペ派ですが、コマンドは全く覚えられませんよ。緑は説明文です。赤は注意書き。白はGNOME端末に自動で表示されていく文です。

■Scientific Linux 6.3初期設定

(1)RPMパッケージのインストール・アンインストールを行うyumの初期設定を行う

[root@ufuso ~]# vi /etc/sysconfig/yum-autoupdate ← yum-autoupdate設定ファイル編集
# EXCLUDE
#   This is a space deliminated list
#   Example:  EXCLUDE="kernel* openafs* *-kmdl-* kmod-* *firmware*"
#EXCLUDE="kernel* openafs* *-kmdl-* kmod-* *firmware*" ← 行頭に#を追加して無効にし、
kernelを自動アップデート対象にする

[root@ufuso ~]# yum -y update ← インストール済パッケージの一括アップデート
Installed:
  kernel.x86_64 0:2.6.32-279.1.1.el6                                            

Updated:
  bind-libs.x86_64 32:9.8.2-0.10.rc1.el6_3.2                                    
  bind-utils.x86_64 32:9.8.2-0.10.rc1.el6_3.2                                   
  dhclient.x86_64 12:4.1.1-31.P1.el6_3.1                                        
  dhcp-common.x86_64 12:4.1.1-31.P1.el6_3.1                                     
  firefox.x86_64 0:10.0.6-1.el6_3                                               
  glibc.x86_64 0:2.12-1.80.el6_3.3                                              
  glibc-common.x86_64 0:2.12-1.80.el6_3.3                                       
  kernel-firmware.noarch 0:2.6.32-279.1.1.el6                                   
  krb5-libs.x86_64 0:1.9-33.el6_3.2                                             
  krb5-workstation.x86_64 0:1.9-33.el6_3.2                                      
  libtiff.x86_64 0:3.9.4-6.el6_3                                                
  nspr.x86_64 0:4.9.1-2.el6_3                                                   
  nss.x86_64 0:3.13.5-1.el6_3                                                   
  nss-sysinit.x86_64 0:3.13.5-1.el6_3                                           
  nss-tools.x86_64 0:3.13.5-1.el6_3                                             
  nss-util.x86_64 0:3.13.5-1.el6_3                                              
  openjpeg-libs.x86_64 0:1.3-8.el6_3                                            
  openldap.x86_64 0:2.4.23-26.el6_3.2                                           
  selinux-policy.noarch 0:3.7.19-155.el6_3                                      
  selinux-policy-targeted.noarch 0:3.7.19-155.el6_3                             
  sudo.x86_64 0:1.7.4p5-12.el6_3                                                
  tzdata.noarch 0:2012c-3.el6                                                   
  xulrunner.x86_64 0:10.0.6-1.el6_3                                             

Complete!

(2)インターネットプロバイダから支給されたルーターにファイアウォールが設定されているので、サーバーのファイアウォールは停止

[root@ufuso ~]# /etc/rc.d/init.d/iptables stop ← サーバーのファイアウォールを停止
iptables: ファイアウォールルールを消去中:                  [  OK  ]
iptables: チェインをポリシー ACCEPT へ設定中filter         [  OK  ]
iptables: モジュールを取り外し中:                          [  OK  ]

[root@ufuso ~]# chkconfig iptables off ← 自動起動の停止

(3)管理が困難なので、SELinux (Security-Enhanced Linux)を無効にする

[root@ufuso ~]# setenforce 0 ← SELinux無効化

[root@ufuso ~]# getenforce ← SELinux状態確認
Permissive ← SELinux無効

[root@ufuso ~]# vi /etc/sysconfig/selinux ← SELinuxの編集
# This file controls the state of SELinux on the system.
# 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=disabled ← サーバー起動時から停止にする
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

(4)管理者rootになれるユーザを制限する

[root@ufuso ~]# usermod -G wheel tu ← rootユーザーをtuに限定する

[root@ufuso ~]# vi /etc/pam.d/su ← ユーザー認証ファイルの編集

#%PAM-1.0
auth            sufficient      pam_rootok.so
# Uncomment the following line to implicitly trust users in the "wheel" group.
#auth           sufficient      pam_wheel.so trust use_uid
# Uncomment the following line to require a user to be in the "wheel" group.
auth           required     pam_wheel.so use_uid ← #を削除してrootユーザーになれる者を限定
auth            include         system-auth
account         sufficient      pam_succeed_if.so uid = 0 use_uid quiet
account         include         system-auth
password        include         system-auth
session         include         system-auth
session         optional        pam_xauth.so

(5)日本語処理に必要なnkfコマンドをインストールする

[root@ufuso ~]# yum -y install nkf ← nkfインストール
Installed:
  nkf.x86_64 1:2.0.8b-6.2.el6                                                   

Complete!

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

CAPTCHA


このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください