Logo

Monthly:4월 2025

하드디스크의 상태보기

[root@ns2 ~]# smartctl -a /dev/sdasmartctl version 5.33 [i386-redhat-linux-gnu] Copyright (C) 2002-4 Bruce AllenHome page is http://smartmontools.sourceforge.net/ Device: SEAGATE  ST373207LC       Version: 0003Serial number: 3KT04Y9500007609MM1EDevice type: diskTransport protocol: Parallel SCSI (SPI-4)Local Time is: Thu Jul 17 19:47:11 2008 KSTDevice supports SMART and is EnabledTemperature Warning EnabledSMART Health Status: OK Current Drive Temperature:     28 CDrive Trip Temperature:        68 CVendor (Seagate) cache information  Blocks sent to initiator = 3138754649  Blocks received from initiator = 1182413804  Blocks read from cache and sent to initiator = 40205361  Number […]

Continue Reading

linux CPU,메모리 제조사, 슬롯,뱅크등 자세한 정보 알아내는 방법

프로그램 명 : dmidecode 2.8 (시스템(bios/dmi) 정보확인)운영체제     LINUX,FreeBSD라이센스     GPL홈페이지     http://www.nongnu.org/dmidecode/ 홈페이지에서 최신 tar.gz 다운로드 tar xvzfp dmidecode-2.9.tar.gzcd dmidecode-2.9makemake install [root@storage0001 dmidecode-2.9]# whereis dmidecodedmidecode: /usr/sbin/dmidecode /usr/local/sbin/dmidecode[root@storage0001 dmidecode-2.9]# dmidecode 매우 복잡한 시스템정보 출력됨 문제점 너무 복잡해서 뭐가 뭔지 모름 그래서, dmidecode를 쉽게 보여주는 유틸을 하나 추가설치한다. http://ezix.org/project/wiki/HardwareLiSter 화면중간쯤에 The latest version is B.02.13 (MD5:e94c728ed037ca706436b5ef71aa392d, SHA1:e27412d47de8efb4adb3646e46affffb95dd384f). 이 부분 클릭하고 다운로드함 wget http://ezix.org/software/files/lshw-B.02.13.tar.gz tar xvzfp lshw-B.02.13.tar.gzcd lshw-B.02.13make 완료됨 cd src./lshw |more(약 2초간 대기….)      *-cpu:1          description: CPU          physical id: 8          bus info: cpu@1          version: 15.4.3          serial: […]

Continue Reading

서버에 접근하는 ip들 보기

netstat -ant | awk ‘{print $5}’ | cut -f 1 -d : | sort | uniq|wc -l 서버에 접근하는 ip들 보기

Continue Reading

내 linux 가 32bit 인지 64bit 인지 확인방법

#uname -a 하시면 됩니다. Linux kkamagi2 2.6.18-8.1.15.el5 #1 SMP Mon Oct 22 08:32:04 EDT 2007 i686 i686 i386 GNU/Linux 32bit시에 위와 같이 뜨고.. 64bit시에는. x86 64로 나올 꺼예요

Continue Reading

rm 으로 안지워질때 find 명령으로 삭제방법

$ find . -name “b*” -exec rm -rf {} \; 현재 디렉토리(.) 하부에 b로 시작하는 파일은 모두 삭제하라 $ find . -name “*” -exec rm -rf {} \; 이렇게 하면 현재 폴더하부모든파일 및 폴더 삭제 -atime : 파일을 열어본 시간 또는 디렉토리에  cd 명령으로 접근한 시간-mtime : 파일의 내용이 변경된 시간 ls -l 에서 나오는 시간-ctime : 파일의 정보가 변경된 시간 chmod chown과 연관성이 있음  우리가 보통 사용하는 단위는 ls로 보기때문에 mtime 이 맞다. find . -mtime +15 -exec rm -rf {} \; […]

Continue Reading

vi 에서 색깔 설정하기

