<?xml version="1.0" encoding="UTF-8" ?><rdf:RDF 
  xmlns="http://purl.org/rss/1.0/"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:atom="http://www.w3.org/2005/Atom"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xml:lang="ja">
  <channel rdf:about="http://w.atwiki.jp/linuxwotamesu/">
    <title>Linux 手習い @ ウィキ</title>
    <link>http://w.atwiki.jp/linuxwotamesu/</link>
    <atom:link href="https://w.atwiki.jp/linuxwotamesu/rss10.xml" rel="self" type="application/rss+xml" />
    <atom:link rel="hub" href="https://pubsubhubbub.appspot.com" />
    <description>Linux 手習い @ ウィキ</description>

    <dc:language>ja</dc:language>
    <dc:date>2012-04-03T20:42:06+09:00</dc:date>
    <utime>1333453326</utime>

    <items>
      <rdf:Seq>
                <rdf:li rdf:resource="https://w.atwiki.jp/linuxwotamesu/pages/35.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/linuxwotamesu/pages/34.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/linuxwotamesu/pages/33.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/linuxwotamesu/pages/32.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/linuxwotamesu/pages/31.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/linuxwotamesu/pages/30.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/linuxwotamesu/pages/29.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/linuxwotamesu/pages/28.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/linuxwotamesu/pages/27.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/linuxwotamesu/pages/26.html" />
              </rdf:Seq>
    </items>
	
		
    
  </channel>
    <item rdf:about="https://w.atwiki.jp/linuxwotamesu/pages/35.html">
    <title>Cent62/初期アップデート</title>
    <link>https://w.atwiki.jp/linuxwotamesu/pages/35.html</link>
    <description>
      ここは、初期アップデータのログ。

#html2(){&lt;pre style=&quot;font-family:monospace;line-height:120%&quot;&gt;
[root@vbox01 ~]# yum -y update
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: ftp.tsukuba.wide.ad.jp
 * extras: ftp.tsukuba.wide.ad.jp
 * updates: ftp.tsukuba.wide.ad.jp
Setting up Update Process
Resolving Dependencies
--&gt; Running transaction check
---&gt; Package chkconfig.i686 0:1.3.47-1.el6 will be updated
---&gt; Package chkconfig.i686 0:1.3.49.3-1.el6_2 will be an update
---&gt; Package curl.i686 0:7.19.7-26.el6_1.2 will be updated
---&gt; Package curl.i686 0:7.19.7-26.el6_2.4 will be an update
---&gt; Package dhclient.i686 12:4.1.1-25.P1.el6 will be updated
---&gt; Package dhclient.i686 12:4.1.1-25.P1.el6_2.1 will be an update
---&gt; Package dhcp-common.i686 12:4.1.1-25.P1.el6 will be updated
---&gt; Package dhcp-common.i686 12:4.1.1-25.P1.el6_2.1 will be an update
---&gt; Package dracut.noarch 0:004-256.el6 will be updated
---&gt; Package dracut.noarch 0:004-256.el6    </description>
    <dc:date>2012-04-03T20:42:06+09:00</dc:date>
    <utime>1333453326</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/linuxwotamesu/pages/34.html">
    <title>Cent62/初期パッケージ</title>
    <link>https://w.atwiki.jp/linuxwotamesu/pages/34.html</link>
    <description>
      ここは、初期パッケージと更新。

-最初に yum-plugin-fastestmirror を導入しようとしたら、導入済みだった。
-なにが初期インストールされているかをリスト（209 パッケージ）。
#html2(){&lt;pre style=&quot;font-family:monospace;line-height:120%&quot;&gt;
[root@vbox01 ~]# yum list installed
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: ftp.tsukuba.wide.ad.jp
 * extras: ftp.tsukuba.wide.ad.jp
 * updates: ftp.tsukuba.wide.ad.jp
