Logo

Blog Small

Travel

Journal

When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees.

ncftpget 으로 백업하기

[root@mail WEBHOST]# ncftpget -R -u 아이디 -p 비밀번호 -P 포트번호 도메인명 . ‘상대경로’점(.)은 현재폴더를 의미합니다.상대경로란 /test 라 하면, 도메인명/test가 된다는 것입니다.즉, 아이디의 상대경로다음부터 적용되는 폴더입니다.

Continue Reading

서버셋팅시, 서버퍼미션설정 (서버초기작업시)

Name       rootman   Subject     서버세팅시 방장의 퍼미션 권한 설정 간만에 제 홈페이지를 들어오네요.. 휴~~바쁭건 아닌데.. 여유가 좀처럼 없네요. 서버세팅시 제가 즐겨설정하는 것입니다.auto.sh 라는 화일을 만들어서 퍼미션 및 유저를 삭제합니다.. 해당 사항은 아래와 같습니다. 보탬이나, 부족한 부분있으면 덧붙여 주십시요.. ^^………… #!/bin/sh# 제목 : 퍼미션 및 유저삭제#chmod 700 /usr/bin/fingerchmod 700 /usr/bin/nslookupchmod 700 /usr/bin/gccchmod 700 /usr/bin/suidperlchmod 700 /usr/bin/whereischmod 700 /usr/bin/ccchmod 700 /usr/bin/chagechmod 700 /usr/bin/chfnchmod 700 /usr/bin/sperl5.00503chmod 700 /usr/bin/c++chmod 700 /usr/bin/makechmod 755 /usr/bin/manchmod 700 /usr/bin/nslookupchmod 700 /usr/bin/pstreechmod 700 /usr/bin/rlogchmod 700 /usr/bin/rloginchmod 700 /usr/bin/whichchmod 700 /usr/bin/whochmod […]

Continue Reading

mysql 의 root 비밀번호 분실시 대처요령

1. mysqld 를 중지시킨다. 2. bin폴더 혹은 실행파일중에서 아래 명령을 실행 /usr/local/mysql/bin/mysqld_safe –user=root –skip-grant-tables &혹은 safe_mysqld 이다. 실행파일은 확인할것 3. mysql로 접근mysqluse mysql mysql> update user set Password=password(‘새비밀번호’) where Host=’localhost’ and User=’root’;Query OK, 1 row affected (0.00 sec)Rows matched: 1  Changed: 1  Warnings: 0 mysql> flush privileges;Query OK, 0 rows affected (0.02 sec) mysql> quit 4. mysqld 재구동[root@eshop bin]# killall mysqld_safe [root@eshop bin]# ps -ax|grep mysqld_safeWarning: bad syntax, perhaps a bogus ‘-‘? See /usr/share/doc/procps-3.2.3/FAQ 10115 pts/0    S      0:00 /bin/sh ./mysqld_safe –user=root –skip-grant-tables10161 pts/0    S+     0:00 […]

Continue Reading

하위 디렉토리까지 뒤져 특정파일의 내용을 replace하기

출처 : http://kltp.kldp.org/stories.php?story=02/01/17/8416340 find . -name ‘*.php’ -exec perl -pi -e ‘s/문자열/변경할문자열/g’ {} \; 웹호스트에서 검증한 명령어입니다. 칸띄우기등 그대로 사용하세요.

Continue Reading

find 명령으로 특정파일 특정문자열 찾아내기

/home 디렉토리 하단에 .htaccess 파일중에서“avi”란 단어가 들어간 파일을 모두 찾아보자. [root@zero7 jasmine]# grep “avi” `find /home -name .htaccess`/home/mech007/public_html/main/.htaccess:RewriteCond %{DOCUMENT_ROOT}//main/attach/1/favicon.ico -f/home/mech007/public_html/main/.htaccess:RewriteRule ^favicon\.ico$ attach/1/favicon.ico [E=SURI:1,L]/home/mech007/public_html/main/.htaccess:RewriteRule ^favicon\.ico$ image/icon_favicon_default.ico [E=SURI:1,L] 만약, 검색한 파일리스트만 출력하려면, 아래와 같이 하면 된다. [root@zero7 jasmine]# grep -l “avi” `find /home -name .htaccess`/home/mech007/public_html/main/.htaccess[root@zero7 jasmine]# 입력시 `는 키보드좌측 탭키 바로위 ~자판임.

Continue Reading