Install oracle in linux and add swap partitions

Source: Internet
Author: User
Add the swap partition 2008-10-2310: 581 in linux and check the current partition (use free-m or cat/proc/s

Add swap partitions in linux


10: 581. check the current partition (use free-m or cat/proc/swaps ):
[Root @ db2 root] # free-m
Total used free shared buffers cached
Mem: 1006 84 922 0 11 38
-/+ Buffers/cache: 35 971
Swap: 0 0 0
[Root @ db2 root] #

2. increase the swap partition file and size:
Check that no swap exists. add the following:
Determine the size of the new swap file. multiply the size by 1024 to determine the size of the block. For example, if the block size of a 64 MB swap file is 65536, enter the following command as the root user at the shell prompt, where count is equal to the expected block size.

[Root @ db2 root] # dd if =/dev/zero of =/home/swap bs = 1024 count = 1024000
1024000 + 0 records in
1024000 + 0 records out
[Root @ db2 root] #

Run the following command to set the file exchange:
[Root @ db2 root] # mkswap/home/swap
Setting up swapspace version 1, size = 1023996 KiB
[Root @ db2 root] #

3. enable swap partition file:
To enable the swap file immediately instead of automatically enabling it during boot, run the following command:
[Root @ db2 root] # swapon/home/swap

Check the added exchange information:
[Root @ db2 root] # free-m
Total used free shared buffers cached
Mem: 1006 994 12 0 4 929
-/+ Buffers/cache: 60 946
Swap: 999 0 999
[Root @ db2 root] #

To enable it during boot, edit the/etc/fstab file to include the following lines (/home/swap defaults 0 0 ):
[Root @ db2 root] # vi/etc/fstab
LABEL = // ext3 defaults 1 1
LABEL =/boot ext2 defaults 1 2

None/dev/pts devpts gid = 5, mode = 620 0 0
None/proc defaults 0 0
None/dev/shm tmpfs defaults 0 0
LABEL =/usr ext3 defaults 1 2
/Dev/sda5 swap defaults 0 0
/Dev/cdrom/mnt/cdrom iso9660 noauto, owner, kudzu, ro 0 0
/Dev/fd0/mnt/floppy auto noauto, owner, kudzu 0 0
/Home/swap defaults 0 0
The system will enable the new swap file upon next boot.
Check the added information again:
[Root @ db2 oracledb] # free-m
Total used free shared buffers cached
Mem: 1006 979 27 0 6 917
-/+ Buffers/cache: 54 952
Swap: 999 0 999

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.