Home > Database > Mysql Tutorial > body text

安装Oracle改变Swap交换空间大小

WBOY
Release: 2016-06-07 17:06:05
Original
1135 people have browsed it

1、检查当前的分区情况:[root@localhost]#free -m2、增加交换分区文件及大小,如果要增加2G大小的交换分区,则命令写法如下,其中

1、检查当前的分区情况:

[root@localhost]#free -m

2、增加交换分区文件及大小,如果要增加2G大小的交换分区,则命令写法如下,,其中的 count 等于想要的块大小。

[root@localhost]# dd if=/dev/zero of=/home/swap bs=1024 count=2048000

3、设置交换文件:

[root@localhost]# mkswap /home/swap

4、立即启用交换分区文件

[root@localhost]# swapon /home/swap

5、如果要在引导时自动启用,则编辑 /etc/fstab 文件,添加行:

/home/swap swap swap defaults 0 0

系统下次引导时,它就会启用新建的交换文件,再查看SWAP分区大小发现增加了2G。

linux

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!