Created
June 17, 2016 08:07
-
-
Save zane-xyo/5d321d77e8902b36f6d72c68a07c63e3 to your computer and use it in GitHub Desktop.
内存太小,导致mysql编译出错的解决办法:添加交换分区
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
编译mysql 5.7.13源码时,购买的是阿里云,内存只有512M,出现 item_geofunc.cc.o error 1的出错,找到了解决办法如下: | |
# dd if=/dev/zero of=/swapfile bs=1k count=2048000 --获取要增加的2G的SWAP文件块 | |
# mkswap /swapfile -- 创建SWAP文件 | |
# swapon /swapfile -- 激活SWAP文件 | |
# swapon -s -- 查看SWAP信息是否正确 | |
# echo "/var/swapfile swap swap defaults 0 0" >> /etc/fstab -- 添加到fstab文件中让系统引导时自动启动 | |
注意, swapfile文件的路径在/var/下 | |
编译完后, 如果不想要交换分区了, 可以删除: | |
# swapoff /swapfile | |
# rm -fr /swapfile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment