Add "Creating a Swapfile on FreeBSD 5.X" example.
This commit is contained in:
parent
1c1a82166a
commit
74805dc9a4
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=15181
1 changed files with 41 additions and 1 deletions
|
|
@ -1571,7 +1571,7 @@ kern.maxfiles: 2088 -> 5000</screen>
|
|||
want, of course.</para>
|
||||
|
||||
<example>
|
||||
<title>Creating a Swapfile</title>
|
||||
<title>Creating a Swapfile on FreeBSD 4.X</title>
|
||||
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
|
|
@ -1615,6 +1615,46 @@ kern.maxfiles: 2088 -> 5000</screen>
|
|||
</listitem>
|
||||
</orderedlist>
|
||||
|
||||
</example>
|
||||
<example>
|
||||
<title>Creating a Swapfile on FreeBSD 5.X</title>
|
||||
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>Be certain that your kernel configuration includes
|
||||
the memory disk driver (&man.md.4;). It is default in
|
||||
<filename>GENERIC</filename> kernel.</para>
|
||||
|
||||
<programlisting>device md # Memory "disks"</programlisting>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>create a swapfile (<filename>/usr/swap0</filename>):</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>dd if=/dev/zero of=/usr/swap0 bs=1024k count=64</userinput></screen>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>set proper permissions on (<filename>/usr/swap0</filename>):</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>chmod 0600 /usr/swap0</userinput></screen>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>enable the swap file in <filename>/etc/rc.conf</filename>:</para>
|
||||
|
||||
<programlisting>swapfile="/usr/swap0" # Set to name of swapfile if aux swapfile desired.</programlisting>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
|
||||
<para>Reboot the machine or to enable the swap file immediately,
|
||||
type:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>mdconfig -a -t vnode -f /usr/swap0 -u 0 && swapon /dev/md0</userinput></screen>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
|
||||
</example>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue