본문 바로가기

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로 character set encoding 변환하기 iconv로 character set encoding 변환하기 iconv 지원하는 encoding 목록 보기 iconv -l $ iconv -l The following list contains all the coded character sets known. This does not necessarily mean that all combinations of these names can be used for the FROM and TO command line parameters. One coded character set can be listed with several different names (aliases). 437, 500, 500V1, 850, 851, 852, 855, 856, 857, 858.. 더보기
[리눅스] 킥스타트로 설치 자동화하기 킥스타트로 설치 자동화하기 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) 백업 스크립트 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.. 더보기
[리눅스] MySQL 백업 및 복구 MySQL 백업 및 복구 - MySQL 디렉토리 전체를 압축 백업하기 mysql dir : /var/lib (데이터베이스 디렉토리) tar cvfpz mysql_dir_tar.gz /var/lib/mysql - 특정 데이터베이스 백업과 복구 백업 형식 : mysqldump -u DB계정명 -p DB명 > 저장할파일명 복구 형식 : mysql -u DB계정명 -p DB명 mysqldb.sql $ mysqldump -u root -p mysql > mysqldb.sql Enter password: mysql DB 생성 mysqladmin -u root -p create mysql $ mysqladmin -u root -.. 더보기

728x90