]>
Commit | Line | Data |
---|---|---|
997358a6 MW |
1 | |
2 | ------------------------------- | |
3 | strongSwan UML - Installation | |
4 | ------------------------------- | |
5 | ||
6 | ||
7 | Contents | |
8 | -------- | |
9 | ||
10 | 1. Making the host system UML-capable | |
11 | 2. Installing the required files | |
12 | 3. Creating the UML testing environment | |
13 | ||
14 | ||
15 | 1. Making the host system UML-capable | |
16 | ---------------------------------- | |
17 | ||
18 | UML instances can be run on both Linux 2.4 and Linux 2.6 kernels. | |
19 | If you are using a vanilla kernel from kernel.org then you must first | |
20 | apply the host SKAS patch available from | |
21 | ||
22 | http://www.user-mode-linux.org/~blaisorblade/patches/ | |
23 | ||
24 | and recompile and reboot your host kernel. Some Linux distributions as e.g. | |
25 | SuSE already include the SKAS patch in their kernels. | |
26 | ||
27 | You will also need the UML utilities (uml_mconsole and uml_switch) | |
28 | available from | |
29 | ||
30 | http://prdownloads.sourceforge.net/user-mode-linux/uml_utilities_20040406.tar.bz2 | |
31 | ||
32 | Many Linux distributions offer the UML utilities as a package. | |
33 | ||
34 | ||
35 | 2. Installing the required files | |
36 | ----------------------------- | |
37 | ||
38 | First create a directory where you want the strongSwan UML testing environment | |
39 | to be located.The default directory is "~/strongswan-testing". If you choose a | |
40 | different location, please adapt the UMLTESTDIR variable in "testing.conf" | |
41 | accordingly. | |
42 | ||
43 | mkdir ~/strongswan-testing | |
44 | ||
45 | Now copy the "testing" subdirectory coming with the strongSwan distribution to | |
46 | the UML testing environment: | |
47 | ||
48 | cp -r testing ~/strongswan-testing | |
49 | ||
50 | Next you need to copy several files into the ~/strongswan-testing directory that | |
51 | are required for the strongSwan testing environment: | |
52 | ||
53 | * A vanilla Linux kernel on which the UML kernel will be based on. | |
54 | We recommend the use of | |
55 | ||
56 | http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.16.9.tar.bz2 | |
57 | ||
58 | * Starting with Linux kernel 2.6.9 no patch must be applied any more in order | |
59 | to make the vanilla kernel UML-capable. For older kernels you'll find | |
60 | a matching UML patch at | |
61 | ||
62 | http://prdownloads.sourceforge.net/user-mode-linux/ | |
63 | ||
64 | * The matching .config file required to compile the UML kernel: | |
65 | ||
66 | http://download.strongswan.org/uml/.config-2.6.16 | |
67 | ||
68 | * A gentoo-based UML file system (compressed size 130 MBytes) found at | |
69 | ||
70 | http://download.strongswan.org/uml/gentoo-fs-20060330.tar.bz2 | |
71 | ||
72 | * The latest strongSwan distribution | |
73 | ||
74 | http://download.strongswan.org/strongswan-2.7.0.tar.gz | |
75 | ||
76 | ||
77 | 3. Creating the environment | |
78 | ------------------------ | |
79 | ||
80 | Now change into the testing subdirectory | |
81 | ||
82 | cd ~/strongswan-testing/testing | |
83 | ||
84 | and make the UML testing environment: | |
85 | ||
86 | ./make-testing <hosts> | |
87 | ||
88 | The "make-testing" script calls a series of subscripts which can be | |
89 | enabled or disabled individually by setting the corresponding flags | |
90 | in "testing.conf": | |
91 | ||
92 | if [ $ENABLE_BUILD_UMLKERNEL = "yes" ] | |
93 | then | |
94 | scripts/build-umlkernel | |
95 | fi | |
96 | ||
97 | builds an UML kernel out of the vanilla Linux kernel and the corresponding | |
98 | UML kernel patch. | |
99 | ||
100 | if [ $ENABLE_BUILD_HOSTCONFIG = "yes" ] | |
101 | then | |
102 | scripts/build-hostconfig | |
103 | fi | |
104 | ||
105 | generates the default configurations for the UML hosts alice, venus, moon, | |
106 | carol, winnetou, dave, sun, and bob by replacing the wildcards PH_IP_ALICE, | |
107 | etc. by the actual IP addresses defined in "testing.conf". | |
108 | ||
109 | if [ $ENABLE_BUILD_UMLROOTFS = "yes" ] | |
110 | then | |
111 | scripts/build-umlrootfs | |
112 | fi | |
113 | ||
114 | takes the gentoo-based UML file system and compiles the latest strongSwan | |
115 | distribution into it. | |
116 | ||
117 | if [ $ENABLE_BUILD_SSHKEYS = "yes" ] | |
118 | then | |
119 | scripts/build-sshkeys | |
120 | fi | |
121 | ||
122 | adds the common RSA public key of the UML instances to your ~/.ssh/known_hosts | |
123 | directory so that you can log onto the UML instances using ssh without typing | |
124 | in a password. The "scripts/build-sshkeys" script should only be run once. | |
125 | ||
126 | if [ $ENABLE_BUILD_UMLHOSTFS = "yes" ] | |
127 | then | |
128 | scripts/build-umlhostfs <hosts> | |
129 | fi | |
130 | ||
131 | creates the customized UML file systems for the instances given as command line | |
132 | arguments by adding the default host configurations to the UML root file system. | |
133 | If the "make-starting" scripts is called without any arguments then by default | |
134 | the UML file systems are created for the hosts alice, venus, moon, carol, | |
135 | winnetou, dave, sun, and bob. Each UML root file system has as size defined by | |
136 | the ROOTFSSIZE in testing.conf which by default is 544 MBytes. Thus all 8 UML | |
137 | hosts plus the master copy will require a total of 5 GBytes of disk space. | |
138 | ||
139 | if [ $ENABLE_START_TESTING = "yes" ] | |
140 | then | |
141 | ./start-testing <hosts> | |
142 | fi | |
143 | ||
144 | starts the automated testing. More details on the tests you'll find in the | |
145 | README document. | |
146 | ||
147 | ----------------------------------------------------------------------------- | |
148 | ||
149 | This file is RCSID $Id: INSTALL,v 1.39 2006/04/24 16:58:03 as Exp $ | |
150 |