<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta http-equiv="Content-Style-Type" content="text/css">
<title>TOMOYO Linux Install manual</title>
<link rel="stylesheet" href="http://tomoyo.sourceforge.jp/tomoyo.css" media="all" type="text/css">
</head>
<body>
<p>Info: Version <a href="../1.8/">1.8.x</a> is available.</p>
<p style="text-align:right;"><a href="install.html.ja">Japanese Page</a></p>
<p style="text-align:right;">Last modified: $Date: 2011-12-22 10:19:04 +0900 (Thu, 22 Dec 2011) $</p>
<h1>Phase 1: Installing TOMOYO Linux kernels and tools.</h1>

<p>This page describes how to install TOMOYO Linux's kernel and userland tools.</p>

<p>There are two ways to install. Choose either "Step 1-A" / "Step 1-B" depending on your environment and your requirement.</p>

<ul>
<li><a href="#install_from_repository">Step 1-A: Installing binary packages</a></li>
<li><a href="#install_from_source">Step 1-B: Installing from source</a></li>
</ul>

<hr>

<h2><a name="install_from_repository">Step 1-A: Installing binary packages</a></h2>

<p>TOMOYO Linux provides some binary kernel packages and binary tool packages for i686 architecture. If your environment matches the list below and CPU is i686, you can install using binary packages.</p>

<ul>
<li>Fedora 14</li>
<li>CentOS 3.9/4.9/5.7/6.2</li>
<li>OpenSUSE 11.3</li>
<li>Vine Linux 5.2</li>
<li>Asianux 2.0/3.0</li>
<li>Debian Lenny</li>
<li>Ubuntu 8.04/10.04/10.10</li>
</ul>

<p>If you use RPM packages, please import GPG key by doing the following operation.</p>

<table border="1">
<tr><td>
[root@tomoyo ~]# wget http://I-love.SAKURA.ne.jp/kumaneko-key<br>
[root@tomoyo ~]# rpm --import kumaneko-key<br>
</td></tr>
</table>

<p>If you use DEB packages, please import GPG key by doing the following operation.</p>

<table border="1">
<tr><td>
[root@tomoyo ~]# wget http://I-love.SAKURA.ne.jp/kumaneko-key<br>
[root@tomoyo ~]# apt-key add kumaneko-key<br>
</td></tr>
</table>

<p>To install from repository, do the following operation. You can manually download and install from <a href="http://sourceforge.jp/projects/tomoyo/releases/?package_id=10270" target="_blank">binary packages</a> if you don't want to use repositories.</p>

<table border="1">
<tr><td>
Fedora 14 (for i686 and later)</td><td>
[root@tomoyo ~]# wget -O /etc/yum.repos.d/ccs.repo http://tomoyo.sourceforge.jp/repos-1.7/Fedora14/ccs.repo<br>
[root@tomoyo ~]# yum install ccs-kernel ccs-tools
</td></tr><tr><td>
CentOS 3.9 (for i686 and later)</td><td>
[root@tomoyo ~]# curl http://tomoyo.sourceforge.jp/repos-1.7/CentOS3/ccs.repo &gt;&gt; /etc/yum.conf<br>
[root@tomoyo ~]# yum install ccs-kernel-smp ccs-tools
</td></tr><tr><td>
CentOS 4.9 (for i586 and later)</td><td>
[root@tomoyo ~]# wget -O /etc/yum.repos.d/ccs.repo http://tomoyo.sourceforge.jp/repos-1.7/CentOS4/ccs.repo<br>
[root@tomoyo ~]# yum install ccs-kernel-smp ccs-tools
</td></tr><tr><td>
CentOS 5.7 (for i686 and later)</td><td>
[root@tomoyo ~]# wget -O /etc/yum.repos.d/ccs.repo http://tomoyo.sourceforge.jp/repos-1.7/CentOS5/ccs.repo<br>
[root@tomoyo ~]# yum install ccs-kernel ccs-tools
</td></tr><tr><td>
CentOS 6.2 (for i686 and later)</td><td>
[root@tomoyo ~]# wget -O /etc/yum.repos.d/ccs.repo http://tomoyo.sourceforge.jp/repos-1.7/CentOS6/ccs.repo<br>
[root@tomoyo ~]# yum install ccs-kernel ccs-tools
</td></tr><tr><td>
Asianux 2.0 (for i686 and later)</td><td>
[root@tomoyo ~]# wget -O /etc/yum.repos.d/ccs.repo http://tomoyo.sourceforge.jp/repos-1.7/Asianux2/ccs.repo<br>
[root@tomoyo ~]# yum install ccs-kernel-smp ccs-tools
</td></tr><tr><td>
Asianux 3.0 (for i686 and later)</td><td>
[root@tomoyo ~]# wget -O /etc/yum.repos.d/ccs.repo http://tomoyo.sourceforge.jp/repos-1.7/Asianux3/ccs.repo<br>
[root@tomoyo ~]# yum install ccs-kernel ccs-tools
</td></tr><tr><td>
Vine Linux 5.2 (for i586 and later)</td><td>
[root@tomoyo ~]# echo "repomd http://tomoyo.sourceforge.jp/ repos-1.7/VineLinux5/" &gt;&gt; /etc/apt/sources.list<br>
[root@tomoyo ~]# apt-get update<br>
[root@tomoyo ~]# apt-get install ccs-kernel ccs-tools
</td></tr><tr><td>
OpenSUSE 11.3 (for i586 and later)</td><td>
[root@tomoyo ~]# zypper addrepo --type=YUM http://tomoyo.sourceforge.jp/repos-1.7/SUSE11.3/ ccs<br>
[root@tomoyo ~]# zypper install ccs-kernel-default ccs-tools
</td></tr><tr><td>
Debian Lenny (for 686 flavour)</td><td>
[root@tomoyo ~]# echo 'deb http://osdn.dl.sourceforge.jp/tomoyo/45231/ ./' &gt;&gt; /etc/apt/sources.list<br>
[root@tomoyo ~]# apt-get update<br>
[root@tomoyo ~]# apt-get install linux-image-2.6-686-ccs ccs-tools
</td></tr><tr><td>
Ubuntu 8.04 (for generic flavour)</td><td>
[root@tomoyo ~]# echo 'deb http://osdn.dl.sourceforge.jp/tomoyo/45068/ ./' &gt;&gt; /etc/apt/sources.list<br>
[root@tomoyo ~]# apt-get update<br>
[root@tomoyo ~]# apt-get install linux-ccs ccs-tools
</td></tr><tr><td>
Ubuntu 10.04 (for generic-pae flavour)</td><td>
[root@tomoyo ~]# echo 'deb http://osdn.dl.sourceforge.jp/tomoyo/47128/ ./' &gt;&gt; /etc/apt/sources.list<br>
[root@tomoyo ~]# apt-get update<br>
[root@tomoyo ~]# apt-get install linux-ccs ccs-tools
</td></tr><tr><td>
Ubuntu 10.10 (for generic-pae flavour)</td><td>
[root@tomoyo ~]# echo 'deb http://osdn.dl.sourceforge.jp/tomoyo/48987/ ./' &gt;&gt; /etc/apt/sources.list<br>
[root@tomoyo ~]# apt-get update<br>
[root@tomoyo ~]# apt-get install linux-ccs ccs-tools
</td></tr>
</table>

<hr>

<h2><a name="install_from_source">Step 1-B: Installing from source</a></h2>

<p>If the CPU architecture differs or you want to customize kernel configuration, you need to compile kernel.</p>

<p>To compile kernel, the following packages are needed.</p>

<ul>
<li>gcc</li>
<li>make</li>
<li>ncurses</li>
</ul>

<p>Download source code from <a href="http://www.kernel.org/pub/linux/kernel/v2.4/">linux-2.4</a> or <a href="http://www.kernel.org/pub/linux/kernel/v2.6/">linux-2.6</a> and extract it and goto the extracted directory.<br>
Regarding linux-2.4 , 2.4.37 is supported. Regarding linux-2.6 , 2.6.27 to 2.6.37 are supported. If you use kernel 2.6.37.6 , replace 2.$PATCHLEVEL.$SUBLEVEL with 2.6.37 in the below operations.</p>

<table border="1">
<tr><td>
[user@tomoyo ~]$ wget -O ccs-patch-1.7.3-20111111.tar.gz 'http://sourceforge.jp/frs/redir.php?m=jaist&amp;f=/tomoyo/43375/ccs-patch-1.7.3-20111111.tar.gz'<br>
[user@tomoyo ~]$ wget -O ccs-patch-1.7.3-20111111.tar.gz.asc 'http://sourceforge.jp/frs/redir.php?m=jaist&amp;f=/tomoyo/43375/ccs-patch-1.7.3-20111111.tar.gz.asc'<br>
[user@tomoyo ~]$ gpg ccs-patch-1.7.3-20111111.tar.gz.asc<br>
[user@tomoyo ~]$ tar -zxf ccs-patch-1.7.3-20111111.tar.gz<br>
[user@tomoyo ~]$ patch -sp1 &lt; patches/ccs-patch-2.$PATCHLEVEL.$SUBLEVEL.diff<br>
[user@tomoyo ~]$ make -s menuconfig
</td></tr>
</table>

