MoodleBox On Raspberry Pi 3
  • Introduction
  • 為什麼有MoodleBox
  • MoodleBox特點
  • 樹莓的初始安裝
  • 設定無線基地台(AP)
  • 安裝web服務器
  • 安裝Moodle(終於!)
  • 由USB隨身碟或SFTP存取Moodle檔案
  • 其他Moodle設定
  • phpMyAdmin的設定(選擇性)
  • 最佳化
  • 啟動時自動調整分割區大小
  • 清理分佈
Powered by GitBook
On this page

Was this helpful?

清理分佈

在複製(clone)及發佈之前,下面的命令可以清理MoodleBox並減少它所需磁碟空間:

sudo rm -r /var/www/moodledata/cache/*
sudo rm -r /var/www/moodledata/localcache/*
sudo rm -r /var/www/moodledata/temp/*
sudo rm -r /var/www/moodledata/trashdir/*
sudo rm -r /var/www/moodledata/sessions/*
sudo rm -r /var/cache/moodle/*
sudo rm -r /var/cache/moodle-cache-backup/*
mysql -u root -p'888' moodle -e "truncate table moodle.mdl_logstore_standard_log"
mysql -u root -p'888' moodle -e "truncate table moodle.mdl_config_log"
sudo apt-get clean
sudo rm -r /var/cache/debconf/*
sudo rm -r /tmp/*
sudo rm -r /var/tmp/*
rm ~/.mysql_history
sudo bash -c 'for logs in `find /var/log -type f`; do > $logs; done'
cat /dev/null > ~/.bash_history && history -c && sudo shutdown -h now

如果一切順利,所需的總容量是1.6G,封軌映像檔大約有2.3 GB的大小。壓縮後大約750 MB左右。

Previous啟動時自動調整分割區大小

Last updated 6 years ago

Was this helpful?