전체 글 (197) 썸네일형 리스트형 파일유무 보호되어 있는 글입니다. mysql backup #!/bin/sh dat=`date +%Y%m%d%H%M%S` #echo $dat tar cfpz /bak/db/mysql$dat.tgz /var/mysql/data/* tar cfpz /bak/user/aaa$dat.tgz /home/aaa/* tar cfpz /bak/user/webroot$dat.tgz /home/webroot/public_html/* #tar cfpz /bak/user/cvs$dat.tgz /home/cvs/* echo "removing old backup files. . ." find /bak/db/ -mtime +30 -exec rm -f {} \; find /bak/user/ -mtime +30 -exec rm -f {} \; centos 4.x 대 bash 업데이트 아래와 같이 하여 rpm을 생성하고 업데이트 하시면 됩니다. 1. mkdir -p /root/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} 2. echo "%_topdir /root/rpmbuild/" > /root/.rpmmacros 3. rpm -Uvh http://vault.centos.org/4.9/apt/i386/SRPMS.updates/bash-3.0-27.el4.src.rpm 4. cd /root/rpmbuild/SOURCES/ 5. wget http://ftp.gnu.org/pub/gnu/bash/bash-3.0-patches/bash30-017 6. bash30-017 파일 내용 중 3.0.16 을 3.0 으로 수정 7. cd /root/rpmbuild/SPE.. geoip 보호되어 있는 글입니다. Cluster How to CentOS / RedHat 6.2 Step # 1: Mount an ISO file. # mkdir -p /media/centos # mount -o loop /dev/centos6X.iso /media/centos Step # 2: Create repo config file on both the node. # vi /etc/yum.repos.d/iso.repo [ISO] baseurl=file:///media/centos enabled=1 Save and close the file Step # 3: Stop firewall on both node. #chkconfig iptables off #chkconfig ip6tables off Step # 4: Disable Selinux. #vi /etc/selinux/config disbal.. Mysql repaired 데이터베이스 복구 - 복구 유틸리티 1. 복구대상 인덱스 테이블이 *.ISM 파일 형식이면 isamchk 사용 2. 복구대상 인덱스 테이블이 *.MYI 파일 형식이면 myisamchk 사용 해당 유틸리티 사용시에는 mysql 종료후 사용할것 - 복구시 사용되는 데이터베이스 관련 파일 위치 1. /var/lib/mysql/db명에 위치 2. 각 테이블 하나에 3개의 파일이 생성되어 해당 테이블의 데이터가 실제로 저장 *.MYD : 실제 데이터가 저장되는 데이터파일 *.MYI : 테이블의 인덱스 정보를 저장하는 인덱스 파일 *.frm : 테이블의 구조가 저장되는 스키마파일 - 이상유무 점검 방법 # myisamchk -s /var/lib/mysql/test.MYI //점검결과를 간략히 출력 # myisamc.. mysqli insert extract($_POST);echo $user_id.'';echo $user_pass.'';echo $user_email.''; $mysqli = new mysqli("localhost", "root", "password", "DB"); if ($mysqli->connect_errno) { echo "Failed to connect to MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error; } $query="INSERT INTO `join` ( `id`, `pw`, `email` ) VALUES ( '$user_id', '$user_pass', '$user_e.. Attack alrams 보호되어 있는 글입니다. Client IP 문제(X-Forwarded-For) 해결 방안 Getting The Real IP Of Your UsersTags: aspc#coldfusionipjavajspperlphpprogrammingvb.netwebdevC#PHPJava and JSPASP/VBScriptColdFusionPerlThere are a lot of sites around the internet that try and get your IP address. Most of their reasons are legitimate. For example Google Adsense will log your IP to see where the user clicking the advert is from (and kick you off if its the same IP you logged int.. 스위치 포트 미러링 1. C3560, C3750 미러링 포트 설정 Config terminal 모드에서 입력 Ex.1) 출발주소 vlan 설정시 monitor session 1 source vlan 1 both// 출발 주소 vlan1, both-rx,tx 포함 monitor session 1 destination interface Fa0/24 // 도착주소 Fa0/24 포트 Ex.2) 출발주소 특정포트 설정시 monitor session 1 source interface Gi1/0/23 both //출발주소 Gi/1/0/23 포트, both-rx,tx 포함 monitor session 1 destination interface Gi1/0/11 //도착주소 Gi1/0/11 포트 2. C4006 미러링 포트 설정 set sp.. 이전 1 ··· 13 14 15 16 17 18 19 20 다음