본문 바로가기

728x90

분류 전체보기

[리눅스] swap 메모리 초기화 swap 메모리 초기화 swap 메모리 사용빈도 설정 - vm.swappiness = 60 / 기본값 60 - (사용빈도 낮음: 0%-----------------------|------------100% 사용빈도 높음) sysctl vm.swappiness $ sysctl vm.swappiness vm.swappiness = 60 swap 메모리 사용빈도 변경 작업 vi sysctl.conf vm.swappiness=0 또는 echo 0 > /proc/sys/vm/swappiness swap 메모리 초기화 - swapoff를 하게되면 sawp out -> swap in 되면서 실제 물리 메모리로 이동 swapoff -a swapon -a $ free total used free shared buff/c.. 더보기
iconv 명령어 iconv 명령어iconv 명령어는 문자 인코딩 변환을 수행하는 유용한 유틸리티입니다. 특히, 텍스트 파일의 문자 인코딩을 변경할 때 사용됩니다.기본 구문iconv [옵션] -f 입력인코딩 -t 출력인코딩 [입력파일] > [출력파일]주요 옵션-f, --from-code=인코딩: 입력 파일의 문자 인코딩을 지정합니다.-t, --to-code=인코딩: 출력 파일의 문자 인코딩을 지정합니다.-o, --output=파일: 출력 파일을 지정합니다.-l, --list: 시스템에서 지원하는 인코딩 목록을 출력합니다.사용 예시UTF-8에서 ISO-8859-1으로 변환iconv -f UTF-8 -t ISO-8859-1 input.txt > output.txt파일의 인코딩 확인file -i filename시스템에서 지원하.. 더보기
[리눅스] 킥스타트로 설치 자동화하기 킥스타트로 설치 자동화하기 selinux perl -pi -e 's/^SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config reboot reboot Packages Installation yum install -y tftp tftp-server syslinux-tftpboot xinetd dhcp dhcp-devel syslinux yum install -y epel-release yum install -y nginx tftp sed -i '/disable/ s/yes/no/' /etc/xinetd.d/tftp dhcpd cat /usr/share/doc/dhcp*/dhcpd.conf.example > /etc/dhcp/dhcpd.conf cat > /e.. 더보기
[리눅스] CentOS 7 런레벨(runlevel) 변경 CentOS 7 런레벨(runlevel) 변경 1. RunLevel config 파일 (CentOS 7 부터 systemctl 명령을 통해 RunLevel를 변경하도록 안내) vim /etc/inittab # inittab is no longer used when using systemd. # # ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM. # # Ctrl-Alt-Delete is handled by /usr/lib/systemd/system/ctrl-alt-del.target # # systemd uses 'targets' instead of runlevels. By default, there are two main targets: # .. 더보기
[리눅스] php 임의(랜덤)의 패스워드 생성 php 임의(랜덤)의 패스워드 생성 vim passwdcreate.php 더보기
[리눅스] named(bind) zone file ip change scripte named(bind) zone file ip change scripte vim ipswap.sh #!/bin/bash for files in `ls /var/named/aa04` do sed "s/10.0.10.124/192.168.0.20/g" $files > /tmp/named/aa04/$files done 더보기
[리눅스] named(bind)에 geoip 기능 사용하기 named(bind)에 geoip 기능 사용하기 yum install gcc epel-release yum install zlib-devel openssl-devel yum install GeoIP GeoIP-devel yum install bind bind-utils [bind download site] http://ftp.isc.org/isc/bind9/9.10.4-P6/ cd /usr/local/src/ wget http://ftp.isc.org/isc/bind9/9.10.4-P6/bind-9.10.4-P6.tar.gz tar xfz bind-9.10.4-P6.tar.gz cd bind-9.10.4-P6 ./configure --prefix=/usr/local/bind-9.10.4-P6 --sysc.. 더보기
[리눅스] named(bind) 백업 스크립트 named(bind) 백업 스크립트 vim dns_backup.sh #!/bin/bash set -x DIR="fvm01.scbyun.com-`date +%Y%m%d`" cd /root/.nl/ mkdir $DIR mkdir $DIR/sbin mkdir $DIR/etc cp -rpf /var/named $DIR cp /etc/named.conf $DIR/etc cp /etc/named.logging.conf $DIR/etc cp /etc/named.root.key $DIR/etc cp /etc/named.iscdlv.key $DIR/etc cp /etc/rndc.* $DIR/etc cp /usr/sbin/named $DIR/sbin #cp -pr /usr/local/nbind $DIR #rm -rf $D.. 더보기

728x90