Installed Packages
MAKEDEV.i686                              3.24-6.el6                              @anaconda-CentOS-201112130233.i386/6.2
acl.i686                                  2.2.49-6.el6                            @anaconda-CentOS-201112130233.i386/6.2
aic94xx-firmware.noarch                   30-2.el6                                @anaconda-CentOS-201112130233.i386/6.2
attr.i686                                 2.4.44-7.el6                            @anaconda-CentOS-201112130233.i386/6.2
audit.i686                                2.1.3-3.el6                             @anaconda-CentOS-    </description>
    <dc:date>2012-04-03T20:37:14+09:00</dc:date>
    <utime>1333453034</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/linuxwotamesu/pages/33.html">
    <title>Cent62/初期サービス</title>
    <link>https://w.atwiki.jp/linuxwotamesu/pages/33.html</link>
    <description>
      ここは、初期に導入されているサービスがなにかという話。

|サービス名|初期動作&amp;br()runlevel3|動作目的|備考|
|auditd|on|ログイン等の証跡|いつだれが何にログインしたかが /var/log/audit/audit.log に記録される|
|cgconfig|off|コントロールグループ実行|cpu やメモリ割り当てをグループ単位で制限する|
|cgred|off|コントロールグループ適用|コントロールグループの設定に従いプロセスを移動する|
|fcoe|on|ファイルバーチャネルonイーサネット|個人ではしばらく使わないよね|
|ip6tables|on|IPv6用のパケットフィルタリング他|家環境では不要かな|
|iptables|on|IPv4用のパケットフィルタリング他|家環境では不要かな|
|iscsi|on|iscsi接続用その１|iscsi提供サーバと接続する|
|iscsid|on|iscsi接続用その２|iscsi提供サーバと接続する|
|lldpad|on|データリンク層の接続を検出、管理|Link Layer Discovery Protocol|
|lvm2-monitor|on|論理ボリュームマネージャの監視|LVM 利用時は必須の様子|
|multipathd|off|I/O を複数パスで接続|個人では・・・|
|netconsole|off|UDP でコンソール出力を流す|シリアルコンソールがない時に使うっぽい|
|netfs|on|ネットワーク越しのファイルシステムをマウント|/etc/fstab を見る|
|network|on|ネットワーク全般|必須|
|nfs|off|NFS だね||
|nfslock|on|NFS ファイルロック実現|なぜこちらは on ？|
|rdisc|off|ルータ検索|家環境では・・・|
|restorecond|off|ファイル作成時 SELinux 制約を確認|/etc/selinux/restorecond.conf に対象記述|
|rpcbind|on|RPC 呼び出し時のアドレス変換実施|Remote Procedure Call|
|rpcgssd|on|NFSv4 用 ケルベロス認証 RPC クライアント側|RPCSE    </description>
    <dc:date>2012-04-01T22:00:18+09:00</dc:date>
    <utime>1333285218</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/linuxwotamesu/pages/32.html">
    <title>Cent62/リソース状態</title>
    <link>https://w.atwiki.jp/linuxwotamesu/pages/32.html</link>
    <description>
      ここは、SSH 接続設定後のリソース状態。

メモリ状態。
#html2(){&lt;pre style=&quot;font-family:monospace;line-height:120%&quot;&gt;
[cent@vbox01 ~]$ cat /proc/meminfo
MemTotal:        1030940 kB
MemFree:          940168 kB
Buffers:            7564 kB
Cached:            32556 kB
SwapCached:            0 kB
Active:            18392 kB
Inactive:          28384 kB
Active(anon):       6784 kB
Inactive(anon):       40 kB
Active(file):      11608 kB
Inactive(file):    28344 kB
Unevictable:           0 kB
Mlocked:               0 kB
HighTotal:        141256 kB
HighFree:          97916 kB
LowTotal:         889684 kB
LowFree:          842252 kB
SwapTotal:       2064376 kB
SwapFree:        2064376 kB
Dirty:                40 kB
Writeback:             0 kB
AnonPages:          6668 kB
Mapped:             5352 kB
Shmem:               172 kB
Slab:              31184 kB
SReclaimable:       4860 kB
SUnreclaim:        26324 kB
KernelStack:         640 kB
PageTables:          868 kB
NFS_Unstable:          0 kB    </description>
    <dc:date>2012-04-01T16:48:55+09:00</dc:date>
    <utime>1333266535</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/linuxwotamesu/pages/31.html">
    <title>リソース消費</title>
    <link>https://w.atwiki.jp/linuxwotamesu/pages/31.html</link>
    <description>
      ここは、リソース消費の話。

