SyntaxHighlighter

2008/12/19

CentOS-5.2 memo (reiserfs, sshfs, JP-106 keyboard layout setting)

The Definitive Guide to CentOS
  1. centosplus kernel and reiserfs
      To enable reiserfs on CentOS-5.2, you have to install centos-plusplus repository and the kernel packages.
      1. Get centos-plus kernel packages:
        wget http://mirror.centos.org/centos/5.2/centosplus/i386/RPMS/kernel-2.6.18-92.1.22.el5.centos.plus.i686.rpm
        wget http://mirror.centos.org/centos/5.2/centosplus/i386/RPMS/kernel-devel-2.6.18-92.1.22.el5.centos.plus.i686.rpm
        wget http://mirror.centos.org/centos/5.2/centosplus/i386/RPMS/kernel-headers-2.6.18-92.1.22.el5.centos.plus.i386.rpm

      2. Install the kernel:
        rpm -ivh kernel-*2.6.18-92.1.22.el5.centos.plus.i386.rpm

      3. Check that /etc/grub.conf indicates that the booted kernel version is of the centos plus package.
      Next you also have to install reiserfs utils
      wget http://mirror.centos.org/centos/5.2/centosplus/i386/RPMS/reiserfs-utils-3.6.19-2.4.1.i386.rpm
      rpm -ivh reiserfs-utils-3.6.19-2.4.1.i386.rpm
      Finally you must reboot the system. Before or after rebooting, it is better to enable centos-plus repository for yum update in the future. If you like to do it, edit and change the value of "enabled" to "1" in [centosplus] section in /etc/yum.repos.d/CentOS-Base.repo such like:
      [centosplus]
      ...
      enabled=1
      ...
      After rebooting, you must be able to use reiserfs mount and the tools.
  2. sshfs, and encfs
      To use sshfs and encfs, you have to install fuse package. If you have never installed an fuse package,
      wget http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/fuse-2.7.4-1.el5.rf.i386.rpm
      rpm -ivh fuse-2.7.4-1.el5.rf.i386.rpm
      # To enable all users to use fuse,
      chmod o+x /usr/bin/fusermount
      chmod o+rw /dev/fuse
      sed -e's/660/666/' /etc/makedev.d/z-fuse
      sed -e's/660/666/' /etc/udev/rules.d/99-fuse.rules
      For sshfs,
      wget http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/fuse-sshfs-2.2-1.el5.rf.i386.rpm
      rpm -ivh fuse-sshfs-2.2-1.el5.rf.i386.rpm
      NOTE: At first, I tried to install fuse-sshfs package of Fedora8. But it needs newer openssh-clients package than CentOS. Although it is also possible to adapt openssh-clients package from Fedora8, it means that the system became negligible to receive updates about openssh from the official CentOS repository. Because I wanted to avoid corrupting the standard security packages, I used the rpmforge package. To mount and unmount by using sshfs are done like
      sshfs ${USER}@${HOST}:/a/dir/path /local/mount/dir
      fusermount -u /local/mount/dir
      For encfs,
      wget http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rlog-1.3.7-1.el5.rf.i386.rpm
      rpm -ivh rlog-1.3.7-1.el5.rf.i386.rpm
      wget http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/fuse-encfs-1.4.1-1.el5.rf.i386.rpm
      rpm -ivh fuse-encfs-1.4.1-1.el5.rf.i386.rpm
      To create encfs directory,
      encfs ${PWD}/a ${PWD}/b
      Creating new encrypted volume.
      Please choose from one of the following options:
      enter "x" for expert configuration mode,
      enter "p" for pre-configured paranoia mode,
      anything else, or an empty line will select standard mode.
      ?>

      Standard configuration selected.

      Configuration finished. The filesystem to be created has
      the following properties:
      Filesystem cipher: "ssl/blowfish", version 2:1:1
      Filename encoding: "nameio/block", version 3:0:1
      Key Size: 160 bits
      Block Size: 512 bytes
      Each file contains 8 byte header with unique IV data.
      Filenames encoded using IV chaining mode.

      Now you will need to enter a password for your filesystem.
      You will need to remember this password, as there is absolutely
      no recovery mechanism. However, the password can be changed
      later using encfsctl.

      New Encfs Password:
      Verify Encfs Password:
      To mount and umount encfs directory,
      encfs ${PWD}/a ${PWD}/b
      EncFS Password:

      fusermount -u ${PWD}/b
      NOTE: It is necessary to use absolute paths for encfs.
  3. JP-106 keyboard layout setting
      1. Open [System]->[Setting]->[Keyboard]
      2. Open "Layout" tab
      3. Choose and check Japanese 106-key as keyboard layout
      4. Add Japan in the select section
      5. Remove U.S. English entry (This is important!!!)
      6. Then close the window

0 件のコメント: