<!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>This page is for TOMOYO 2.3 (for Linux 2.6.36 and later kernels). Please jump to <a href="../2.2/">this page</a> for TOMOYO 2.2 (for Linux 2.6.30 - 2.6.35 kernels).</p>
<p style="text-align:right;"><a href="install.html.ja">Japanese Page</a></p>
<p style="text-align:right;">Last modified: $Date: 2011-11-20 09:56:56 +0900 (Sun, 20 Nov 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>

<hr>

<h2>Step 1: Compiling the kernel.</h2>

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

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

<p>Download source code from "<a href="http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.38.7.tar.bz2">linux-2.6.38.7.tar.bz2</a>" or "<a href="http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=summary">linux-2.6 git tree</a>" and extract it.</p>

<p>There may be bugfixes that are too late to get merged in the upstream kernel releases. Download all patches that match your kernel version (e.g. 2.6.38-tomoyo-\*.patch for 2.6.38 kernels) from <a href="http://tomoyo.sourceforge.jp/2.3/patches/">http://tomoyo.sourceforge.jp/2.3/patches/</a> and run below command from the kernel's top directory. (Below command will skip already applied patch if any.)</p>

<table border="1">
<tr><td>
[user@tomoyo ~]$ for i in 2.6.*-tomoyo-*.patch; do patch -Nt -p1 --dry-run &lt; $i &amp;&amp; patch -p1 &lt; $i; done
</td></tr>
</table>

<p>Next, create a kernel config with TOMOYO Linux enabled.</p>

<table border="1">
<tr><td>
[user@tomoyo ~]$ make -s menuconfig
</td></tr>
</table>

<p>Go to "Security options" screen and select "Enable different security models" and "TOMOYO Linux Support".</p>

<pre>
[*] Enable different security models
-*- Enable the securityfs filesystem
-*- Security hooks for pathname based access control
[*] TOMOYO Linux Support
</pre>

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

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

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

<p>If your kernel config does not contain CONFIG_DEFAULT_SECURITY_TOMOYO=y line, edit /boot/grub/grub.conf or /boot/grub/menu.lst (or edit /etc/default/grub and execute update-grub command) in order to add security=tomoyo to the kernel command line parameters.</p>

<hr>

<h2>Step 2: Installing the tools package.</h2>

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

<table border="1">
<tr><td>
[root@tomoyo ~]# wget -O tomoyo-tools-2.3.0-20110511.tar.gz 'http://sourceforge.jp/frs/redir.php?m=jaist&amp;f=/tomoyo/48663/tomoyo-tools-2.3.0-20110511.tar.gz'<br>
[root@tomoyo ~]# wget -O tomoyo-tools-2.3.0-20110511.tar.gz.asc 'http://sourceforge.jp/frs/redir.php?m=jaist&amp;f=/tomoyo/48663/tomoyo-tools-2.3.0-20110511.tar.gz.asc'<br>
[root@tomoyo ~]# wget http://I-love.SAKURA.ne.jp/kumaneko-key<br>
[root@tomoyo ~]# gpg --import kumaneko-key<br>
[root@tomoyo ~]# gpg tomoyo-tools-2.3.0-20110511.tar.gz.asc<br>
[root@tomoyo ~]# tar -zxf tomoyo-tools-2.3.0-20110511.tar.gz<br>
[root@tomoyo ~]# make -C tomoyo-tools/ install<br>
[root@tomoyo ~]# ldconfig
</td></tr>
</table>

<p>Note that there is no compatibility between tools package for TOMOYO 2.2 and tools package for TOMOYO 2.3. Therefore, you need to install tools package for TOMOYO 2.3 even if you already have tools package for TOMOYO 2.2 installed in your system.</p>

<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>
