[카테고리:] Linux

Cryptocat custom server 설치 방법

Cryptocat custom server 설정법을 작성 합니다. 설치환경은 Ubuntu 14.04 LTS 입니다. 우선 필요한 패키지를 설치합니다. apt-get install ejabberd nginx git 설치가 끝나면 아래 명령어로 ejabberd 설정파일을 수정합니다. vi /etc/ejabberd/ejabberd.cfg 설정파일 내용을 아래와 같이 바꾸도록 합니다. %% Hostname {hosts, ["jjoon.net"]}. %% Logging {loglevel, 0}. %%% =============== %%% LISTENING PORTS {listen, [ {5222, ejabberd_c2s, [ {access, c2s}, …

Ubuntu용 SVN 클라이언트 설치

윈도에서 자주 사용하던 TortoiseSVN과 유사한 클라이언트를 찾다 발견한 RabbitVCS 설치법을 작성합니다. sudo add-apt-repository ppa:rabbitvcs/ppa sudo apt-get update sudo apt-get install rabbitvcs-nautilus3 UI는 아래 이미지를 참고하세요. 출처 : http://aruizca.com/how-to-integrate-rabbitvcs-with-nautilus-file-manager-in-ubuntu-14-04-trusty-tahr/

Ubuntu 13.10 한영키 설정

System Settings – Language Support로 이동하여 한글 언어를 추가해준다. 재부팅을 한다. 터미널에서 ibus-setup 을 실행후 ‘Input Method’ 탭에서 한글 입력기를 추가 한다. 터미널에서 xev 실행후 한영키를 입력하여 keycode 값을 확인한다. 터미널을 연다음 사용자 계정폴더에 .Xmodmap 파일을 만들어 아래 내용을 작성한다. keycode 확인값 = Hangul remove mod1 = Alt_R 끝으로 다시 터미널에서 ibus-setup 실행후 키보드 변경키를 …

CentOS에서 EPEL 추가하기

EPEL은 Extra Packages for Enterprise Linux 의 약자다. CentOS 에서 yum을 통해 좀 더 많은 패키지를 설치하고자 한다면 repo 리스트에 추가하면 된다. EPEL과 관련된 자세한 내용은 아래 주소에서 참고하면 된다. http://fedoraproject.org/wiki/EPEL 먼저 현재 설치된 repo 리스트를 확인해 보도록 하자. [root@localhost byjjoon]# yum repolist Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.tt.co.kr …

CentOS 설치 후 ‘setup’ 명령어를 이용해 설정하기

CentOS 설치 후 ‘setup’ 명령어를 통해 설정을 하고자 하는 경우 아래 패키지를 설치하면 된다. [root@localhost byjjoon]# yum provides /usr/bin/setup Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: data.nicehosting.co.kr * extras: data.nicehosting.co.kr * updates: data.nicehosting.co.kr setuptool-1.19.9-3.el6.i686 : A text mode system configuration tool Repo : base Matched from: Filename : /usr/bin/setup setuptool-1.19.9-3.el6.i686 : …

xargs 명령어 사용법

기본 사용법 [root@localhost bugbear]# find /home/* -type d | xargs echo /home/assassin /home/bugbear /home/cobolt /home/darkelf /home/darkknight /home/death_knight /home/gate /home/gate/shellcode /home/gate/rooting /home/giant /home/goblin /home/golem /home/gremlin /home/lost+found /home/nightmare /home/orc /home/orge /home/skeleton /home/succubus /home/troll /home/vampire /home/wolfman /home/xavius /home/zombie_assassin -i 옵션을 통한 인자 변경 [root@localhost bugbear]# find /home/* -type d | xargs -i echo {}/ /home/assassin/ /home/bugbear/ /home/cobolt/ /home/darkelf/ …

파일에서 특정 내용 삭제하기

[파일내의 특정 문자열 찾기] find ./ | xargs grep "찾을문자열" –color=auto grep -r "찾을 문자열" –color=auto * [파일내의 특정 문자열을 찾아 해당 내용을 삭제하기] find ./ -name "*.php" -exec sed -i 's/old/new/g' {} \; find ./ -name "*.php" -exec perl -pi -e 's/old/new/g' {} \; find ./ -name "*.php" -exec sed -i 's/<iframe src="http:\/\/h.nexprice.com\/css\/x.htm" width=0 …

SELinux와 Apache

최근에 웹에서 PHP를 이용하여 Python 스크립트를 실행할 일이 있어 구성 후 실행을 하였으나 정상적으로 실행이 안되어 문제를 확인하다 보니 SELinux 문제로 확인되었다. 문제 확인 방법은 ‘audit2allow -a’ 명령어를 통해 SELinux 관련 로그를 파싱에서 볼 수 있다. [root@localhost Honeypot]# audit2allow -a #============= httpd_sys_script_t ============== #!!!! This avc can be allowed using one of the these booleans: …

백그라운드로 프로세스 실행 하기

리눅스에서 백그라운드로 실행을 하려면 명령어의 맨뒤에 & 를 붙이면 된다. 다만 쉘이 종료되면 백그라운드로 실행했던 프로세스도 같이 종료되게 된다. 따라서 쉘이 종료 되었을때도 계속해서 실행이 되게 하려면 아래와 같이 할 수 있다. nohup 명령어 & 이렇게 했을때 표준 출력값은 nohup.out 파일에 저장된다.

SSH 접속 Port 변경 (SELinux 설정 방법)

Fedora 9에서 SSH 접속 Port 변경 시 데몬이 제대로 안뜨는 경우가 있다. selinux 때문인데 다음과 같이 수정하도록 한다. semange port -t ssh_port_t -p tcp 1234 만약 semange 명령어가 없다면 아래와 같이 찾아보면 된다. [root@localhost byjjoon]# yum whatprovides /usr/sbin/semanage Loaded plugins: fastestmirror Determining fastest mirrors * base: mirror.khlug.org * extras: mirror.khlug.org * updates: mirror.khlug.org base | …