In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to add swap exchange partition under Xen VPS". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "how to add swap exchange partition under Xen VPS"!
1. Enter the directory
Cd / var/
2. Get the file block of 256m:
Dd if=/dev/zero of=swapfile bs=1024 count=262144
3. Create a swap file
/ sbin/mkswap swapfile
4. Activate the swap file
/ sbin/swapon swapfile
5. Check whether the swap is correct:
/ sbin/swapon-s
6. Add it to the fstab file so that the system starts automatically when it boots.
Vi / etc/fstab
Add the following at the end:
Var/swapfile swap swap defaults 0 0
You can also execute the following command, which is more convenient.
Echo "/ var/swapfile swap swap defaults 0" > > / etc/fstab
By the way, the parameters of the DD command are introduced:
Dd command
Function: copy the specified input file to the specified output file, and the format can be converted during the copying process. You can use this command to achieve the function of the diskcopy command under DOS. First use the dd command to write the data on the floppy disk into a storage file of the hard disk, and then write the storage file to the second floppy disk to complete the function of diskcopy. It is important to note that the hosting files on the hard disk should be deleted with the rm command. The system uses standard input files and standard output files by default.
Syntax: dd [options]
If = enter the file (or device name).
Of = output file (or device name).
Ibs = bytes reads bytes bytes at a time, that is, the number of bytes read into the buffer.
Skip = blocks skips the ibs*blocks block at the beginning of the read-in buffer.
Obs = bytes writes bytes bytes at a time, that is, the number of bytes written to the buffer.
Bs = bytes also sets the number of bytes in the read / write buffer (equal to setting ibs and obs).
Cbs = byte converts bytes bytes at once.
Count=blocks copies only input blocks blocks.
At this point, I believe you have a deeper understanding of "how to add swap exchange partition under Xen VPS". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.