Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ CentOS / Linux SWAP partitions added     - How to modify the Linux NIC eth1 to eth0 (Linux)

- Logging information through the web GUI (LogAnalyzer) (Server)

- ORA-00600: internal error code, arguments: [keltnfy-ldmInit], [46], [1], [], [], [], [], [] (Database)

- The difference between free command displays the buffers and cache (Linux)

- Oracle JDK installation under Ubuntu Linux (Linux)

- 2016, the new Node project Precautions (Programming)

- CentOS yum source as the default setting methods in DVD (Linux)

- BCP importing and exporting large amounts of data Practice (Database)

- JavaScript closures and the scope chain (Programming)

- Linux Learning Notes: Users and Groups (Linux)

- The Hill sorting algorithm (Programming)

- Let OS X support NTFS write file (Linux)

- Linux virtual memory and physical memory (Linux)

- C ++ Supplements - Smart Pointers (Programming)

- When RHEL7 use fdisk partition, all partitions can not be used (Linux)

- TeamCity continuous integration in the Linux installation (Linux)

- Virtual Judge structures under Ubuntu 14.04 (Server)

- S5PV210 development board for embedded development environment to build under Ubuntu (Linux)

- Ubuntu set Swap Space Tutorial (Linux)

- ASP.NET 5 is connected with the Redis server on the Linux platform (Server)

  CentOS / Linux SWAP partitions added
  Add Date : 2017-08-31      
  Swap partition use: swap is when the physical memory is not enough when the data into the swap, so the virtual memory swap played a role, in a sense, can be considered to increase the memory space. Usually swap partition is set during installation of the system, if you forget divided swap partition when installing the system, that's all right, there is remedy. Here to talk about how to add swap partition after installing the system.

Scene: Bahrain system hard to force found no points SWAP partition, for the production server, this is clearly not enough, we need to add SWAP partitions.

1, first check the size of the swap

# Free

total used free shared buffers cached
Mem: 3922944 158168 3764776 0 6948 37384
- / + Buffers / cache: 113836 3809108
Swap: 0 0 0
Here obviously show zero

2, using the dd command to create a swap partition

# Dd if = / dev / zero of = / doiido / swap bs = 1024 count = 8388608

The count is calculated: count = SIZE * 1024 (size in MB)
This creates a / doiido / swap partition file size is 8G

3, format the new partition
# Mkswap / doiido / swap

4, the new partition into a swap partition
# Swapon / doiido / swap

NOTE: Close the SWAP command: # swapoff / doiido / swap

5, first check the size of the swap
# Free

total used free shared buffers cached
Mem: 3922944 158168 3764776 0 6948 37384
- / + Buffers / cache: 113836 3809108
Swap: 8388608 0 8388608

6, boot automatically mount swap
# Echo "/ doiido / swap swap swap defaults 0 0" >> / etc / fstab

Thus SWAP partition has been created
- Zabbix monitoring tool deployment under Ubuntu server (Server)
- Linux network security backdoor technology and advanced skill practice (Linux)
- Use lsof restore accidentally deleted log files or database (Linux)
- Analysis of Java keyword final (Programming)
- Linux 64-bit porting (Programming)
- Use backup-manager system backup on Linux (Linux)
- Internal class broadcasting needs public and static (Programming)
- Linux non-root user uses less than 1024 ports (Linux)
- ORA-00845: MEMORY_TARGET not supported on this system Problem (Database)
- Simple configuration shell scripts virtual machine environment experiment (Linux)
- Ganglia Python plug-in the process of writing notes (Linux)
- Linux file permissions bit forced bits and adventure Comments (Linux)
- Use Tmux and Vim to make IDE (Linux)
- Installed in the desktop version of Ubuntu Unity Tweak Tool (Linux)
- Ubuntu root user profiles (Programming)
- Talking about modern programming language syntax and standard library tightly bound phenomenon (Programming)
- Analysis of Java reflection mechanism (Programming)
- Openfire achieve load balancing cluster by Nginx (Server)
- Build your own Git server under Linux (Server)
- Object-oriented language Java some of the basic features (Programming)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.