Linux添加虚拟内存解决swap空间不足问题
1、查看当前虚拟内存
[root@CentOS rpm]# free -m
total used free shared buffers cached
Mem: 1518 530 987 0 19 406
-/+ buffers/cache: 104 1413
Swap: 2047 0 2047
2、查看当前文件系统信息
[root@centos rpm]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 7.9G 2.9G 4.7G 39% /
none 760M 0 760M 0% /dev/shm
/dev/sda3 1004M 276M 678M 29% /tmp
/dev/sda6 5.0G 44M 4.7G 1% /u01
/dev/sda5 4.0G 3.6G 199M 95% /u02
3、将当前swap空间由2047mb增加到 2274 mb,新增一个227mb 的swap文件
[root@centos rpm]# dd if=/dev/zero of=/swap_increased bs=1024 count=235000
235000+0 records in
235000+0 records out
4、执行以下命令增加并启用虚拟内存
[root@centos rpm]# mkswap /swap_increased
Setting up swapspace version 1, size = 240635 kB
[root@centos rpm]# swapon /swap_increased
[root@centos rpm]# free -m
total used free shared buffers cached
Mem: 1518 765 752 0 20 635
-/+ buffers/cache: 108 1409
Swap: 2276 0 2276
5、安装Oracle Database 11g
xmanager
netca
dbca