차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판이전 판
다음 판
이전 판
tech:log2ram [2021/08/31 11:06] – 이전 판으로 되돌림 (2021/08/22 19:46) 162.158.119.194tech:log2ram [2023/05/07 18:22] (현재) – [확인] V_L
줄 11: 줄 11:
  
 =====설치===== =====설치=====
- 
 <file> <file>
-cd ~ +echo "deb [signed-by=/usr/share/keyrings/azlux-archive-keyring.gpg] http://packages.azlux.fr/debianbullseye main" | sudo tee /etc/apt/sources.list.d/azlux.list 
-curl -Lo log2ram.tar.gz https://github.com/azlux/log2ram/archive/master.tar.gz +sudo wget -O /usr/share/keyrings/azlux-archive-keyring.gpg  https://azlux.fr/repo.gpg 
-tar xf log2ram.tar.gz +sudo apt update 
-cd log2ram-master +sudo apt install log2ram
-chmod +x install.sh && sudo ./install.sh +
-cd .. +
-rm -r log2ram-master+
 </file> </file>
 + 
  
-=====확인=====+=====세부 설정===== 
 +기본 설정으로는 [[rsync]]를 사용해서 하루에 한번 HDD에 저장한다. 
  
-  systemctl status log2ram 
  
 +''/etc/log2ram.conf'' 
  
-  Active: active (exited) since Sun 2021-08-22 10:35:50 UTC; 39s ago 
  
-초록색 ''active'' 확인+  SIZE=400M 
 +실제 ''/var/log'' 의 크기보다 커야한다.(*) 
 +폴더 크기 줄여 보려면 [[var_log]]참조
  
 +이제 재시작
 +  reboot
  
-''df''를 해보면+=====확인=====
  
 <file> <file>
-Filesystem                       1K-blocks    Used Available Use% Mounted on +# systemctl status log2ram 
-/dev/mapper/pve-vm--101--disk--0  41022688 1137472  37771680   3% / +Active: active (exited) since Sun 2021-08-22 10:35:50 UTC; 39s ago
-none                                   492             488   1% /dev +
-udev                              16375628        16375628   0% /dev/tty +
-tmpfs                             16402584        16402584   0% /dev/shm +
-tmpfs                              3280520     108   3280412   1% /run +
-tmpfs                                 5120            5120   0% /run/lock +
-tmpfs                             16402584        16402584   0% /sys/fs/cgroup +
-log2ram                              40960   17288     23672  43% /var/log +
-tmpfs                              3280516         3280516   0% /run/user/1000+
 </file> </file>
  
-''/var/log'' 가 ''log2ram'' 에 할당되어 있는 것을 볼 수 있다. +active 확인
  
 +<file>
 +# df -h
 +Filesystem            Size  Used Avail Use% Mounted on
 +log2ram               400M  108M  293M  27% /var/log
 +</file>
  
-=====설정===== +임시 저장용 ''log2ram'' 램디스크가 생겨있는 것을 볼 수 있다. 
-''nano /etc/log2ram.conf''  +
- +
-  * SIZE: 램디스크 용량 (기본 40M) +
-  * MAIL: 램디스크 부족하면 메일 보낼지 여부 +