<p>Choose the following options in "Security options" section.</p>

<ul>
<li>[*] CCSecurity support</li>
<li>[ ]   Compile as loadable kernel module
<li>[ ]   Disable by default
<li>(2048) Default maximal count for learning mode</li>
<li>(/sbin/ccs-init) Default policy loader</li>
<li>(/sbin/ccs-start) Alternative activation trigger</li>
<li>(/sbin/modprobe /sbin/hotplug) Built-in domain initializer programs</li>
<li>[*]&nbsp;&nbsp;&nbsp;Auditing interface support</li>
<li>(1024)&nbsp;&nbsp;Default maximal count for grant log</li>
<li>(1024)&nbsp;&nbsp;Default maximal count for reject log</li>
</ul>

<p>If you choose "Compile as loadable kernel module" option, you can minimize file size increment of vmlinux because most part of TOMOYO Linux is compiled as a loadable kernel module. You can choose this option when there is a file size limitation for vmlinux (e.g. embedded systems).</p>

<p>If you choose "Disable by default", TOMOYO Linux is enabled only when ccsecurity=on is passed to the kernel's command line options. If you don't choose this option, TOMOYO Linux is disabled only when ccsecurity=off is passed to the kernel's command line options.</p>

<p>After creating a kernel config, compile the kernel.</p>

<table border="1">
<tr><td>
[user@tomoyo ~]$ make -s dep<br>
[user@tomoyo ~]$ make -s<br>
[user@tomoyo ~]$ make -s modules<br>
[user@tomoyo ~]$ su<br>
[root@tomoyo ~]# make -s modules_install install
</td></tr>
</table>

<p>Create initrd if you need.</p>

<p>If you want to customize distoributor's kernels, feel free to follow below steps for reference.</p>

