harry’s memorandum

おれおれメモ

RHEL6のls -l のパーミッション の ピリオド "." って何よ

RHEL6から ls -l を実行すると パーミッションのフォーマット に ピリオド "." がつくことがあります。すげー気になります。

$ env LANG=C ls -l  /etc/resolv.conf /etc/hosts
-rw-r--r--  1 root root 350 Apr  6 19:12 /etc/hosts
-rw-r--r--. 1 root root  45 Apr  6 14:29 /etc/resolv.conf

イラっとしてきたので coreutils-8.4/src/ls.c を見てみました。

  /* Compute the mode string, except remove the trailing space if no
     file in this directory has an ACL or SELinux security context.  */
  if (f->stat_ok)
    filemodestring (&f->stat, modebuf);
  else
    {
      modebuf[0] = filetype_letter[f->filetype];
      memset (modebuf + 1, '?', 10);
      modebuf[11] = '\0';
    }
  if (! any_has_acl)
    modebuf[10] = '\0';
  else if (f->acl_type == ACL_T_SELINUX_ONLY)
    modebuf[10] = '.';
  else if (f->acl_type == ACL_T_YES)
    modebuf[10] = '+';

なるほど。
"." ピリオドは SELinuxのセキュリティコンテキストが付いているファイル。
"+" プラスは ACLの設定されたファイル。
少しすっきりしました。

$ env LANG=C ls -l  /etc/resolv.conf /etc/hosts
-rw-r--r--  1 root root 350 Apr  6 19:12 /etc/hosts
-rw-r--r--. 1 root root  45 Apr  6 14:29 /etc/resolv.conf
$ env LANG=C ls -lZ /etc/resolv.conf /etc/hosts
-rw-r--r--  root root ?                                /etc/hosts
-rw-r--r--. root root system_u:object_r:net_conf_t:s0  /etc/resolv.conf

centos5 に php5.3をインストールのメモ

メモ書き。

$ wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
$ wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
$ sudo rpm -ivh *rpm
$ sudo yum install --enablerepo=remi php php-mbstring php-ldap

mysqlでコンフリクトおきたら、baseリポジトリのmysql消して epelか remiのmysqlをインストール。

epelってのはExtra Packages for Enterprise Linuxの略。

エンタープライズ Linux 用の拡張パッケージ(EPEL) は、 Red Hat Enterprise Linux (RHEL) 向けの高品質なアドオンパッケージであり、CentOS や Scientific Linux (SL) のような RHEL からスピンオフしたディストリビューションと互換性のある、Fedora プロジェクトで有志によって作成されたパッケージになります。FedoraRHEL のアップストリームであり、EPEL のアドオンパッケージは主に RHEL 向けにビルドされた Fedora リポジトリをソースとしています。

CentOS5.4 + Xen4.0 にしてみた

Xen4.0リリース。Testing版だけどgitcoさんが作ってくれているのでインストールだけしてみた。
内容は前回、前々回と同じ。

yumのrepositoryを追加してupdate
$ cd /etc/yum.repos.d
$ sudo wget http://www.gitco.de/repo/GITCO-XEN4.0.0_testing_x86_64.repo
$ sudo yum update

Dependencies Resolved

==========================================================================================
 Package          Arch          Version               Repository                     Size
==========================================================================================
Updating:
 xen              x86_64        4.0.0-3.el5           gitco-xen4.0.0-testing         12 M
 xen-devel        x86_64        4.0.0-3.el5           gitco-xen4.0.0-testing        408 k
 xen-libs         x86_64        4.0.0-3.el5           gitco-xen4.0.0-testing        366 k

Transaction Summary
==========================================================================================
Install      0 Package(s)
Update       3 Package(s)
Remove       0 Package(s)

Total download size: 13 M
Is this ok [y/N]: y
grub.confのエントリもちゃんと新しいxenでキックすることを確認。
title CentOS (2.6.18-164.15.1.el5xen)
  root (hd0,0)
  kernel /xen.gz-4.0.0
  module /vmlinuz-2.6.18-164.15.1.el5xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet
  module /initrd-2.6.18-164.15.1.el5xen.img
リブート
$ sudo reboot
xenの確認
$ sudo xm dmesg | more
 __  __            _  _    ___   ___
 \ \/ /___ _ __   | || |  / _ \ / _ \
  \  // _ \ '_ \  | || |_| | | | | | |
  /  \  __/ | | | |__   _| |_| | |_| |
 /_/\_\___|_| |_|    |_|(_)___(_)___/

(XEN) Xen version 4.0.0 (root@gitco.tld) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) S
un May  2 19:44:45 CEST 2010
追記

2010/05/08
centosのdomainUが起動しない。準仮想centos5のdomainUのみ今のところだめっぽい。

CentOS5.4 + Xen3.4.2 にしてみた

http://www.gitco.de/repo/ の人が Xenの3.4.2を提供しております。ほんとありがたい限りです。というので、前回と内容はほとんど同じですがXen3.3.1からXen3.4.2にアップデートしてみました。
http://d.hatena.ne.jp/dharry/20090607/1244333541

最初はgitco.deさんの古いリポジトリを無効にします。

$ sudo vim /etc/yum.repos.d/CentOS5-GITCO_x86_64.repo
[gitco]
name=CentOS-$releasever - GITCO
baseurl=http://www.gitco.de/linux/x86_64/centos/5/rpms/
gpgcheck=1
#enabled=1
enabled=0

Xen3.4.2のリポジトリをダウンロード

$ cd /etc/yum.repos.d/
$ sudo wget http://www.gitco.de/repo/GITCO-XEN3.4.2_x86_64.repo

yum で アップデート

$ sudo yum clean all
$ sudo yum update
==========================================================================================
 Package               Arch        Version                      Repository           Size
==========================================================================================
Updating:
 gtk-vnc               x86_64      0.3.9-1.el5                  gitco-xen3.4.2       89 k
 gtk-vnc-python        x86_64      0.3.9-1.el5                  gitco-xen3.4.2       16 k
 libvirt               x86_64      0.7.0-6.el5                  gitco-xen3.4.2      481 k
 libvirt-python        x86_64      0.7.0-6.el5                  gitco-xen3.4.2      153 k
 python-virtinst       noarch      0.500.0-1.el5                gitco-xen3.4.2      475 k
 qemu                  x86_64      0.10.5-1.el5                 gitco-xen3.4.2       14 M
 virt-manager          x86_64      0.7.0-1.el5                  gitco-xen3.4.2      1.4 M
 xen                   x86_64      3.4.2-2.el5                  gitco-xen3.4.2       10 M
 xen-devel             x86_64      3.4.2-2.el5                  gitco-xen3.4.2      259 k
 xen-libs              x86_64      3.4.2-2.el5                  gitco-xen3.4.2      166 k
Installing for dependencies:
 fuse                  x86_64      2.7.4-8.el5                  base                 83 k
 fuse-libs             x86_64      2.7.4-8.el5                  base                 71 k
 glusterfs-client      x86_64      2.0.8-1.el5                  gitco-xen3.4.2      9.1 k
 glusterfs-common      x86_64      2.0.8-1.el5                  gitco-xen3.4.2      975 k
 libibverbs            x86_64      1.1.2-4.el5                  base                 44 k
 libvirt-client        x86_64      0.7.0-6.el5                  gitco-xen3.4.2      1.8 M
 openib                noarch      1.4.1-3.el5                  base                 20 k
 qemu-img              x86_64      0.10.5-1.el5                 gitco-xen3.4.2       88 k
 xz-libs               x86_64      4.999.9-0.1.beta.el5         gitco-xen3.4.2       94 k

Transaction Summary
==========================================================================================
Install      9 Package(s)
Update      10 Package(s)
Remove       0 Package(s)

Total download size: 31 M
Is this ok [y/N]:

念のためXenとgrub.confを確認。

$ ls -l /boot/xen.gz-3.4.2
-rw-r--r-- 1 root root 546295 11月 12 05:18 /boot/xen.gz-3.4.2
$ cat /etc/grub.conf  | grep -v ^#
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-164.6.1.el5xen)
        root (hd0,0)
        kernel /xen.gz-3.4.2
        module /vmlinuz-2.6.18-164.6.1.el5xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        module /initrd-2.6.18-164.6.1.el5xen.img
title CentOS (2.6.18-164.6.1.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-164.6.1.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.18-164.6.1.el5.img

マシンリブート

$ sudo sync; sudo reboot

めでたく Xen3.4.2になりました。

# xm dmesg
 __  __            _____ _  _    ____
 \ \/ /___ _ __   |___ /| || |  |___ \
  \  // _ \ '_ \    |_ \| || |_   __) |
  /  \  __/ | | |  ___) |__   _| / __/
 /_/\_\___|_| |_| |____(_) |_|(_)_____|

(XEN) Xen version 3.4.2 (root@gitco.tld) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)) Wed Nov 11 21:16:28 CET 2009

3.3.x系からの変更履歴はこんなところ。
http://www.xen.org/download/index_3.4.1.html

  • Device passthrough improvements, with particular emphasis on support for client devices (further support is available as part of the XCI project).
  • RAS features: cpu and memory offlining
  • Power management: improved frequency/voltage controls and deep-sleep support. Scheduler and timers optimised for peak power savings.
  • Support for the Viridian (Hyper-V) enlightenment interface
  • Many other changes in both x86 and IA64 port

Hyper-VのイメージをそのままXenで動かすことが可能というところが面白そう。することはないと思うけど。
あとRASなるものが。意味がよくわかんね。
http://www.virtualization.info/jp/2009/06/xen34hyper-v20090601-5.html

RAS - Reliability(信頼性) - Availability(可用性) - Serviceability(保守性)
Xen 3.4は、システムの不具合を回避および検知し、システム障害を切り離すことで最大限のアップタイムを実現し、システム障害を管理者に通知してハードウェア/ソフトウェアを適切に保守する多数の機能を用意している。これらのサービスを組み合わせることで、障害対応およびバックアップ機能を内蔵した堅牢なXenハイパーバイザーが実現する。

CentOS 5.3のリリースの時期はもうそろそろかな

CentOSのフォーラムを眺めていたら。

http://www.centos.org/modules/newbb/viewtopic.php?topic_id=18223&viewmode=flat&order=ASC&start=160

I'd be very surprised if it wasn't released within the next week. They've indicated that it's just about ready and it takes 2-3 days to sync, so I'd guess towards the end of this next week. Then again, who am I to accurately guess. ;)

I'd definitely wait for CentOS 5.3 rather than use SL.

今月中にリリースする感じかな。楽しみです。