'2016/12/22'에 해당되는 글 3건

  1. 2016.12.22 sudo에 따른 Permission denied 에러
  2. 2016.12.22 telnet 대신 nc 커맨드
  3. 2016.12.22 쉘에서 proxy 설정 모음


아래 예시와 같이 sudo 와 > redirection을 사용할 때 permission 에러가 발생할 수 있다.


$ sudo telegraf -sample-config -input-filter cpu:kernel -output-filter influxdb > telegraf.conf

Permission denied



스크립트를 만들어서 실행하던지, 아니면 sudo로 감싼다. 


sudo sh -c 'telegraf -sample-config -input-filter cpu:kernel -output-filter influxdb > telegraf.conf'




Posted by '김용환'
,



최근에는 telnet 클라이언트를 잘 안쓰는 경향(기본 설치를 안 해줌)이 있다. 

이럴 때는 sudo yum install telnet으로 해서 telnet을 설치할 수도 있지만,...


nc 커맨드(기본 설치)를 활용하는 것도 좋을 것 같다. 


$ nc -z localhost 8086

Connection to localhost 8086 port [tcp/*] succeeded!

Posted by '김용환'
,


회사에서는 외부 리소스를 접근할 때는 보안(IP를 숨길 의도, 로깅의도) 상 proxy를 두기도 한다. 


export ftp_proxy=

export https_proxy=

export http_proxy=


주의할 점은 localhost를 쓰려고 할 때에도 proxy를 쓰려고 할 경우가 있으니. 이때는 안쓰는 방향으로 수정할 필요가 있다. 아래와 같이 사용한다. 


export no_proxy=localhost,127.0.0.1



https://wiki.archlinux.org/index.php/proxy_settings

Posted by '김용환'
,