增加swap空间大小
来源:互联网 发布:java future 线程池 编辑:程序博客网 时间:2024/06/11 18:55
安装12c报错:
增加swap:
1.使用free命令带上m参数,查看swap文件大小,官方建议在RAM是2到4.5G时,swap是RAM的2倍;如果RAM大于等于4G则swap等于RAM即可
[root@orcl mnt]# free -m
total used free shared buffers cached
Mem: 2006 1894 112 5 36 1368
-/+ buffers/cache: 489 1517
Swap: 2555 0 2555
也可用cat 查看etc目录下的swaps文件
cat /proc/swaps
2.使用dd命令增加1G内存
dd if=/dev/zero of=/tmp/swap bs=1MB count=1024
3.使用mkswap命令制作一个swap文件
mkswap /tmp/swap
4.使用swapon启动swap文件
swapon /tmp/swap
free 查看一下
5.但是这个只对当前系统有效,如果系统重启,则swap又变为原来的大小。
如果想下次重启系统后还继续有效,需要切换到root用户,编辑/etc/fstab文件将配置写入到/etc/fstab文件中
[root@orcl mnt]# vi /etc/fstab
#
# /etc/fstab
# Created by anaconda on Mon Mar 6 15:01:29 2017
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_orcl-lv_root / ext4 defaults 1 1
UUID=2ce4a722-bb49-4244-923d-c5fc1d5f2954 /boot ext4 defaults 1 2
/dev/mapper/vg_orcl-lv_swap swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/tmp/swap swap defaults 0 0
0 0
- 增加swap空间大小
- 如何增加swap空间大小
- Linux增加Swap空间大小
- Ubuntu增加Swap空间大小
- Linux系统增加swap空间大小
- centos 下增加swap空间大小
- centos 下增加swap空间大小(续and 删除)
- linux增加swap大小
- swap 增加分区大小
- 增加swap大小
- 增加swap分区大小
- 临时增加swap空间
- Linux增加swap空间
- linux增加swap空间
- linux增加SWAP空间
- 增加swap空间
- ubuntu增加swap空间
- centos增加swap空间
- 20170307-leetcode-263-Ugly Number
- C++ new delete new[] delete[]重载实现
- jquery插件--增减数字
- 初步学习,简单问题:No resource found that matches the given name (at 'background' with value '@drawable/ con
- C语言宏中"#"和"##"的用法
- 增加swap空间大小
- System.ArgumentException 位于 System.Windows.Forms.dll 源对象不公开“IPropertyNotifySink”事件接口
- 程序员创业注意事项
- 深入理解Java:注解(Annotation)自定义注解入门
- 線性內插(Interpolation)
- NFS的一个BUG
- gpio-button-hotplug.c 分析
- java项目源码 sqlserver数据库springmvc mybatis bootstrap html5
- 对话:学C语言有什么技巧吗?