chutuoc-logo-600chutuoc-logo-600chutuoc-logo-600chutuoc-logo-600
  • IT Bí điển
    • Lập trình
      • Css
      • Javascript
      • Php
    • Sql
      • Sql căn bản
      • Các lệnh Sql hay dùng
    • Server and vps
      • EasyEngine
        • EasyEngine3
        • EasyEngine4
      • Docker
    • Hệ điều hành
      • Linux
        • Linux terminal command
    • Cms
      • WordPress
        • Theme wordpress
        • Plugin wordpress
    • SEO
    • Công cụ
      • Git
    • DevOps Engineer
    • Solution
✕

Thêm swap cho vps linux

Create a Swap File

sudo fallocate -l 1G /swapfile
ls -lh /swapfile
Output:
-rw-r--r-- 1 root root 1.0G Apr 25 11:14 /swapfile

Enabling the Swap File

sudo chmod 600 /swapfile
ls -lh /swapfile
Output:
-rw------- 1 root root 1.0G Apr 25 11:14 /swapfile
sudo mkswap /swapfile
Output:
Setting up swapspace version 1, size = 1024 MiB (1073737728 bytes)
no label, UUID=6e965805-2ab9-450f-aed6-577e74089dbf
sudo swapon /swapfile
sudo swapon --show
Output
NAME      TYPE  SIZE USED PRIO
/swapfile file 1024M   0B   -1
echo /swapfile none swap defaults 0 0 >> /etc/fstab
Tuấn Sữa
Hướng cây là do gió, hướng cuộc đời là do chính chúng ta

Bài cùng loại

21/02/2024

Allow upload csv file for wordpress


Đọc luôn
20/12/2023

Configure SFTP on EE4 server


Đọc luôn
12/10/2023

Disable xmlrpc wordpress


Đọc luôn

Tìm nhanh

✕

Bài mới nhất

  • Allow upload csv file for wordpress 21/02/2024
  • Configure SFTP on EE4 server 20/12/2023
  • Disable xmlrpc wordpress 12/10/2023
  • How to remove X-Powered-By EasyEngine 4 (EE4) 14/09/2023
  • Lỗi Export mysql “ERROR 1045 (28000): Access denied for user” 17/06/2023

Ý kiến của bạn

Gửi về hòm thư:

[email protected]

© 2016 Tuấn sữa - Blog