OS/Linux(39)
-
[개념설명]Log
[로그 저장 데이터] utmp, utmpx : 현재 로그인한 사용자들에 대한 상태 정보 wtmp, wtmpx : 사용자들의 로그인-아웃 정보 sulog, authlog : su(switch user) 명령어 사용 정보 syslog, secure : 사용자 인증에 관련된 정보 loginlog, failedlogin, btmp : 실패한 로그인 정보 shutdownlog : 셧다운, 리부팅, 홀트 정보 access_log, error_log : 웹 서버 접속 정보, 에러 정보 lastlog : 각 사용자의 최근 로그인 정보 messages : 콘솔 상의 화면에 출력되는 메세지 정보 xferlog : FTP 데몬을 통해 송수신 되는 데이터 정보 acct, pacct : 각 사용자별 실행한 명령어 정보 hist..
2020.06.11 -
[Command]간단 Command
[CPU 정보 확인 하기] # cat /proc/cpuinfo # cat /proc/cpuinfo |grep cpu # dmesg | grep cpu [RAM(memory) 정보 확인 하기] # cat /proc/meminfo # free -> 메모리 & 스왑메모리 확인 [DISK 정보 확인 하기] # cat /proc/scsi/scsi # df -h -> 디스크 파티션 확인,용량 정보 보기 # fdisk -l -> 하드디스크 확인 [하드 디스크 정보(ide일 경우(모델보기))] # cat /proc/ide/hda/model (첫번째 하드 hda인경우) # /proc/ide/ (아래에는 하드가 몇개인지 확인 가능) # /proc/ide/hda/ (아래에는 그 하드에 대한 여러 정보가 보인다.) # cat..
2020.06.11 -
[Command]iptables
[열려있는 포트 확인] # nmap -sT -O localhost [방화벽 설정] ps.1 unix 나 다른버전의 linux 인경우 root 계정으로 로그인한 후 sudo 를 뺀 나머지를 입력하면된다. ps.2 tcp로 열고 싶은경우 udp -> tcp 로 바꾸어 주면 된다. # iptables -L : 방화벽 설정 확인 # iptables -A INPUT -p tcp --dport 3306 -j ACCEPT : 3306포트 방화벽 뚫어주기 # service iptables save : 설정한 내용을 저장한다. # /etc/init.d/iptables restart : 포트변경후 iptables 재시작 [기본 명령어] # iptables -A INPUT -p udp --dport 1234 -j DROP ..
2020.06.11 -
[Command]nfs/cifs
[NFS 마운트] 우선 서버쪽에 마운트 가능한 스토리지가 있는지 확인 showmount -e [Storage IP] # showmount -e 192.168.100.10 마운트 mount -t nfs [NAS Storage IP]:[/Storage경로] [Server mount 경로] IP 주소 : 192.168.100.10 server경로 : /storage client경로 : /mnt/nfs #mount -t nfs 192.168.100.10:/storage /mnt/nfs 부팅 후에도 자동 마운트 필요 시 /etc/fstab 에 등록 # vi /etc/fstab 192.168.100.10:/storage /nfs nfs defaults 0 0 추가적으로 설정을 원할 시 defaults 가 있는 자리..
2020.06.11 -
[Command]rpm
[S/W 확인] # rpm -qa | grep -i firefox firefox-10.0.5-1.el6_2.x86_64 [S/W 삭제] # rpm -e firefox-10.0.5-1.el6_2.x86_64 [S/W 삭제시 특이사항] 1. rpm 삭제 명령어를 친다. # rpm -e firefox-10.0.5-1.el6_2.x86_64 error: Failed dependencies: firefox is needed by (installed) spice-xpi-2.7-20.el6.x86_64 => 종속된 S/W 2. 삭제하고자 하는 rpm의 상세 정보를 확인한다. # rpm -qi spice-xpi-2.7-20.el6.x86_64 Name : spice-xpi Relocations: (not relocat..
2020.06.11 -
[장애대처]Hardware 오류2
[Hardware 오류시 슬롯 정보 및 장비 확인 방법] 1. /var/log내 messages 파일을 열어서 해당 로그 관련 정보를 확인한다. Jul 15 18:06:10 test01 kernel: {2}[Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 0 Jul 15 18:06:10 test01 kernel: {2}[Hardware Error]: It has been corrected by h/w and requires no further action Jul 15 18:06:10 test01 kernel: {2}[Hardware Error]: event severity: corrected Jul 15 18:06:10 t..
2020.06.11