Linux下安裝Oracle時報swap不夠

來源:互聯網
上載者:User

Linux下安裝Oracle時報swap不夠解決方案:

root使用者下

1、以檔案系統增加(以下是以增加512M的檔案系統為例)

dd if=/dev/zero of=/home/oracle/myswaps/swapfile1 bs=1M count=512

註:of後面的路徑一定不能是/dev下,否則在啟用swap檔案時報參數無效

2、建立swap檔案

mkswap /home/oracle/myswaps/swapfile1

3、啟用swap檔案

swapon /home/oracle/myswaps/swapfile1

4、此時用free -m就可以看到swap空間已經增加了,但是重啟後就不會存在了

5、添加重啟後還會生效,vi /etc/fstab添加如下內容:

/home/oracle/myswaps/swapfile1 swap                    swap    defaults        0 0

相關文章

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.