Use swap files in the installation and running mode of the CF card of IPCopLinux
Source: Internet
Author: User
In the installation and running mode of the CF card of IPCopLinux, use the switch file-Linux Enterprise Application-Linux server application information. For details, refer to the following. In the installation and running mode of the CF card in IPCop Linux, a hard disk file can be set as the swap partition because there is no swap partition. The steps are as follows:
1. Create a swap file in the hard disk:
# Dd if =/dev/zero of =/mnt/hda1/swapfile bs = 1024 count = 655360
655360 + 0 records in
655360 + 0 records out
671088640 bytes (671 MB) copied, 134.763 seconds, 5.0 MB/s
Note: The directory/mnt/hda1 is mounted to the first partition of the hard disk.
2. Create a swap file system in the swap file:
# Mkswap/mnt/hda1/swapfile
Setting up swapspace version 1, size = 671084 kB
No label, UUID = 97524e31-964c-41fe-980b-c193c04ba37b
3. Change the access permission of the swap file:
# Chmod 600/mnt/hda1/swapfile
# Ll/mnt/hda1/swapfile
-Rw ------- 1 root 671088640 swapfile
# File/mnt/hda1/swapfile
Swapfile: Linux/i386 swap file (new style) 1 (4 K pages) size 16383 pages
5. Enable swap partition when the system starts:
Modify the/etc/rc. d/rc. sysinit file. Some content is as follows:
...
SWAP_FILE =/mnt/hda1/swapfile
If [-e $ SWAP_FILE]; then
Echo "Turning on swap"
Chmod 600 $ SWAP_FILE
Swapon $ SWAP_FILE
Fi
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service