Memory Allocation Error
2024-10-21 10:22:29
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
最新文章
- EntityFramework 外键值映射
- MS15-020漏洞测试
- fedora 20 yum出错
- MVC 与传统的 webform 的比较
- 当";唐僧";没那么容易
- (二)Java对象与内存控制
- wp加载本地HTML(附带图片,CSS,JS)
- POJ - 2057 The Lost House(树形DP+贪心)
- vue页面参数闪一下的问题
- http协议的学习
- 纯css实现网络图标
- 自定义鼠标右键(层叠式菜单:cascading menu)(文件系统右键、文件夹系统右键和桌面鼠标右键)
- sharepoint 2013 office web app 2013 文档在线浏览 IE11 浏览器不兼容解决方法
- 如何制作 Objective-C 的UML图 [2]
- 解决 git push Failed to connect to 127.0.0.1 port 45463: 拒绝连接
- python+MongoDB使用示例
- set -o vi AIX下shell
- nodejs基础学习
- Apache配置文件相关命令
- PAT 1062 Talent and Virtue
热门文章
- linux操作系统-源码包安装jdk1.7
- 学习javascript怎么入门,初学者5条建议
- OpenGL3D图形、旋转、纹理、键盘移动、光照、滤波、透明(完整) 转自http://www.cnblogs.com/tiandsp/archive/2012/01/23/2329049.html
- spring MVC中Dubbo的配置
- spring+mybatis框架搭建时遇到Mapped Statements collection does not contain value for...的错误
- LaTeX数学公式大全
- python入门科普IDE工具和编译环境
- BUG(0):用某位表示特定属性
- MySQL连接、登录、密码等
- Python压缩文件夹 tar.gz .zip