Solution for insufficient swap space when installing Oracle under Linux

Source: Internet
Author: User

Pick: Solution for insufficient swap space when installing Oracle under Linux Workaround for installing Oracle on Linux with insufficient swap space
There are two ways to increase the swap space: Strictly speaking, there is only one way to increase swap after the system is installed, that is the second method of this article, as for the first method is to set the swap area when the system is installed. 1, the use of partition: In the installation of the OS division of the special Swap partition, the size of the space to be planned in advance, the boot system automatically mount. This method can only be set when the OS is installed, and once the settings are changed very hard, unless the system is reinstalled. 2. Use Swapfile: (or the entire free partition) to create a new temporary swapfile or an idle partition, set to swap space when needed, up to a maximum of 8 swapfile. The size of the swap space, closely related to the CPU, can use up to 2GB of space in the i386 system. After the system starts, the total capacity of the 2G is increased or decreased as required. This method is more flexible, but also more convenient, the disadvantage is to start the system after manual setup. Here are the steps to use Swapfile to increase swap space: the command involved: free---View the memory status command to display Memory,swap,buffer cache size and usage status, DD---read, convert and output data commands; Mkswap--- Set Swap area Swapon---Enable swap area, equivalent to Mountswapoff---Close swap area, equivalent to Umount step: 1, create Swapfile:root permissions, create Swapfile, assuming the current directory is "/", execute the following command: # DD If=/dev/zero of=swapfile bs=1024 count=500000 in the root directory created a swapfile, named "Swapfile", the size of 500M, you can also export files to any directory you want, Personal feel or directly in the root directory is better, at a glance, not easy to damage, put in other directories or otherwise; command options explained:---of: the path and name of the interchange file for the output;---BS: block size, in bytes, typically 1k or 1024 byte ;---Count: total number of blocks that is the total space size, in blocks that is k;---if: Read the source free space, why is zero, not clear, first fixed so write it; 2. Set Swapfile to swap space # Mkswap Swapfile3, enable swap space, This operation is somewhat similar to the mount operation (Personal Understanding): # Swapon Swapfile The end of the operation to increase swap space, you can use the free command to see if the swap space size changes, 4, if you no longer use space, you can choose to turn off swap space, This operation is somewhat similar to the umount operation (Personal Understanding):: # SwapOff Swapfile Use this method in each system startup need to manually set, open Swapfile, More trouble, workaround: The/etc/rc.d/rc.local file in the end of the next line to add the following: (edit this file is of course with VI ~)/sbin/ Swapon/swapfile after saving the exit, so that after the system starts, the swap space will automatically load; Summary: When installing the OS must be planned after the swap size, usually twice times the memory, but to consider the possibility of increasing memory later, so you can consider setting a slightly larger,  Want to install oracle10g in the virtual machine, found that the default swap space does not meet the minimum requirements, because I allocated the physical memory is 1G, then according to the requirements of 2G swap swap space, the default is only 1G swap space. The steps to add swap space are as follows:   first step: Make sure there is enough space in the system for swap swap space, I am using KVM, ready to add a swap file to a separate file system, in/opt/ Add 2G swap file in image The second step: Add the swap file and set its size to 2G, using the following command [[email protected] image]# dd If=/dev/zero of=/opt/image/swap bs= After a period of time, COUNT=2048000 returns the following results: 2048000+0 records in2048000+0 records out2097152000 bytes (2.1 GB) copied, 272.867 seconds, 7.7 MB/s Step three: Create (set) Swap space, use command mkswap[[email protected] image]# mkswap/opt/image/swapsetting up swapspace version 1, Size = 2097147 KB Fourth step: Check the existing swap space size, using the command free[[email protected] image]# free-mtotal used free shared buffers Cachedmem: 1011 989 0 1 875-/+ buffers/cache:112 898swap:1027 0 1027 or check the Meminfo file grep swaptotal/proc/meminfo Fifth step: Start the newly added 2GSwap space, use command swapon[[email protected] image]# Swapon/opt/image/swap Sixth step: Verify that the newly added 2G swap space is in effect, using the command free[[[email  Protected] image]# free-mtotal used free shared buffers cachedmem:1011 995 0 4 877-/+ buffers/cache:113 897swap:302 7 0 3027 or check the Meminfo file grep swaptotal/proc/meminfo Seventh step: Modify the/etc/fstab file so that the newly added 2G swap space automatically takes effect after the system restarts after the file is last added:/opt/image/swap Swap swap defaults 0 0

Workarounds for insufficient swap space when installing Oracle under Linux

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.