centos 安裝oracle 報Checking swap space: 0 MB available, 150 MB required. Failed <<<<


1 系統環境

centos 6.5

oracle 11g 

內存 16G

硬盤 ssd 250G

2 運行安裝命令:

[oracle@localhost database]$ ./runInstaller -silent -responseFile /home/oracle/db_install.rsp
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB. Actual 150565 MB Passed
Checking swap space: 0 MB available, 150 MB required. Failed <<<<

Some requirement checks failed. You must fulfill these requirements before

continuing with the installation,


Exiting Oracle Universal Installer, log for this session can be found at /tmp/OraInstall2017-06-07_02-08-39PM/installActions2017-06-07_02-08-39PM.log

解決方法:

1、檢查 Swap 空間在設置 Swap 文件之前,有必要先檢查一下系統里有沒有既存的 Swap 文件。運行以下命令:

1 swapon -s

如果返回的信息概要是空的,則表示 Swap 文件不存在。

2、檢查文件系統在設置 Swap 文件之前,同樣有必要檢查一下文件系統,看看是否有足夠的硬盤空間來設置 Swap 。運行以下命令:

1 df -hal


3、創建並允許 Swap 文件下面使用 dd 命令來創建 Swap 文件。
檢查返回的信息,還剩余足夠的硬盤空間即可。

 

1 dd if=/dev/zero of=/swapfile bs=1024 count=512k

參數解讀:if=文件名:輸入文件名,缺省為標准輸入。即指定源文件。< if=input file >of=文件名:輸出文件名,缺省為標准輸出。即指定目的文件。< of=output file >bs=bytes:同時設置讀入/輸出的塊大小為bytes個字節count=blocks:僅拷貝blocks個塊,塊大小等於bs指定的字節數。

4、格式化並激活 Swap 文件上面已經創建好 Swap 文件,還需要格式化后才能使用。運行命令

mkswap /swapfile


激活 Swap ,
運行命令

swapon /swapfile

以上步驟做完,再次運行命令

 

swapon -s

 

你會發現返回的信息概要:

1 Filename                Type        Size    Used    Priority
2 /swapfile               file        524284    0     -1

 

 

如果要機器重啟的時候自動掛載 Swap ,那么還需要修改 fstab 配置。用 vim 打開 /etc/fstab 文件,在其最后添加如下一行:

1 /swapfile          swap            swap    defaults        0 0

最后,賦予 Swap 文件適當的權限:

1 chown root:root /swapfile 
2 chmod 0600 /swapfile

 參考鏈接:

https://zhidao.baidu.com/question/1111572259239167739.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM