Linux下安裝Oracle時SWAP不足的兩種解決方案

來源:互聯網
上載者:User

Linux下安裝Oracle時SWAP不足的兩種解決方案

當前磁碟分割及SWAP分區情況如下:

[root@bys3 ~]# fdisk -l

Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 2078 16587112+ 83 Linux
/dev/sda3 2079 2600 4192965 82 Linux swap / Solaris
[root@bys3 ~]# free -m
total used free shared buffers cached
Mem: 2013 1850 163 0 131 1274
-/+ buffers/cache: 444 1568
Swap: 4094 0 4094
增加SWAP交換分區有兩種方法:關於tmpfs的使用詳見:http://blog.csdn.net/haibusuanyun/article/details/17199617點擊開啟連結
1. 使用dd命令建立一個檔案並掛載為SWAP

2. 增加一個新交換分區

增加的步驟都是:

1.free ---查看記憶體狀態命令,可以顯示memory,swap,buffer cache等的大小及使用狀況;
2.dd ---讀取,轉換並輸出資料命令;fdisk切分新分區
3.mkswap ---設定交換區
4.swapon ---啟用交換區,相當於mount;swapoff ---關閉交換區,相當於umount

5.設定開機自動掛載/etc/fstab

#########################################################  更多詳情見請繼續閱讀下一頁的精彩內容:   Linux下安裝Oracle時報swap不夠 

  • 1
  • 2
  • 下一頁

相關文章

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.