# Operation System/Linux2015. 8. 16. 05:38리눅스 메모리 슬롯 확인

[darksharvim]dmidecode -t memory

crontab을 이용한 geoip 자동업데이트 스크립트
# Operation System/Linux2015. 8. 16. 05:36crontab을 이용한 geoip 자동업데이트 스크립트

## /bin/runbuildgeodb rm -r /usr/share/xt_geoip mkdir /usr/share/xt_geoip cd /usr/share/xt_geoip xt_geoip_dl xt_geoip_build *.csv ## /etc/crontab 0 6 * * 6 root runbuildgeodb &> /dev/null 출처 : http://www.fyzix.net/index.php?title=Geolocate_Iptables_logs_by_country

# Operation System/Linux2015. 8. 16. 05:36리눅스 ipv6 비활성화

Ipv6가 활성화 되있을 경우, ipv4를 이용하는 프로세스 / 데몬들이 정상적으로 구동하지 않는 경우가 있습니다. 아래는 ipv6의 비활성화 조치 방법입니다. 1. /etc/sysconfig/network 파일 수정 NETWORKING=yes NETWORKING_IPV6=no IPV6INIT=no HOSTNAME=localhost.localdomain 2. disable-ipv6.conf 생성 및 내용 입력 # touch /etc/modprobe.d/disable-ipv6.conf # echo "install ipv6 /bin/true" >> /etc/modprobe.d/disable-ipv6.conf 3. 리부팅 후 ipv6 모듈 disable 확인 # lsmod | grep ipv6 --> 결과 없..

# Operation System/Linux2015. 8. 16. 05:33geoip설치

#설치환경 - CentOS 6.2 x64bit - xtables-addons는 CentOS 5.x에서는 지원이 안되었으나 CentOS 6.0부터 지원됩니다. 5.x에서는 여러가지 설정을 해야지만 가능하다네요 - iptables : 1.4.7 - kernel : 2.6.32-220.2.1.el6.x86_64 1. 기본 설정 selinux를 disabled 로 설정 [root@localhost ~]# vi /etc/sysconfig/selinux # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enf..

[bash]파라미터(인자값) 처리
# Script/Bash2015. 8. 16. 05:32[bash]파라미터(인자값) 처리

bash 에서는 shell 을 실행 할때만 인자를 받아들여 처리 할 수 있다. shell 내부에서 첫번째 인자는 $1, 두번째 인자는 $2, 세번째 인자는 $3, 네번째 인자는 $4 ... 으로 쉘 스크립트 내부에서 변수로 받아서 처리가 가능하다. 또한 인자의 개수는 $# 을 이용하여 현재 들어온 인자의 개수가 몇개인지 알 수 있다. 다음은 쉘에서 인자 처리에 대한 예를 보여주는 샘플 이다. ---------------------------------------------------------- #!/bin/sh argc=$# argv0=$0 argv1=$1 argv2=$2 argv3=$3 argv4=$4 fa_argcv() { if [ 0 -eq $argc ] then echo "argc:$argc" ..

image