make swap file on freebsd 7.1

:: what is ::
please take a look at this.


:: checking ::
check your swap capasity with top command line and take alook at line Swap:
example:

Swap: 250M Total, 250M Free

you can add more swap by swapfile.


:: configuring ::

. make swapfile with the size of that file (128MB) .

[ root ]# dd if=/dev/zero of=/swapfile bs=1024k count=128
128+0 records in
128+0 records out
134217728 bytes transferred in 3.104900 secs (43227712 bytes/sec)

. change permission on it .

[ root ]# chmod 0600 /swapfile
[ root ]# ls -lh /swapfile
-rw------- 1 root wheel 128M Jun 23 01:54 /swapfile

. set active for swapfile .

[ root ]# mdconfig -a -t vnode -f /swapfile -u 0 && swapon /dev/md0

. set swapfile on permanently .

[ root ]# vi /etc/rc.conf
----------[ add this line ]------

swapfile="/swapfile"

----------------------------------


:: testing ::
you can run top command line and take alook at Swap: line
so the swap to be:

0 komentar:

Post a Comment

:: Cheap Web Hosting :: ~ only from Rp. 900/mo; 250Mb/mo of Bandwidth ~ :: Web Hosting Murah Meriah :: ~ mulai dari Rp. 900/bln; Bandwidth 250Mb/bln ~