25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.8 KiB

8 년 전
7 년 전
8 년 전
7 년 전
8 년 전
8 년 전
7 년 전
8 년 전
7 년 전
7 년 전
8 년 전
7 년 전
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Log2Ram
  2. Like ramlog for systemd (on debian 8 jessie for example).
  3. Usefull for **RaspberryPi** for not writing on the SD card all the time. You need it because your SD card doesn't want to suffer anymore!
  4. The script [log2ram](https://github.com/azlux/log2ram) can work on every linux system. So you can use it with your own daemon manager if you don't have systemd.
  5. Log2Ram is based on transient log for Systemd here : [A transient /var/log](https://www.debian-administration.org/article/661/A_transient_/var/log)
  6. ## Install
  7. ```
  8. git clone https://github.com/azlux/log2ram.git
  9. cd log2ram
  10. chmod +x install.sh
  11. sudo ./install.sh
  12. ```
  13. **REBOOT** before installing anything else (for example apache2)
  14. ## Customize
  15. #### variables :
  16. In the file `/etc/log2ram.conf`, there are three variables:
  17. - `SIZE`: defines the size the log folder will reserve into the RAM.
  18. - `USE_RSYNC`: Can be set to `true` if you prefer "rsync" rather than "cp". I use the command `cp -u` and `rsync -X`, I don't copy the all folder every time for optimization.
  19. - `MAIL`: Disables the error system mail if there is not enough place on RAM (if set to `false`)
  20. #### refresh time:
  21. By default Log2Ram writes to the HardDisk every hour. If you think this is too much, you can make the write every day by moving the cron file to daily: `sudo mv /etc/cron.hourly/log2ram /etc/cron.daily/log2ram`.
  22. ### It is working?
  23. You can now check the mount folder in ram with (You will see lines with log2ram if working)
  24. ```
  25. df -h
  26. mount
  27. ```
  28. If you have issue with apache2, you can try to add `apache2.service` next to other services on the `Before` parameter in `/etc/systemd/system/log2ram.service` it will solve the pb
  29. The log for log2ram will be written at: `/var/log/log2ram.log`
  30. ###### Now, muffins for everyone!
  31. ## Uninstall :(
  32. (Because sometime we need it)
  33. ```
  34. cd log2ram
  35. chmod +x uninstall.sh
  36. sudo ./uninstall.sh
  37. ```