初期設定メモ

管理者用のユーザを追加

# useradd user
# passwd user
Changing password for user user.
New UNIX password: 
Retype new UNIX password: 
passwd: all authentication tokens updated successfully.

root になれるユーザを管理者のみに制限する

# usermod -G wheel user
# vi /etc/pam.d/su
auth    required    pam_wheel.so    use_uid

yum 設定

# /etc/init.d/yum-updatesd stop
yum-updates を停止中:                                      [  OK  ]
# yum -y remove yum-updatesd
Loaded plugins: fastestmirror
Setting up Remove Process
...
Removed: yum-updatesd.noarch 1:0.9-2.el5
Complete!
# yum -y update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
...
Complete!
# wget http://mirror.centos.org/centos/5.2/os/i386/CentOS/yum-cron-0.6-1.el5.centos.noarch.rpm
# yum -y install yum-downloadonly
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
...
Installed: yum-downloadonly.noarch 0:1.1.16-13.el5.centos
Complete!
# rpm -ivh yum-cron-0.6-1.el5.centos.noarch.rpm
準備中...                ########################################### [100%]
   1:yum-cron               ########################################### [100%]
# /etc/init.d/yum-cron start
Enabling nightly yum update:                               [  OK  ]
# chkconfig yum-cron on

CentOS 5.3 では yum-fastestmirror が最初からインストールされている。
インストールされていない環境の場合は、yum -y install yum-fastestmirror する。

CentOS 5.3 では yum-cron がなくなっている。
とりあえず 5.2 から RPM 引っ張ってきてインストール。
yum-downloadonly は、yum-cron の依存対象みたいなので事前にインストールしとく。

SELinux 無効化

# getenforce 
Enforcing
# setenforce 0
# getenforce 
Permissive
# vi /etc/selinux/config
SELINUX=disabled

参考

CentOS5初期設定

関連エントリー:

自宅サーバ + パソコン

自宅サーバ + RPMforgeリポジトリ導入

自宅サーバ + Vim

自宅サーバ + Tripwire

自宅サーバ + iptables

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <img localsrc="" alt=""> <pre lang="" line="" escaped="" highlight="">