Memory allocation error happened when I tried to install MySQL 5.7.13 in my server, which has 2G memory.

Obviously, I know that there is not enough memory for me to install it.

But I figure out a sollution that I can make a swap for my server so that I can install it. Here are the steps as

following:

shell#  free -m
total used free shared buffers cached
Mem: 2002 179 1822 0 6 87
-/+ buffers/cache: 85 1916
Swap: 0 0 0 shell# touch /opt/swap
shell# dd if=/dev/zero of=/opt/swap bs=1024 count=2048000
2048000+0 records in
2048000+0 records out
2097152000 bytes (2.1 GB) copied, 41.2271 s, 50.9 MB/s
shell# mkswap /opt/swap
Setting up swapspace version 1, size = 2047996 KiB
no label, UUID=385522ab-08b6-4941-9dc7-db5583fc78ac
shell# swapon /opt/swap
shell# free -m
total used free shared buffers cached
Mem: 2002 1930 71 0 1 1793
-/+ buffers/cache: 135 1866
Swap: 1999 0 1999

If I want close swap, I can execute the commands:

shell# swapoff /opt/swap
shell# rm -f /opt/swap

最新文章

  1. EntityFramework 外键值映射
  2. MS15-020漏洞测试
  3. fedora 20 yum出错
  4. MVC 与传统的 webform 的比较
  5. 当"唐僧"没那么容易
  6. (二)Java对象与内存控制
  7. wp加载本地HTML(附带图片,CSS,JS)
  8. POJ - 2057 The Lost House(树形DP+贪心)
  9. vue页面参数闪一下的问题
  10. http协议的学习
  11. 纯css实现网络图标
  12. 自定义鼠标右键(层叠式菜单:cascading menu)(文件系统右键、文件夹系统右键和桌面鼠标右键)
  13. sharepoint 2013 office web app 2013 文档在线浏览 IE11 浏览器不兼容解决方法
  14. 如何制作 Objective-C 的UML图 [2]
  15. 解决 git push Failed to connect to 127.0.0.1 port 45463: 拒绝连接
  16. python+MongoDB使用示例
  17. set -o vi AIX下shell
  18. nodejs基础学习
  19. Apache配置文件相关命令
  20. PAT 1062 Talent and Virtue

热门文章

  1. linux操作系统-源码包安装jdk1.7
  2. 学习javascript怎么入门,初学者5条建议
  3. OpenGL3D图形、旋转、纹理、键盘移动、光照、滤波、透明(完整) 转自http://www.cnblogs.com/tiandsp/archive/2012/01/23/2329049.html
  4. spring MVC中Dubbo的配置
  5. spring+mybatis框架搭建时遇到Mapped Statements collection does not contain value for...的错误
  6. LaTeX数学公式大全
  7. python入门科普IDE工具和编译环境
  8. BUG(0):用某位表示特定属性
  9. MySQL连接、登录、密码等
  10. Python压缩文件夹 tar.gz .zip