ホスト（Windows7）での仮想マシン起動前後のメモリ消費。
||物理メモリ利用可能(MB)|差(MB)|
|仮想マシン起動前(*1)|4758|-|
|仮想マシン×１のみ|4434|316|
|仮想マシン起動前２(*1)|4765|-|
|仮想マシン×１&amp;br()＋NPTP＋シリアルコンソール|4401|364|
|さらに SSH 接続ターミナル|4378|23|
　*1 タスクマネージャーとリソースモニターのみ起動

仮想マシンにメモリ 1GB を割り当てているが、必要にならないと確保しない様子。

&amp;link_edit(text=ここを編集)    </description>
    <dc:date>2012-04-01T16:16:24+09:00</dc:date>
    <utime>1333264584</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/linuxwotamesu/pages/30.html">
    <title>起動</title>
    <link>https://w.atwiki.jp/linuxwotamesu/pages/30.html</link>
    <description>
      ここは、ホスト（Windows7）からゲストを起動するバッチファイルの話。

毎回、NPTP 起動→コンソール用 TeraTerm 起動→[[VirtualBox]] 起動→仮想マシン起動、が面倒なので、バッチファイルを作成。
-仮想マシン起動用バッチ（startVbox.bat）
#html2(){&lt;pre style=&quot;font-family:monospace;line-height:120%&quot;&gt;
@echo off
rem start virtualMachine
rem %1 : virtualMachineName
if / == /%1 goto err
&quot;C:\Program Files\Oracle\VirtualBox\VBoxHeadless&quot; --startvm %1
exit
:err
echo &quot;Need VirtualMachineName&quot;
pause
&lt;/pre&gt;}
-NPTP 起動とコンソール用 TearTerm 起動してから仮想マシン起動用バッチ（startVboxWithNPTP.bat）
#html2(){&lt;pre style=&quot;font-family:monospace;line-height:120%&quot;&gt;
@echo off
rem start virtualMachine with NPTP &amp; TeraTermConsole
rem %1 : virtualMachineName
if / == /%1 goto err
start &quot;NPTP&quot; /B &quot;C:\Program Files (x86)\Named Pipe TCP Proxy\piped.exe&quot;
start &quot;TeraTermConsole&quot; /B C:\Home\tools\teraterm-4.73\ttermpro.exe localhost:10111 /F=SerialConsole.INI
call C:\Home\MyTool\Script\vbox\startvbox.bat %1
exit
:err
echo &quot;Need VirtualMachineName&quot;
pause
&lt;/pre&gt;}
-まとめて CentOS 6.2 起動（startFirstCent62.bat）
#    </description>
    <dc:date>2012-03-31T15:19:35+09:00</dc:date>
    <utime>1333174775</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/linuxwotamesu/pages/29.html">
    <title>Cent62/SSHログイン</title>
    <link>https://w.atwiki.jp/linuxwotamesu/pages/29.html</link>
    <description>
      ここは、SSHに関する設定。

SSH 接続用に /etc/sshd_config を以下のように修正。
-Port 22
-ListenAddress 192.168.xx.xx ←アダプタ２(=eth1)のアドレス
-PermitRootLogin no
-PermitEmptyPasswords no
-PasswordAuthentication yes ←初期有効となっていた

保存して、/etc/rc.d/init.d/sshd restart でサービスを再起動。
TeraTerm から Host はアダプタ２のアドレス、Sevice は SSH、TCP port は 22、SSH version は SSH2、認証は plain password で無事接続した。

&lt;追記&gt;
鍵認証式に変更した。
SSH 接続用に /etc/sshd_config を以下のように修正。
-#PasswordAuthentication yes ←コメントアウト

&amp;link_edit(text=ここで編集)    </description>
    <dc:date>2012-03-31T15:21:38+09:00</dc:date>
    <utime>1333174898</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/linuxwotamesu/pages/28.html">
    <title>Cent62/ユーザ追加</title>
    <link>https://w.atwiki.jp/linuxwotamesu/pages/28.html</link>
    <description>
      ここは、ユーザ追加に関する設定。

