1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
2 |
<html lang="en-US"> |
3 |
<head> |
4 |
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> |
5 |
<meta http-equiv="Content-Style-Type" content="text/css"> |
6 |
<title>TOMOYO Linux Install manual</title> |
7 |
<link rel="stylesheet" href="http://tomoyo.sourceforge.jp/tomoyo.css" media="all" type="text/css"> |
8 |
</head> |
9 |
<body> |
10 |
<p>Info: Version <a href="../1.7/">1.7.x</a> is available.</p> |
11 |
<p style="text-align:right;"><a href="install.html.ja">Japanese Page</a></p> |
12 |
<p style="text-align:right;">Last modified: $Date$</p> |
13 |
<h1>Phase 1: Installing TOMOYO Linux kernels and tools.</h1> |
14 |
|
15 |
<p>This page describes how to install TOMOYO Linux's kernel and userland tools.</p> |
16 |
|
17 |
<hr> |
18 |
|
19 |
<h2>Step 1: Installing kernel and tools</h2> |
20 |
|
21 |
<p>To compile tool, run the following commands.</p> |
22 |
|
23 |
<table border="1"> |
24 |
<tr><td> |
25 |
[root@tomoyo ~]# wget -O ccs-tools-1.6.9-20120301.tar.gz 'http://sourceforge.jp/frs/redir.php?m=jaist&f=/tomoyo/30298/ccs-tools-1.6.9-20120301.tar.gz'<br> |
26 |
[root@tomoyo ~]# tar -zxf ccs-tools-1.6.9-20120301.tar.gz<br> |
27 |
[root@tomoyo ~]# make -C ccstools/ install |
28 |
</td></tr> |
29 |
</table> |
30 |
|
31 |
<p>To compile kernel, the following packages are needed.</p> |
32 |
|
33 |
<ul> |
34 |
<li>gcc</li> |
35 |
<li>make</li> |
36 |
<li>ncurses</li> |
37 |
</ul> |
38 |
|
39 |
<p>Run "make menuconfig" and choose the following options in "File systems" section.</p> |
40 |
|
41 |
<ul> |
42 |
<li>[*] SAKURA (Domain-Free Mandatory Access Control) support</li> |
43 |
<li>[*] TOMOYO (Domain-Based Mandatory Access Control) support</li> |
44 |
<li>(2048) Default maximal count for learning mode</li> |
45 |
<li>(/sbin/modprobe /sbin/hotplug) Built-in domain initializer programs</li> |
46 |
<li>[*] Auditing interface support</li> |
47 |
<li>(1024) Default maximal count for grant log</li> |
48 |
<li>(1024) Default maximal count for reject log</li> |
49 |
<li><M> SYAORAN (Tamper-Proof Device Filesystem) support</li> |
50 |
</ul> |
51 |
|
52 |
<p>The 2.6 kernels have a compilation option named CONFIG_DEBUG_INFO. If this option is enabled, the compiled code's size becomes about 10 times larger. Enabling this option consumes about 1 GB of extra disk space for /usr/src/ directory and about 300 MB of extra disk space for /lib/modules/ directory.<br> |
53 |
To save disk space, disable the following option.</p> |
54 |
|
55 |
<table border="1"> |
56 |
<tr><td> |
57 |
Kernel hacking --->[ ] Compile the kernel with debug info |
58 |
</td></tr> |
59 |
</table> |
60 |
|
61 |
<p>Choose the version you want to use from the following list.</p> |
62 |
|
63 |
<table border="1"> |
64 |
<tr><td> |
65 |
<a name="2.6-vanilla">Vanilla 2.6 kernels</a><br> |
66 |
(2.6.27 to 2.6.31 are supported.) |
67 |
</td><td> |
68 |
# Move to the source directory.<br> |
69 |
cd /usr/src/<br> |
70 |
# Download kernel source.<br> |
71 |
wget https://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.31.14.tar.bz2<br> |
72 |
# Extract.<br> |
73 |
tar -jxf linux-2.6.31.14.tar.bz2<br> |
74 |
# Move to the extracted directory.<br> |
75 |
cd linux-2.6.31.14<br> |
76 |
# Remove world writable permissions from the source code.<br> |
77 |
find -print0 | xargs -0 chmod go-w --<br> |
78 |
# Download TOMOYO Linux's kernel patch.<br> |
79 |
wget -O ccs-patch-1.6.9-20131019.tar.gz 'http://sourceforge.jp/frs/redir.php?m=jaist&f=/tomoyo/30297/ccs-patch-1.6.9-20131019.tar.gz'<br> |
80 |
# Check signature.<br> |
81 |
wget -O ccs-patch-1.6.9-20131019.tar.gz.asc 'http://sourceforge.jp/frs/redir.php?m=jaist&f=/tomoyo/30297/ccs-patch-1.6.9-20131019.tar.gz.asc'<br> |
82 |
gpg ccs-patch-1.6.9-20131019.tar.gz.asc<br> |
83 |
# Extract.<br> |
84 |
tar -zxf ccs-patch-1.6.9-20131019.tar.gz<br> |
85 |
# Apply the kernel patch.<br> |
86 |
patch -sp1 < patches/ccs-patch-2.6.31.diff<br> |
87 |
# Enable options for TOMOYO Linux.<br> |
88 |
make -s menuconfig<br> |
89 |
# Compile as usual.<br> |
90 |
make -s<br> |
91 |
make -s modules modules_install install |
92 |
</td></tr><tr><td> |
93 |
<a name="2.4-vanilla">Vanilla 2.4 kernels</a><br> |
94 |
(2.4.37 is supported.) |
95 |
</td><td> |
96 |
# Move to the source directory.<br> |
97 |
cd /usr/src/<br> |
98 |
# Download kernel source.<br> |
99 |
wget https://www.kernel.org/pub/linux/kernel/v2.4/linux-2.4.37.11.tar.bz2<br> |
100 |
# Extract.<br> |
101 |
tar -jxf linux-2.4.37.11.tar.bz2<br> |
102 |
# Move to the extracted directory.<br> |
103 |
cd linux-2.4.37.11<br> |
104 |
# Remove world writable permissions from the source code.<br> |
105 |
find -print0 | xargs -0 chmod go-w --<br> |
106 |
# Download TOMOYO Linux's kernel patch.<br> |
107 |
wget -O ccs-patch-1.6.9-20131019.tar.gz 'http://sourceforge.jp/frs/redir.php?m=jaist&f=/tomoyo/30297/ccs-patch-1.6.9-20131019.tar.gz'<br> |
108 |
# Check signature.<br> |
109 |
wget -O ccs-patch-1.6.9-20131019.tar.gz.asc 'http://sourceforge.jp/frs/redir.php?m=jaist&f=/tomoyo/30297/ccs-patch-1.6.9-20131019.tar.gz.asc'<br> |
110 |
gpg ccs-patch-1.6.9-20131019.tar.gz.asc<br> |
111 |
# Extract.<br> |
112 |
tar -zxf ccs-patch-1.6.9-20131019.tar.gz<br> |
113 |
# Apply the kernel patch.<br> |
114 |
patch -sp1 < patches/ccs-patch-2.4.37.diff<br> |
115 |
# Enable options for TOMOYO Linux.<br> |
116 |
make -s menuconfig<br> |
117 |
# Compile as usual.<br> |
118 |
make -s dep<br> |
119 |
make -s<br> |
120 |
make -s modules modules_install install |
121 |
</td></tr><tr><td> |
122 |
<a name="CentOS3">CentOS 3</a> |
123 |
</td><td> |
124 |
# Download TOMOYO Linux's kernel patch.<br> |
125 |
wget -O ccs-patch-1.6.9-20131019.tar.gz 'http://sourceforge.jp/frs/redir.php?m=jaist&f=/tomoyo/30297/ccs-patch-1.6.9-20131019.tar.gz'<br> |
126 |
# Check signature.<br> |
127 |
wget -O ccs-patch-1.6.9-20131019.tar.gz.asc 'http://sourceforge.jp/frs/redir.php?m=jaist&f=/tomoyo/30297/ccs-patch-1.6.9-20131019.tar.gz.asc'<br> |
128 |
gpg ccs-patch-1.6.9-20131019.tar.gz.asc<br> |
129 |
# Extract.<br> |
130 |
tar -zxf ccs-patch-1.6.9-20131019.tar.gz<br> |
131 |
# Run build script.<br> |
132 |
sh specs/build-c3-2.4.21.sh<br> |
133 |
# Start compilation.<br> |
134 |
rpmbuild -bb --target i586 /tmp/ccs-kernel.spec |
135 |
</td></tr><tr><td> |
136 |
<a name="CentOS4">CentOS 4</a> |
137 |
</td><td> |
138 |
# Download TOMOYO Linux's kernel patch.<br> |
139 |
wget -O ccs-patch-1.6.9-20131019.tar.gz 'http://sourceforge.jp/frs/redir.php?m=jaist&f=/tomoyo/30297/ccs-patch-1.6.9-20131019.tar.gz'<br> |
140 |
# Check signature.<br> |
141 |
wget -O ccs-patch-1.6.9-20131019.tar.gz.asc 'http://sourceforge.jp/frs/redir.php?m=jaist&f=/tomoyo/30297/ccs-patch-1.6.9-20131019.tar.gz.asc'<br> |
142 |
gpg ccs-patch-1.6.9-20131019.tar.gz.asc<br> |
143 |
# Extract.<br> |
144 |
tar -zxf ccs-patch-1.6.9-20131019.tar.gz<br> |
145 |
# Run build script.<br> |
146 |
sh specs/build-c4-2.6.9.sh<br> |
147 |
# Start compilation.<br> |
148 |
rpmbuild -bb --target i586 /tmp/ccs-kernel.spec |
149 |
</td></tr><tr><td> |
150 |
<a name="CentOS5">CentOS 5</a> |
151 |
</td><td> |
152 |
# Download TOMOYO Linux's kernel patch.<br> |
153 |
wget -O ccs-patch-1.6.9-20131019.tar.gz 'http://sourceforge.jp/frs/redir.php?m=jaist&f=/tomoyo/30297/ccs-patch-1.6.9-20131019.tar.gz'<br> |
154 |
# Check signature.<br> |
155 |
wget -O ccs-patch-1.6.9-20131019.tar.gz.asc 'http://sourceforge.jp/frs/redir.php?m=jaist&f=/tomoyo/30297/ccs-patch-1.6.9-20131019.tar.gz.asc'<br> |
156 |
gpg ccs-patch-1.6.9-20131019.tar.gz.asc<br> |
157 |
# Extract.<br> |
158 |
tar -zxf ccs-patch-1.6.9-20131019.tar.gz<br> |
159 |
# Run build script.<br> |
160 |
sh specs/build-c5-2.6.18.sh<br> |
161 |
# Start compilation.<br> |
162 |
rpmbuild -bb --target i686 --without kabichk /tmp/ccs-kernel.spec |
163 |
</td></tr><tr><td> |
164 |
<a name="Lenny">Debian Lenny</a> |
165 |
</td><td> |
166 |
# Download TOMOYO Linux's kernel patch.<br> |
167 |
wget -O ccs-patch-1.6.9-20131019.tar.gz 'http://sourceforge.jp/frs/redir.php?m=jaist&f=/tomoyo/30297/ccs-patch-1.6.9-20131019.tar.gz'<br> |
168 |
# Check signature.<br> |
169 |
wget -O ccs-patch-1.6.9-20131019.tar.gz.asc 'http://sourceforge.jp/frs/redir.php?m=jaist&f=/tomoyo/30297/ccs-patch-1.6.9-20131019.tar.gz.asc'<br> |
170 |
gpg ccs-patch-1.6.9-20131019.tar.gz.asc<br> |
171 |
# Extract.<br> |
172 |
tar -zxf ccs-patch-1.6.9-20131019.tar.gz<br> |
173 |
# Run build script.<br> |
174 |
sh specs/build-debian_lenny.sh<br> |
175 |
</td></tr><tr><td> |
176 |
<a name="Asianux2">Asianux 2</a> |
177 |
</td><td> |
178 |
# Download TOMOYO Linux's kernel patch.<br> |
179 |
wget -O ccs-patch-1.6.9-20131019.tar.gz 'http://sourceforge.jp/frs/redir.php?m=jaist&f=/tomoyo/30297/ccs-patch-1.6.9-20131019.tar.gz'<br> |
180 |
# Check signature.<br> |
181 |
wget -O ccs-patch-1.6.9-20131019.tar.gz.asc 'http://sourceforge.jp/frs/redir.php?m=jaist&f=/tomoyo/30297/ccs-patch-1.6.9-20131019.tar.gz.asc'<br> |
182 |
gpg ccs-patch-1.6.9-20131019.tar.gz.asc<br> |
183 |
# Extract.<br> |
184 |
tar -zxf ccs-patch-1.6.9-20131019.tar.gz<br> |
185 |
# Run build script.<br> |
186 |
sh specs/build-ax2-2.6.9.sh<br> |
187 |
# Start compilation.<br> |
188 |
rpmbuild -bb --target i686 /tmp/ccs-kernel.spec |
189 |
</td></tr><tr><td> |
190 |
<a name="Asianux3">Asianux 3</a> |
191 |
</td><td> |
192 |
# Download TOMOYO Linux's kernel patch.<br> |
193 |
wget -O ccs-patch-1.6.9-20131019.tar.gz 'http://sourceforge.jp/frs/redir.php?m=jaist&f=/tomoyo/30297/ccs-patch-1.6.9-20131019.tar.gz'<br> |
194 |
# Check signature.<br> |
195 |
wget -O ccs-patch-1.6.9-20131019.tar.gz.asc 'http://sourceforge.jp/frs/redir.php?m=jaist&f=/tomoyo/30297/ccs-patch-1.6.9-20131019.tar.gz.asc'<br> |
196 |
gpg ccs-patch-1.6.9-20131019.tar.gz.asc<br> |
197 |
# Extract.<br> |
198 |
tar -zxf ccs-patch-1.6.9-20131019.tar.gz<br> |
199 |
# Run build script.<br> |
200 |
sh specs/build-ax3-2.6.18.sh<br> |
201 |
# Start compilation.<br> |
202 |
rpmbuild -bb --target i686 --without kabichk /tmp/ccs-kernel.spec |
203 |
</td></tr><tr><td> |
204 |
<a name="Ubuntu8.04">Ubuntu 8.04</a> |
205 |
</td><td> |
206 |
# Download TOMOYO Linux's kernel patch.<br> |
207 |
wget -O ccs-patch-1.6.9-20131019.tar.gz 'http://sourceforge.jp/frs/redir.php?m=jaist&f=/tomoyo/30297/ccs-patch-1.6.9-20131019.tar.gz'<br> |
208 |
# Check signature.<br> |
209 |
wget -O ccs-patch-1.6.9-20131019.tar.gz.asc 'http://sourceforge.jp/frs/redir.php?m=jaist&f=/tomoyo/30297/ccs-patch-1.6.9-20131019.tar.gz.asc'<br> |
210 |
gpg ccs-patch-1.6.9-20131019.tar.gz.asc<br> |
211 |
# Extract.<br> |
212 |
tar -zxf ccs-patch-1.6.9-20131019.tar.gz<br> |
213 |
# Run build script.<br> |
214 |
sh specs/build-ubuntu_8.04.sh<br> |
215 |
</td></tr><tr><td> |
216 |
<a name="VineLinux5">VineLinux 5</a> |
217 |
</td><td> |
218 |
# Download TOMOYO Linux's kernel patch.<br> |
219 |
wget -O ccs-patch-1.6.9-20131019.tar.gz 'http://sourceforge.jp/frs/redir.php?m=jaist&f=/tomoyo/30297/ccs-patch-1.6.9-20131019.tar.gz'<br> |
220 |
# Check signature.<br> |
221 |
wget -O ccs-patch-1.6.9-20131019.tar.gz.asc 'http://sourceforge.jp/frs/redir.php?m=jaist&f=/tomoyo/30297/ccs-patch-1.6.9-20131019.tar.gz.asc'<br> |
222 |
gpg ccs-patch-1.6.9-20131019.tar.gz.asc<br> |
223 |
# Extract.<br> |
224 |
tar -zxf ccs-patch-1.6.9-20131019.tar.gz<br> |
225 |
# Run build script.<br> |
226 |
sh specs/build-vl5-2.6.27.sh<br> |
227 |
# Start compilation.<br> |
228 |
rpmbuild -bb --target i586 /tmp/ccs-kernel.spec |
229 |
</td></tr><tr><td> |
230 |
<a name="Gentoo">Gentoo</a> |
231 |
</td><td> |
232 |
# Install layman package.<br> |
233 |
emerge layman<br> |
234 |
# Install subversion package.<br> |
235 |
emerge subversion<br> |
236 |
# Add sunrise repository.<br> |
237 |
layman -f -a sunrise<br> |
238 |
# Configure /etc/make.conf to include layman's make.conf .<br> |
239 |
echo "source /usr/local/portage/layman/make.conf" >> /etc/make.conf<br> |
240 |
# Download kernel source.<br> |
241 |
emerge ccs-sources<br> |
242 |
# Run genkernel to build.<br> |
243 |
genkernel --menuconfig all<br> |
244 |
# Configure grub . See http://www.gentoo.org/doc/en/kernel-upgrade.xml for detail.<br> |
245 |
</td></tr> |
246 |
</table> |
247 |
|
248 |
<hr> |
249 |
|
250 |
<p><a href="index.html.en">Return to index page.</a></p> |
251 |
<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> |
252 |
</body> |
253 |
</html> |