Warning: getimagesize(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /www/wwwroot/looaon.com/usr/plugins/AMP/Action.php on line 469

Warning: getimagesize(): Failed to enable crypto in /www/wwwroot/looaon.com/usr/plugins/AMP/Action.php on line 469

Warning: getimagesize(https://www.moqifei.com/wp-content/uploads/2016/01/QQ20160115-0.png): failed to open stream: operation failed in /www/wwwroot/looaon.com/usr/plugins/AMP/Action.php on line 469
已安装Linux开启swap(虚拟内存)

存在的记忆

已安装Linux开启swap(虚拟内存)


Warning: getimagesize(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /www/wwwroot/looaon.com/usr/plugins/AMP/Action.php on line 520

Warning: getimagesize(): Failed to enable crypto in /www/wwwroot/looaon.com/usr/plugins/AMP/Action.php on line 520

Warning: getimagesize(https://www.moqifei.com/wp-content/uploads/2016/01/QQ20160115-0.png): failed to open stream: operation failed in /www/wwwroot/looaon.com/usr/plugins/AMP/Action.php on line 520

Warning: getimagesize(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /www/wwwroot/looaon.com/usr/plugins/AMP/Action.php on line 520

Warning: getimagesize(): Failed to enable crypto in /www/wwwroot/looaon.com/usr/plugins/AMP/Action.php on line 520

Warning: getimagesize(https://www.moqifei.com/wp-content/uploads/2016/01/QQ20160115-1.png): failed to open stream: operation failed in /www/wwwroot/looaon.com/usr/plugins/AMP/Action.php on line 520

Warning: getimagesize(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /www/wwwroot/looaon.com/usr/plugins/AMP/Action.php on line 520

Warning: getimagesize(): Failed to enable crypto in /www/wwwroot/looaon.com/usr/plugins/AMP/Action.php on line 520

Warning: getimagesize(https://www.moqifei.com/wp-content/uploads/2016/01/QQ20160115-2.png): failed to open stream: operation failed in /www/wwwroot/looaon.com/usr/plugins/AMP/Action.php on line 520

Warning: getimagesize(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /www/wwwroot/looaon.com/usr/plugins/AMP/Action.php on line 520

Warning: getimagesize(): Failed to enable crypto in /www/wwwroot/looaon.com/usr/plugins/AMP/Action.php on line 520

Warning: getimagesize(https://www.moqifei.com/wp-content/uploads/2016/01/QQ20160115-3.png): failed to open stream: operation failed in /www/wwwroot/looaon.com/usr/plugins/AMP/Action.php on line 520

博客使用的是阿里云的服务器,最低配置的那种(只有512M内存)。在安装最新版本的Mariadb的时候,总是因为内存不足安装失败。所以决定开启swap。

由于开启swap会降低磁盘IO性能,所以用过之后可以去掉。

1、创建交换分区文件

dd if=/dev/zero of=/home/swap bs=1M count=512

bs:block的大小,

count:block的数量,可以自定义。

/home/swap:技安自定义的swap文件位置

技安这里定义的是512M的swap

2、设置swap文件

mkswap /home/swap

3、立即启用swap

swapon /home/swap


如果在/etc/rc.local中有swapoff -a 需要修改成swapon

4、根据需要可以设置是否开机启动

echo '/home/swap swap swap defaults 0 0'>> /etc/fstab

5、查看swap

free -m

当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »