Jump to content
View in the app

A better way to browse. Learn more.

PHP论坛人

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

調整swap

Featured Replies

--------------

調整swap

--------------

安裝LNMP前,先調整swap為 x GB

瀏覽RAM記憶體

free -h

Swap: 0B 如果看到total為0,表示沒設置swap

已設定swap的情況,例如 Swap: 6.2Gi 表示swap設置為6GB

建立一個資料夾用於存放swap

mkdir /var/swapfile

調整swap為 4GB (視情況而定)

dd if=/dev/zero of=/var/swapfile/file.swap bs=1024k count=4096

建立一個swap檔案

mkswap /var/swapfile/file.swap

修改swap資料夾權限

chmod 0600 /var/swapfile

chmod 0600 /var/swapfile/file.swap

到fstab檔案中新增開機自動掛載設定

vi /etc/fstab

就能開機啟用這個swap,在底部加入

/var/swapfile/file.swap swap swap defaults 0 0

ESC儲存並離開

:wq

啟用

swapon /var/swapfile/file.swap

重開機

reboot

再次確認swap是否已調整為 4GB

free -h

Edited by Jack

Create an account or sign in to comment

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.