vi color vi로 파일을 열때 특정 option이 자동수행되게 하려면 ~/.vimrc에 option을 미리 지정하면 됩니다. 예를들어, 라인번호가 항상 나오게 하려면 set number 라는걸 ~/.vimrc에 넣어놓으면 됩니다. 색깔 지정하는걸 Syntax Highlighting이라 하는데 :syntax on 하여 색상이 나오지 않으면 vi가 다 설치되지 않은것입니다. root로 로긴 후 # rpm -qa | grep vim-enhanced 라 하여 아무것도 나오지 않으면 vim-enhanced를 설치해 주어야 합니다. 현시스템에 인스톨 되어 있는 목록 [root@roomie001 install]# rpm -qa |grep vim vim-enhanced-6.3.046-0.40E.7 vim-common-6.3.046-0.40E.7 vim-minimal-6.3.046-0.40E.7 vim-X11-6.3.046-0.40E.7 http://www.rpmfind.net <= 여기 가서 알맞는 버젼을 찾아보십시오. 설치 완료후엔 재접속 하십시오.^^; 컬러설정 확인 ※ 컬러 설정을 했을때 컬러부분의 문장에 언더라인으로 표시되는것은 화면이 […]

Continue Reading

bind-9.3.6 설치와 설정하기 named 구축

bind-9.3.6-4.P1.el5_4.2 설치 yum -y install bind\* 하시면 bind에 대한건 다 설치합니다.   또는 # yum -y install bind bind-libs ypbind yp-tools bind-utils bind-chroot bind-devel 하세요. yum -y install caching-nameserver 설치하면 설정 파일이 생성됩니다. 2개 명령으로 설치 완료 입니다^^ 외부 포트허용 # iptables -A INPUT -p tcp -m tcp –sport 53 -j ACCEPT # iptables -A INPUT -p tcp -m udp –sport 53 -j ACCEPT vi /etc/named.caching-nameserver.conf 화일을 열어서 몇가지 수정해주면 됩니다. options {        listen-on port 53 { 127.0.0.1; };  >> listen-on port 53 […]

Continue Reading

2차네임서버 구축실무

1. /etc/named.conf options {        directory “/var/named”;}; controls {         inet 127.0.0.1 port 953  allow { localhost; } keys { rndckey; };}; zone “.” {        type hint;        file “named.ca”;}; zone “0.0.127.in-addr-arpa” {        type master;        file “named.local”;};zone “webhost.co.kr” {        type slave;        file “webhost.zone”;        masters {                110.45.100.2; //마스터 ip address        };}; include “/etc/rndc.key”; 2. named.local 과 named.ca 준비 /var/namednamed.localnamed.ca 3. 1차네임서버에서 2차서버 ip 허용 vi named.conf controls {         inet 127.0.0.1 port 953  allow { localhost; 110.45.100.3; } keys { rndckey; };        }; 110.45.100.3 은 2차네임서버이다. 4. […]

Continue Reading

bind9 네임서버 소스로 설치하기

bind 소스받기 https://www.isc.org/ 상단첫번째 DOWNLOADS > BIND 에서 최신버전 tar.gz 다운로드 1. 파일 다운로드 받고 컴파일 하기  # gzip  -dc   bind-9.3.0.tar.gz  |  tar  xvf   –# cd  bind-9.3.0# ./configure  # make# make install 2. /etc/rndc.key 생성하기 solaris10[/bind/bin/rndc] # ./rndc-confgen -a -k rndckeysolaris10[/bind/bin/rndc] #  cat /etc/rndc.key# Start of rndc.confkey “rndckey” {         algorithm hmac-md5;         secret “Y9iC3cahZ7I3+3NrtlG6nQ==”;};생성 끝. 3. /etc/named.conf 구성하기====================================================== vi /etc/named.conf // generated by named-bootconf.pl options {        directory “/var/named”;        /*         * If there is a firewall between you and nameservers you want         * to talk to, you might need to uncomment […]

Continue Reading

rocky linux ssh 언어설정

rocky linux8 ssh 에서 한국어 언어설정입니다. # vim /etc/locale.conf LANG=”ko_KR.UTF8″ 저장후 # source /etc/locale.conf 또는 서버 reboot 설정확인하기 # localectl status System locale: LANG=ko_KR.UTF8 VC keymap: us X11 Layout: us # 작성일자 : 2025.03.20

Continue Reading