본문 바로가기

Linux18

로그 수집할때 월마다 폴더 만들어서 저장하기 안녕하세요. snmp등 centos에서 방화벽 로그 수집 시 월마다 폴더를 만들어서 저장 하는 방법 입니다. rsyslog.conf에서 로그 파일 이름을 월마다 변경하려면 다음과 같이 설정할 수 있습니다. 로그 파일 이름 변경 설정 rsyslog.conf 파일에서 로그 파일 이름을 변경하려면 다음과 같이 설정합니다.이 설정은 로그 메시지의 syslogtag 필드를 파일 이름으로 사용하며, %$YEAR%와 %$MONTH% 템플릿을 사용하여 로그 파일의 경로를 지정합니다. 이렇게 설정하면 매월 새로운 디렉토리에 로그 파일이 생성됩니다. $template MyTemplate,"/var/log/myapp/%$YEAR%-%$MONTH%/%syslogtag%.log" *.* ?MyTemplate rsyslog 재시.. 2023. 4. 11.
데비안 리눅스 (debian ) 하드웨어 정보 보기(장치 관리자) 안녕하세요. 데이안 리눅스에서 하드웨어 정보 보는 방법 입니다. 1. 연결된 PCI 장비 보기 #lspci 2. 연결된 usb 장비 보기 #lsusb 3. CPU 정보 보기 #lscpu 4. 디스크 파티션 정보 #lsblk 99. 관련 명령어 2023. 1. 6.
promox 에서 ifconfig 명령어 안 될때 -bash:ifconfig: command not found 안녕하세요. Promox 설치 후 ifconfig 명령어 안될때 방법 입니다. -bash:ifconfig: command not found 오류 1. net-tools 설치 (# apt install net-tools) 2. 설치 후 확인 감사합니다. 2023. 1. 6.
centos에서 ifconfig 명령어 안 될때 -bash:ifconfig: command not found 안녕하세요. centos 설치 후 ifconfig 명령어 안될때 방법 입니다. -bash:ifconfig: command not found 오류 1. net-tools 설치 (# yum install net-tools 2. 설치 후 확인 감사합니다. 2023. 1. 5.
centos 9 error "signature not supported hash algorithm sha1 not available" 안녕하세요. Centos 9 설치 후 Teamviewer 설치를 하려고 하니 설치가 안됩니다. 찾아 보니 Centos에서는 SHA1 시그니처 검증이 비활성화 되어서 OS 보안기능을 낮추어야 합니다. # update-crypto-policies --set LEGACY 해당 명령어를 입력 하면 sha1 설치가 가능 합니다. 감사합니다. 2022. 8. 4.
pgrep 명령어 http://blog.naver.com/ecross?Redirect=Log&logNo=150101913291 퍼온글 입니다.http://blog.naver.com/ecross?Redirect=Log&logNo=150101913291 퍼온글 입니다. pgrep ps 명령어를 이용하여 활동 중인 프로세스를 보기 위해서는 -e 옵션이나 -A 옵션을 사용한다. 두 옵션을 사용하면 현재 활동 중인 프로세스 목록이 모두 출력되기 때문에 결과 화면이 무척 많다. 그 중에서 원하는 프로세스의 유무를 확인하거나 프로세스의 정보를 본다는 것은 상당히 힘든 일이다. 이러한 경우 많이 사용하는 방법은 ps 명령어와 grep 명령어를 함께 사용하는 방법이다. ps 명령어의 결과를 grep 명령어를 통하면 원하는 단어(주로 명령.. 2014. 11. 12.
19일 레이드 1, 5 구성 Quota root@192.168.10.103's password: Last login: Thu Jun 26 05:17:21 2014 from 192.168.10.1 centos2[root /root]# centos2[root /root]# centos2[root /root]# mdadm --detail --scan ARRAY /dev/md0 level=raid0 num-devices=2 metadata=0.90 UUID=5a088ee8:3b9d3abe:da1c49f8:7244bc72 centos2[root /root]# dumpe2fs /dev/md0 dumpe2fs 1.39 (29-May-2006) Filesystem volume name: Last mounted on: Filesystem UUID: 7265c.. 2014. 7. 1.
18일 레이드 구성 centos2[root /root]# ls sdc sdd ls: sdc: 그런 파일이나 디렉토리가 없음 ls: sdd: 그런 파일이나 디렉토리가 없음 centos2[root /root]# cd /dev centos2[root /dev]# fdisk /dev/sdc Command (m for help): p Disk /dev/sdc: 536 MB, 536870912 bytes 64 heads, 32 sectors/track, 512 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Device Boot Start End Blocks Id System /dev/sdc1 1 96 98288 83 Linux /dev/sdc2 97 192 98304 83 Li.. 2014. 6. 30.
17일차 ext2 ext3 차이, 파일세스템 및 복구 centos2[root /root]# mkfs -t ext3 /dev/sdc2centos2[root /root]# mkfs -t ext2 /dev/sdc1 포멧 차지점은 ext3dl 전정이가 갑작스러운 다운시 더 안정 적이다.포멧시 Creating journal (4096 blocks): done 메시지가 더 추가로 나온다. ext2로 포멧 하고 마운트시 ext3으로 하면 안된다.ext3로 마운트 한다는 것은 journal 를 사용 한다는 소리다.반대로 ext3 포멧 하고 ext2 로 마운트는 가능 하다. centos2[root /dev]# mkdir /mnt/ssdc1centos2[root /dev]# mount /dev/sdc1 /mnt/ssdc1centos2[root /dev]# fsck /dev/.. 2014. 6. 27.
15일 자동마운트 http://twoseven.kr/mount.txt [root /dev]$ ls sd* sda sda1 sda2 sdb sdc sdd sde sdf sdg [root /dev]$ fdisk /dev/sdb Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable.Warning: invalid flag 0x0000 of parti.. 2014. 6. 25.
728x90
반응형