管理ユーザ cent を useradd でユーザIDとグループwheelを指定して作成。続いて passwd でパスワードを指定。直後にログインした時の状況はこんな感じ。
#html2(){&lt;pre style=&quot;font-family:monospace;line-height:120%&quot;&gt;
[cent@vbox01 ~]$ pwd
/home/cent
[cent@vbox01 ~]$ ls -la
合計 20
drwx------. 2 cent wheel 4096  3月 29 21:56 2012 .
drwxr-xr-x. 3 root root  4096  3月 29 21:56 2012 ..
-rw-r--r--. 1 cent wheel   18 12月  2 23:40 2011 .bash_logout
-rw-r--r--. 1 cent wheel  176 12月  2 23:40 2011 .bash_profile
-rw-r--r--. 1 cent wheel  124 12月  2 23:40 2011 .bashrc
[cent@vbox01 ~]$ id
uid=201(cent) gid=10(wheel) 所属グループ=10(wheel) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[cent@vbox01 ~]$
&lt;/pre&gt;}

root へログインできるグループを wheel に限定するため、/etc/pam.d/su の auth required pam_wheel.so use_uid の行のコメントを外した（wheel 限定は参考としたサイトが皆行っていたため）。
また、root のメールエイリアスを cent にするため、/etc/aliases を修正したが、minimal パッケージではメールサーバがインストールされないので無意味だった。

&amp;link_edit(text=ここで編集)    </description>
    <dc:date>2012-03-30T20:50:35+09:00</dc:date>
    <utime>1333108235</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/linuxwotamesu/pages/27.html">
    <title>Cent62/設定情報</title>
    <link>https://w.atwiki.jp/linuxwotamesu/pages/27.html</link>
    <description>
      CentOS のインストール後（シリアルコンソール接続後）の設定。

-/etc/grub.conf
#html2(){&lt;pre style=&quot;font-family:monospace;line-height:120%&quot;&gt;
[root@vbox01 ~]# cat /etc/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/mapper/vg_vbox01-lv_root
#          initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
#splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
serial --unit=0 --speed 115200
title CentOS (2.6.32-220.el6.i686)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-220.el6.i686 ro root=/dev/mapper/vg_vbox01-lv_root rd_NO_LUKS rd_LVM_LV=vg_vbox01/lv_swap rd_NO_MD quiet rhgb crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=jp106 rd_LVM_LV=vg_vbox01/lv_root LANG=ja_JP.UTF-8 rd_NO_DM console=tty0 console=ttyS0,115200    </description>
    <dc:date>2012-03-28T21:25:24+09:00</dc:date>
    <utime>1332937524</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/linuxwotamesu/pages/26.html">
    <title>Cent62/初期状態</title>
    <link>https://w.atwiki.jp/linuxwotamesu/pages/26.html</link>
    <description>
      CentOS のインストール後（シリアルコンソール接続後）の状態。

ttyの状況。
#html2(){&lt;pre style=&quot;font-family:monospace;line-height:120%&quot;&gt;
[root@vbox01 ~]# ps -aef | grep tty
root      1255     1  0 20:29 tty1     00:00:00 /sbin/mingetty /dev/tty1
root      1257     1  0 20:29 tty2     00:00:00 /sbin/mingetty /dev/tty2
root      1265  1252  0 20:29 ttyS0    00:00:00 -bash
root      1475     1  0 20:46 ?        00:00:00 /sbin/mingetty dev/ttyS0
root      1476  1265  8 20:46 ttyS0    00:00:00 ps -aef
root      1477  1265  2 20:46 ttyS0    00:00:00 grep tty
[root@vbox01 ~]#
&lt;/pre&gt;}

ネットワークの状態。
#html2(){&lt;pre style=&quot;font-family:monospace;line-height:120%&quot;&gt;
[root@vbox01 ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 08:00:27:8F:CB:36
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe8f:cb36/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packet    </description>
    <dc:date>2012-03-29T21:16:26+09:00</dc:date>
    <utime>1333023386</utime>
  </item>
  </rdf:RDF>
