-O file
--output-document=file
The documents will not be written to the appropriate files, but all will be concatenated together and written to file. If - is used as file, documents will be printed to standard output, disabling link conversion. (Use ./- to print to a file literally named -.)
Use of -O is not intended to mean simply "use the name file instead of the one in the URL;"
rather, it is analogous to shell redirection: wget -O file http://foo is intended to work like wget -O - http://foo > file; file will be truncated immediately, and all downloaded content will be written there.
예제
# wget -O - http://url/script | bash
위와 같은 command로 스크립트를 로컬에 다운받지 않고 바로 실행 할 수 있다.
생각해보기
위와 같은 command를 사용하면 간편할 수는 있다. 하지만 시스템 운영자의 입장에서 좋은 것일까??
기본적으로 방화벽으로 보호가 되어 있다는 전제가 있겠지만, 만약 외부에서 원격으로 스크립트를 실행할 수 있다면, 보안 취약점으로 볼수 있다. 이에 대한 대비를 충분히 해야 하는데, 어떤 방법으로 이를 방지할 수 있을까??
웹 서버를 구성하게 되면 옵션을 이용해서 스크립트를 실행을 막을 수 있다.
아직 이에 대한 테스트를 진행해 보진 못하였지만, 기회가 되면 이에 대한 테스트도 진행해 보는 것이 좋을 것 같다.
'OS > Linux' 카테고리의 다른 글
daemon.log 사용 (0) | 2014.04.18 |
---|---|
kern.log 설정 (0) | 2014.04.18 |
hostname (0) | 2014.04.10 |
기본 텍스트 에디터 변경 (0) | 2014.04.09 |
리눅스 <-> 윈도우 텍스트 파일 복사 시 한글깨짐 (1) | 2014.04.08 |
개요
유럽에서 대부분 "서머 타임"이라고 부르는 DST(일광 절약 시간제)는 현지 시간을 봄에는 한 시간 앞당기고, 가을에는 한 시간 뒤로 늦추는 제도입니다. 이렇게 봄과 가을의 시간을 DST로 변경하는 것은 북반구와 남반구 간 차이가 있습니다. 북반구의 DST는 나라와 대륙에 따라 3월이나 4월에 시작하여 10월이나 11월에 끝나고, 남반구에서는 이와 반대로 DST가 10월에 시작하여 3월이나 4월에 끝납니다. 일반적으로 DST는 아시아와 아프리카 및 중남미 지역 일부에서는 채택되지 않습니다.
참고 url :http://support.microsoft.com/gp/cp_dst/ko-kr
설정 방법
1. 화면 우측 하단에 시간을 더블 크릭하면 다음과 같은 창이 나오면 날짜 및 시간 설정 변경 클릭
2. 표준 시간대 변경 클릭
3. 일광 절약 시간에 맞게 시게를 자동으로 조정 부분 체크
knife는 chef client와 같은 레벨에서 작동하며, chef server API에 접근하기 위한 설정들이 필요하다.
knife 설정파일 이름은 knife.rb 이다.
설정파일에 들어가는 매개 변수는 다음과 같다.
- node_name : chef-server 연결과 인증을 위한 client 이름
- client_key : 인증에 사용한 Private key 파일
- validation_client_name : chef-validator
- validation_client_key : validation Private key 파일
- chef_server_url : chef server의 url
- cache_type : 기본은 'BasicFile'이다.
- BaiscFile, Berkeley, Couch, DataMapper, LMC, Memcache, Memory, MonfoDB, Redis, Rufus, S3, SDBM, Tyrant, Xattr, YAML을 지원한다.
- cache_option : cache 옵션으로 cache_type에 따라서 달라진다.
client의 홈디렉토리에 .chef 디렉토리를 생성한다.
2. chef server에서 인증에 사용할 key 파일 복사
만약 workstation 서버와 chef-server를 다르게 사용할 경우에는 chef-server로부터 key 파일을 복사한다.
# scp root@IP:/etc/chef/validation.pem ~/.chef/
# scp root@IP:/etc/chef/webui.pem ~/.chef/
동일한 서버를 사용할 경우 바로 복사한다.
# cp /etc/chef/validation.pem /etc/chef/webui.pem ~/.chef/
2. knife 설정파일 생성
# knife configure -i
WARNING: No knife configuration file found
Where should I put the config file? [~/.chef/knife.rb]
Please enter the chef server URL: [http://localhost:4000] http://222.112.182.139:4000
Please enter a clientname for the new client: [root]
Please enter the existing admin clientname: [chef-webui]
Please enter the location of the existing admin client's private key: [/etc/chef/webui.pem] webui.pem
Please enter the validation clientname: [chef-validator]
Please enter the location of the validation key: [/etc/chef/validation.pem] validation.pem
Please enter the path to a chef repository (or leave blank):
Creating initial API user...
Created client[root]
Configuration file written to /root/.chef/knife.rb
'OSS(Open Source Software) > chef' 카테고리의 다른 글
cookbook 생성 (0) | 2014.04.10 |
---|---|
chef client 설치 (0) | 2014.04.10 |
chef workstation 설정 (0) | 2014.04.10 |
chef server 설치 (0) | 2014.04.07 |
Chef 구성도 (0) | 2014.04.07 |