概要. CentOS導入直後の初期設定を行う。
1.rootの設定 # vi /root/.bashrc 以下の1行を追加する。 set -o vi 2. テンプレートディレクトリーの作成 # cd /etc/skel/ # mkdir Maildir ← qmailでMaildir形式のメールボックスを使用する場合。 # mkdir Maildir/cur # mkdir Maildir/new # mkdir Maildir/tmp # chmod -R 700 Maildir ← メールボックスの権限は700とする。 # mkdir .ssh ← SSHで公開鍵を使用する場合。 # chmod -R 700 .ssh ← 公開鍵のディレクトリーの権限は700とする。 # mkdir public_html ← 一般ユーザーにホームページスペースを提供する場合。 # mkdir samba ← 各ユーザーにsambaでWindowsファイルサーバーのディレクトリーを割当てる場合。 # mkdir etc ← FTPサーバー構築でホームディレクトリより上層へはアクセスできないようにする場合。 # cp -p /etc/localtime /etc/skel/etc/ 3. グループの作成 # groupadd -g 200 dbadmin 4. ユーザの作成
# useradd -u 200 -g mysqladm dbadmin # usermod -G wheel dbadmin # passwd dbadmin Changing password for user dbadmin. New UNIX password: xxxxxxxx Retype new UNIX password: xxxxxxxx passwd: all authentication tokens updated successfully. # useradd -u 500 -g dbadmin developer # passwd developer Changing password for user developer. New UNIX password: xxxxxxxx Retype new UNIX password: xxxxxxxx passwd: all authentication tokens updated successfully. # useradd -g dbadmin admin # passwd admin Changing password for user admin. New UNIX password: xxxxxxxx Retype new UNIX password: xxxxxxxx passwd: all authentication tokens updated successfully. # usermod -G wheel admin 5. rootになれるユーザを管理者のみにする
6. パッケージ管理システム設定
7. 作業ディレクトリーの作成 # mkdir /tmp/work 作業が終了したら適時ダウンロードや展開したファイルを削除する。 # rm -rf /tmp/work Last-modified: 2014-03-11 (火) 01:59:57 (3696d)
|