본문 바로가기
반응형

전체 글356

centos에서 vsftpd + mysql 사용 centos에서 vsftpd + mysql 사용 CentOS 에서 자주 사용되는 FTP 서버인 Vsftpd 의 virtual user 기능을 pam 를 통한 mysql DB 를 이용하여 사용하는 방법에 대한 설명입니다.Vsftpd 용 계정 추가 및 가상 사용자 디렉토리 생성Vsftpd 가 사용할 계정은 vsftpd 로 가정하고 추가합니다.> useradd vsftpd > passwd vsftpd가상 사용자가 사용할 디렉토리는 vsftpd 에 users 디렉토리를 사용한다고 가정합니다. 가상 사용자를 user1 이라고 가정하고 가상 사용자의 홈 디렉토리까지 만들어 줍니다.> mkdir /home/vsftpd/users > mkdir /home/vsftpd/users/user1Mysql Server 설치가상.. 2018. 1. 18.
Apache pagespeed 설치 Apache pagespeed 설치 웹페이지 가속 기술중에 하나인 pagespeed기본적으로는 사이트 속도를 개선하기 위해서 페이지 로딩 타임을 줄이고 이를 바탕으로 페이지의 호출 시간과 네트워크 대역폭의 최적화해서 속도를 개선하는 쪽에 방점을 가지고 있는 모양이다.이런 세부적인 기술적인 요인들을 하나의 결과물로 만들어 아파치 웹서버 모듈의 일종으로 규합한 것이다. 일단, 개발자 블로그에 올라온 내용에 따르면 현재 콘텐츠 및 워크로드 수정 없이 CSS, 자바스크립트, 이미지를 건들이지 않고 성능 개선할 수 있다고 한다- 설치 -1. at 패키지 확인. 없으면 설치yum install at 2. mod_pagespeed 땡겨오기wget https://dl-ssl.google.com/dl/linux/dire.. 2018. 1. 16.
Apache rewrite 정리 Apache rewrite 정리 [Rewrite 지시자] . : 다수의 한문자 ? : 0개 이상의 한문자 * : 0개 이상의 문자 또는 문자열 + : 1개 이상의 문자 또는 문자열 (chars) : (, ) 안의 문자또는 문자열을 그룹으로 묶는다. 이 문자그룹은 Substitution(return URL)에서 $N 의 변수로 활용할수 있다. ^ : 문자열의 첫문(열)을 지정 $ : 문자열의 끝 문자(열)을 지정 (역슬래쉬) : 정규표현식에서 특별한 의미로 사용되는 문자의 특수기능을 제거 {n} : 정확히 n번 반복 {n,} : n번 이상 반복 {n,m} : n 이상 m 이하 반복 [chars] : 문자들의 범위 또는 표현할 수 있는 문자들을 설정합니다. 예) [a-z] : a 부터 z 까지의 소문자, [.. 2018. 1. 16.
네임서버 설치 bind 설치 및 설정 (dns) 1. rpm 설치 yum install bind bind-* 2. /etc/named.conf 수정 options { listen-on port 53 { any; }; listen-on-v6 port 53 { ::1; }; directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; memstatistics-file "/var/named/data/named_mem_stats.txt"; allow-query { any; }; allow-transfer { 127.0.0.1;1.234.27.103;59.1.209.94; }; recursion no; versi.. 2018. 1. 14.
원격호스트에서 ssh 세션을 이용한 rsync 명령으로 파일/디렉토리 복사 원격호스트에서 ssh 세션을 이용한 rsync 명령으로 파일/디렉토리 복사 예) rsync -r -v -u -z --delete -e "ssh -p 22" ~/my_dir john@my_server.net:/home/john/my_backup 예) [root@localhost test]# rsync -v -u -a --delete --rsh=ssh --stats root@172.28.71.45:/home/student1 . root@172.28.71.45's password: receiving file list ... done student1/ student1/.bash_logout student1/.bash_profile student1/.bashrc student1/test.txt student1/... 2018. 1. 14.
클램(ClamAV) 안티바이러스 설치하기 (CentOS 6.6) CentOS 6.6에서 클램 안티바이러스를 설치하는 방법에대해 정리한글입니다. 클램 안티바이러스는 오픈소스로 리눅스 및 윈도우에서 포괄적으로 설치가 가능하며 바이러스의 검사가 가능하나 감염된 파일을 치료해주지는 않습니다. 사용시 이점에 유의해야합니다. 주의 : 이 글을 참고후 설치하여 발생하는 문제점은 작성자가 책임을 지지않습니다. 사용 서버 : 가상서버 CentOS 6.6 64 bit 서버 상태 : 초기 셋팅 상태 # yum install epel-release epel-release의 설치가 완료되었다면 클램 안티바이러스를 설치합니다. # yum install clamav clamscan -r 디렉토리명을 이용해 사용하면 검사가 진행되지만 이런 메세지가 나올수도 있습니다. 안의 내용을 구글 번역등으로.. 2018. 1. 14.
루트킷(rootkits) 체크하기 (chkrootkit, rkhunter) 루트킷(rootkits) 체크하기 (chkrootkit, rkhunter) 대부분의 rootkits은 커널에 의해 숨겨져 커널 내에서만 보인다. chkrootkit과 rkhunter를 사용해 rootkits을 찾아낼 수 있다. Chkrootkit 사용 # yum install chkrootkit # chkrootkit ROOTDIR is `/' Checking `amd'... not found Checking `basename'... not infected Checking `biff'... not found Checking `chfn'... not infected Checking `chsh'... not infected Checking `cron'... not infected ... rkhunter 사용.. 2018. 1. 14.
Superblock 손상을 입었을 경우 복구 방법 http://docs.sun.com/app/docs/doc/805-7228/6j6q7uf0i?a=view When the superblock of a file system becomes damaged, you must restore it. fsck tells you when a superblock is bad. Fortunately, redundant copies of the superblock are stored within a file system. You can use fsck -o b to replace the superblock with one of the copies. How to Restore a Bad Superblock 1. Become superuser. 2. Change to a di.. 2018. 1. 14.
Fail2ban을 이용한 Brute Force 공격 막기 Fail2ban을 이용한 Brute Force 공격 막기 1. yum으로 패키지 설치 yum install fail2ban 2. 설정 파일 구성 vi /etc/fail2ban/jail.conf ----------//--------- [DEFAULT] # "ignoreip" can be an IP address, a CIDR mask or a DNS host. Fail2ban will not # ban a host which matches an address in this list. Several addresses can be # defined using space separator. ignoreip = 127.0.0.1 2018. 1. 14.
awk 명령어 awk 명령어 awk '/west/' datafile : west 라는 글이 있는 줄 출력 awk '/^north/' datafile : north로 시작하는 줄 출력 awk '/^(no | so)/' datafile : no 또는 so 로 시작하는 줄 출력 awk '{ print $3, $2 }' datafile : datafile 리스트의 세 번째 와 두 번째 필드를 스페이스로 띄어서 출력 awk '{ print $3 $2 }' datafile : datafile 리스트의 세 번째 와 두 번째 필드를 그냥 붙여서 출력 awk '{ print "Number of fields : " NF} ' datafile : datafile의 각 줄마다의 필드수를 리턴한다. awk '$5 ~ /\.[7-9]+/' d.. 2018. 1. 14.
리눅스 시스템 모니터링 툴 20가지 리눅스 시스템 모니터링 툴 20가지 from: http://www.cyberciti.biz/tips/top-linux-monitoring-tools.html Need to monitor Linux server performance? Try these built-in command and a few add-on tools. Most Linux distributions are equipped with tons of monitoring. These tools provide metrics which can be used to get information about system activities. You can use these tools to find the possible causes of a perform.. 2018. 1. 14.
쉘 스크립트 (Shell Script) 쉘 스크립트 (Shell Script) - (Ⅰ) 어떤 것이 쉘 스크립트? 우리는 알게 모르게 많은 쉘 스크립트을 사용한다. 그렇다면 어떤 것이 쉘스크립트인가? 확인을 해보는 방법은 file와 grep명령을 사용해서 찾아보는 것이다. 필자의 시스템에서의 결과는 다음과 같다. $ (cd /bin ; file * |grep “shell script”) false : Bourne shell script text igawk : Bourne shell script text remadmin : Bourne shell script text true : Bourne shell script text $ (cd /usr/bin ; file * |grep “shell script”) anytopnm : Bourne shel.. 2018. 1. 14.
반응형