File: INSTALL

package info (click to toggle)
swapd 0.2-10
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 252 kB
  • ctags: 59
  • sloc: ansic: 811; sh: 223; makefile: 72
file content (48 lines) | stat: -rw-r--r-- 1,581 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
The first thing you should know is that Linux supports only 8 swaps (either
files or partitions) by default. If you intend to take full advantage of
dynamic swapping, you should recompile your kernel to support more swaps, or
get one which already does.


I. RECOMPILING THE KERNEL

If you think 8 swaps are enough, you can skip this step.

1. Make sure you are logged in as root.
2. Chdir to /usr/src/linux.
3. If your kernel isn't configured yet (i.e. there's no .config), run
   'make menuconfig'.
4. In /usr/src/linux/include/linux/swap.h change the value of MAX_SWAPFILES
   to 256. This defines how many swaps you will be able to have.
5. Run 'make clean dep bzImage install'.

Please bear in mind that these changes will take effect after a reboot.


II. COMPILING

1. Go back to the swapd source directory.
2. Run './configure'.
3. Take a look at config.h and change what is necessary.
4. Run 'make'.


III. INSTALLING

1. Make sure you are logged in as root.
2. Run 'make install'.
3. Take a look at /usr/local/etc/swapd.conf and change what is necessary
   (please refer to section 'PERFORMANCE' in the manual).
4. Create the swap directory you chose in swapd.conf (it should be accessible
   only by root).
5. Add the following line to /etc/rc.d/rc.local:
   /usr/local/sbin/swapd
6. If you recompiled the kernel, now would be the time to reboot. If you
   haven't, just 'rehash' and run 'swapd' as root.


SOURCE DIRECTORY CLEANUP (optional)

'make clean' removes the binaries.
'make distclean' reverts the source directory back to the way it was when
you unpacked it.