You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.9 KiB

8 jaren geleden
8 jaren geleden
8 jaren geleden
8 jaren geleden
7 jaren geleden
8 jaren geleden
8 jaren geleden
8 jaren geleden
8 jaren geleden
8 jaren geleden
7 jaren geleden
8 jaren geleden
7 jaren geleden
8 jaren geleden
7 jaren geleden
7 jaren geleden
8 jaren geleden
7 jaren geleden
7 jaren geleden
8 jaren geleden
7 jaren geleden
7 jaren geleden
8 jaren geleden
7 jaren geleden
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Log2Ram
  2. Like ramlog for systemd (on debian 8 jessie for example).
  3. Usefull for **Raspberry** for not writing all the time on the SD card. You need it because your SD card don'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. Into the file `/etc/log2ram.conf`, there are three variables :
  17. - The first variable define the size the log folder will reserve into the RAM.
  18. - The second variable can be set to `true` if you prefer "rsync" than "cp". I use the command `cp -u` and `rsync -X`, I don't copy the all folder every time for optimization.
  19. - The last varibale disable the error system mail if there are no enought place on RAM (if set on false)
  20. #### refresh time:
  21. The default is to write log into the HardDisk every hour. If you think this is too much, you can make the write every day by moving the cron file : `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 into /etc/systemd/system/log2ram.service it will solve the pb
  29. The log for log2ram will be write here : `/var/log.hdd/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. ```