Last update at :2024-05-14,Edit by888u
OpenVZ architecture VPS is not applicable, it is only suitable for XEN and KVM architecture, but not all VPS hosting providers may allow you to add swap files.
1. Enter the directory
cd /var/2. Obtain the SWAP file block to be added (here, we take 1GB as an example). This step may take some time, please wait patiently
dd if=/dev/zero of=swapfile bs=1024 count=10383363. Create SWAP file
/sbin/mkswap swapfile4. Activate SWAP file
/sbin/swapon swapfile5. Check whether the SWAP information is correct
/sbin/swapon –s6. Add to the fstab file to start automatically when the system boots
echo "/var/swapfile swap swap defaults 0 0" >>/etc/fstabYou can also modify /etc/fstab in the above step and add /var/swapfile swap swap defaults 0 0
Recommended site searches: Hong Kong server rental, registration-free virtual space, foreign host shopping guide, website space domain name, online proxy server free web version, all-purpose virtual host, China domain name trading center, host domain name, registration-free, American host network,
发表评论