<table border="1">
<tr><td>
<a name="Fedora14">Fedora 14</a>
</td><td>
# Download build script.<br>
wget -O build-f14-2.6.35.sh 'http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi/*checkout*/trunk/1.7.x/ccs-patch/specs/build-f14-2.6.35.sh?root=tomoyo'<br>
# Run build script.<br>
sh build-f14-2.6.35.sh<br>
</td></tr><tr><td>
<a name="CentOS3.9">CentOS 3.9</a>
</td><td>
# Download build script.<br>
wget -O build-c3-2.4.21.sh 'http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi/*checkout*/trunk/1.7.x/ccs-patch/specs/build-c3-2.4.21.sh?root=tomoyo'<br>
# Run build script.<br>
sh build-c3-2.4.21.sh<br>
</td></tr><tr><td>
<a name="CentOS4.9">CentOS 4.9</a>
</td><td>
# Download build script.<br>
wget -O build-c4-2.6.9.sh 'http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi/*checkout*/trunk/1.7.x/ccs-patch/specs/build-c4-2.6.9.sh?root=tomoyo'<br>
# Run build script.<br>
sh build-c4-2.6.9.sh<br>
</td></tr><tr><td>
<a name="CentOS5.7">CentOS 5.7</a>
</td><td>
# Download build script.<br>
wget -O build-c5-2.6.18.sh 'http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi/*checkout*/trunk/1.7.x/ccs-patch/specs/build-c5-2.6.18.sh?root=tomoyo'<br>
# Run build script.<br>
sh build-c5-2.6.18.sh<br>
</td></tr><tr><td>
<a name="CentOS6">CentOS 6.2</a>
</td><td>
# Download build script.<br>
wget -O build-c6-2.6.32.sh 'http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi/*checkout*/trunk/1.7.x/ccs-patch/specs/build-c6-2.6.32.sh?root=tomoyo'<br>
# Run build script.<br>
sh build-c6-2.6.32.sh<br>
</td></tr><tr><td>
<a name="Lenny">Debian Lenny</a>
</td><td>
# Download build script.<br>
wget -O build-debian_lenny.sh 'http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi/*checkout*/trunk/1.7.x/ccs-patch/specs/build-debian_lenny.sh?root=tomoyo'<br>
# Run build script.<br>
sh build-debian_lenny.sh<br>
</td></tr><tr><td>
<a name="OpenSUSE11.3">OpenSUSE 11.3</a>
</td><td>
# Download build script.<br>
wget -O build-suse11.3-2.6.34.sh 'http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi/*checkout*/trunk/1.7.x/ccs-patch/specs/build-suse11.3-2.6.34.sh?root=tomoyo'<br>
# Run build script.<br>
sh build-suse11.3-2.6.34.sh<br>
</td></tr><tr><td>
<a name="Asianux2">Asianux 2.0</a>
</td><td>
# Download build script.<br>
wget -O build-ax2-2.6.9.sh 'http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi/*checkout*/trunk/1.7.x/ccs-patch/specs/build-ax2-2.6.9.sh?root=tomoyo'<br>
# Run build script.<br>
sh build-ax2-2.6.9.sh<br>
</td></tr><tr><td>
<a name="Asianux3">Asianux 3.0</a>
</td><td>
# Download build script.<br>
wget -O build-ax3-2.6.18.sh 'http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi/*checkout*/trunk/1.7.x/ccs-patch/specs/build-ax3-2.6.18.sh?root=tomoyo'<br>
# Run build script.<br>
sh build-ax3-2.6.18.sh<br>
</td></tr><tr><td>
<a name="Ubuntu8.04">Ubuntu 8.04</a>
</td><td>
# Download build script.<br>
wget -O build-ubuntu_8.04.sh 'http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi/*checkout*/trunk/1.7.x/ccs-patch/specs/build-ubuntu_8.04.sh?root=tomoyo'<br>
# Run build script.<br>
sh build-ubuntu_8.04.sh<br>
</td></tr><tr><td>
<a name="Ubuntu10.04">Ubuntu 10.04</a>
</td><td>
# Download build script.<br>
wget -O build-ubuntu_10.04.sh 'http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi/*checkout*/trunk/1.7.x/ccs-patch/specs/build-ubuntu_10.04.sh?root=tomoyo'<br>
# Run build script.<br>
sh build-ubuntu_10.04.sh<br>
</td></tr><tr><td>
<a name="Ubuntu10.10">Ubuntu 10.10</a>
</td><td>
# Download build script.<br>
wget -O build-ubuntu_10.10.sh 'http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi/*checkout*/trunk/1.7.x/ccs-patch/specs/build-ubuntu_10.10.sh?root=tomoyo'<br>
# Run build script.<br>
sh build-ubuntu_10.10.sh<br>
</td></tr><tr><td>
<a name="VineLinux5.2">VineLinux 5.2</a>
</td><td>
# Download build script.<br>
wget -O build-vl5.2-2.6.27.sh 'http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi/*checkout*/trunk/1.7.x/ccs-patch/specs/build-vl5.2-2.6.27.sh?root=tomoyo'<br>
# Run build script.<br>
sh build-vl5.2-2.6.27.sh<br>
</td></tr><tr><td>
<a name="Gentoo">Gentoo</a>
</td><td>
# Install layman package.<br>
emerge layman<br>
# Install subversion package.<br>
emerge subversion<br>
# Add sunrise repository.<br>
layman -f -a sunrise<br>
# Configure /etc/make.conf to include layman's make.conf .<br>
echo "source /usr/local/portage/layman/make.conf" &gt;&gt; /etc/make.conf<br>
# Download kernel source.<br>
emerge ccs-sources<br>
# Run genkernel to build.<br>
genkernel --menuconfig all<br>
# Configure grub . See http://www.gentoo.org/doc/en/kernel-upgrade.xml for detail.<br>
# Install tools package.<br>
emerge ccs-tools
</td></tr>
</table>

<p>To compile tool, run the following commands.</p>

<table border="1">
<tr><td>
[user@tomoyo ~]$ wget -O ccs-tools-1.7.3-20110401.tar.gz 'http://sourceforge.jp/frs/redir.php?m=jaist&amp;f=/tomoyo/43376/ccs-tools-1.7.3-20110401.tar.gz'<br>
[user@tomoyo ~]$ wget -O ccs-tools-1.7.3-20110401.tar.gz.asc 'http://sourceforge.jp/frs/redir.php?m=jaist&amp;f=/tomoyo/43376/ccs-tools-1.7.3-20110401.tar.gz.asc'<br>
[user@tomoyo ~]$ gpg ccs-tools-1.7.3-20110401.tar.gz.asc<br>
[user@tomoyo ~]$ tar -zxf ccs-tools-1.7.3-20110401.tar.gz<br>
[user@tomoyo ~]$ cd ccstools/<br>
[user@tomoyo ~]$ make -s<br>
[user@tomoyo ~]$ su<br>
[root@tomoyo ~]# make -s install
</td></tr>
</table>

<hr>

<p><a href="index.html.en">Return to index page.</a></p>
<p><a href="http://sourceforge.jp/"><img src="http://sourceforge.jp/sflogo.php?group_id=1973" width="96" height="31" alt="sflogo.php" title="SourceForge.jp"></a></p>
</body>
</html>
