프로그래밍2014. 9. 6. 14:40

sys-filesystem을 설치하는데 에러가 났다.

$> gem install sys-filesystem

Building native extensions.  This could take a while...

ERROR:  Error installing sys-filesystem:

ERROR: Failed to build gem native extension.


        /usr/bin/ruby1.9.1 extconf.rb

/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)

from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'

from extconf.rb:4:in `<main>'


이건 다음과 같이 해결하면 된다.

$> sudo apt-get install ruby1.9.1-dev


이후 다시 gem install sys-filesystem을 하면 잘 된다.

Posted by code cat
리눅스2014. 9. 4. 09:26

환경변수를 설정할 때, 홈 디렉터리에 있는 .pam_environment에 추가해 주면 된다.

형식은 다음과 같다. 


VARIABLE [DEFAULT=[value]] [OVERRIDE=[value]]

 

디폴트로 들어 있는 환경변수는 다음과 같다.

  LANGUAGE=ko:en

  LANG=ko_KR.UTF-8

  LC_NUMERIC=ko_KR.UTF-8

  LC_TIME=ko_KR.UTF-8

  LC_MONETARY=ko_KR.UTF-8

  LC_PAPER=ko_KR.UTF-8

  LC_NAME=ko_KR.UTF-8

  LC_ADDRESS=ko_KR.UTF-8

  LC_TELEPHONE=ko_KR.UTF-8

  LC_MEASUREMENT=ko_KR.UTF-8

  LC_IDENTIFICATION=ko_KR.UTF-8

  PAPERSIZE=a4



여기다 필요한 변수들(예: CATALINA_HOME, JAVA_HOME 등..)을 추가해 주면 된다.

Posted by code cat
리눅스2014. 9. 2. 16:20


리눅스에서 wireshark를 실행하여 캡쳐하려 하면 다음과 같은 에러를 볼 수 있다.

"there are no interfaces on which a capture can be done"

그럴 땐, 터미널을 띄워서 다음과 같이 입력해 주자.

setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/sbin/dumpcap"

이제 wireshark를 끄고 다시 실행해 보면 캡쳐 할 때 위와 같은 메세지가 안 뜰 것이다.

'리눅스' 카테고리의 다른 글

upstart 설치하기  (0) 2014.09.15
.pam_environment  (0) 2014.09.04
samba 포트 포워딩  (0) 2014.08.26
파일 캐릭터 인코딩 바꾸기  (0) 2014.08.02
GMainLoop 동작방식  (0) 2014.07.14
Posted by code cat

.vim/plugin  에 우선 cscope_maps.vim & cscope_quickfix.vim 을 추가하자.

(http://www.vim.org/scripts/script.php?script_id=862)


그리고 .vimrc  에 다음과 같이 추가하자.


:help cscope 을쳐 서 커맨 드사용법을 숙지하거나,  찾고자 하 는 symbol 위에서 Ctrl+\ + querytype 을 쓰면 된다. 

Posted by code cat

출처: http://algo79.tistory.com/279

samba log를 하도록 이미 설정은 했지만, default로 해놓으니, 도대체 뭐가 어디서 어떻게 기록되는지 알 수가 없었다.
그래서 좀 세팅을 해야 겠다 싶어서 찾아본 결과, 위의 출처에서 아래와 같이 log 설정을 할 수 있다.
(vfs 에 대한 세부적인 설정은 http://www.samba.org/samba/docs/man/manpages-3/vfs_full_audit.8.html 를 참조하자.)



/etc/samba/smb.conf


        #log
        vfs objects = full_audit
        full_audit:prefix = %u|%m
        full_audit:success = read pread write pwrite chmod rmdir unlink mkdir rename
        full_audit:failure = none
        full_audit:facility = local7
        full_audit:priority = ALERT


마찬가지로 syslog도 바꿔줘야 하는데, (리눅스 배포판에서는 rsyslog.conf를 참조하자)



/etc/rsyslog.conf

local7.*                        /var/log/samba/log.audit


이렇게 설정을 한 뒤,

service smbd restart
service rsyslog restart

로 samba와 syslog 를 재시작 해주면, samba를 통한 파일 operation(위의 경우, 
read pread write pwrite chmod rmdir unlink mkdir rename)에 대해서 로깅이 된다.


Posted by code cat