<!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: 2013-01-17 23:04:43 +0900 (Thu, 17 Jan 2013) $</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>

<hr>

<h2>Step 1: Installing kernel and tools</h2>

<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-20130117.tar.gz 'http://sourceforge.jp/frs/redir.php?m=jaist&amp;f=/tomoyo/43375/ccs-patch-1.7.3-20130117.tar.gz'<br>
[user@tomoyo ~]$ wget -O ccs-patch-1.7.3-20130117.tar.gz.asc 'http://sourceforge.jp/frs/redir.php?m=jaist&amp;f=/tomoyo/43375/ccs-patch-1.7.3-20130117.tar.gz.asc'<br>
[user@tomoyo ~]$ gpg ccs-patch-1.7.3-20130117.tar.gz.asc<br>
[user@tomoyo ~]$ tar -zxf ccs-patch-1.7.3-20130117.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.8">CentOS 5.9</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.3</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-20120301.tar.gz 'http://sourceforge.jp/frs/redir.php?m=jaist&amp;f=/tomoyo/43376/ccs-tools-1.7.3-20120301.tar.gz'<br>
[user@tomoyo ~]$ wget -O ccs-tools-1.7.3-20120301.tar.gz.asc 'http://sourceforge.jp/frs/redir.php?m=jaist&amp;f=/tomoyo/43376/ccs-tools-1.7.3-20120301.tar.gz.asc'<br>
[user@tomoyo ~]$ gpg ccs-tools-1.7.3-20120301.tar.gz.asc<br>
[user@tomoyo ~]$ tar -zxf ccs-tools-1.7.3-20120301.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>
