| 여러장의 이미지 간단히 합치기 | 움직이는GIF만들기
BLOG main image
분류 전체보기 (43)
I am (0)
Today (1)
개발자이야기 (9)
나만의 유용한정보 (1)
서버관련 (15)
지름신 (2)
사진/여행 (1)
끄적끄적 (3)
골프 (8)
주식 (2)

ssh 접속시 rsa 인증을 통해서..
컴ⓣing의 주절거림 in textcube
«   2010/07   »
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
93,752 Visitors up to today!
Today 66 hit, Yesterday 78 hit
daisy rss
tistory 티스토리 가입하기!
'FreeBSD'에 해당되는 글 8건
2009/07/17 09:52


FreeBSD에서 포트로 리눅스 에뮬레이터 설치시

compat.linux.osrelease: 2.4.2 is not supported, please use 2.6.16


와 같은 에러가 난다면,

sysctl compat.linux.osrelease=2.6.16


를 한번 해주고, 설치를 재시도하면 된다.

Trackback Address :: http://blog.bbom.org/trackback/34 관련글 쓰기
Name
Password
Homepage
Secret


2008/03/17 11:58

사내직원이 100명이 넘어가면서 imap(메일관련데몬)의 접속이 많아져서
가끔 아래와 같이 /var/log/messages 에 에러를 내뱉는다.

inetd[624]: imap from 203.x.x.x exceeded counts/min (limit 60/min)


우선 inetd의 데몬옵션을 확인
ps aux | grep inetd

root        624  0.0  0.0  1388   980  ??  Ss   20 208    0:28.94 /usr/sbin/inetd -wW -C 60


기본값으로 데몬이 떠 있는것...

-C 옵션은 max-connections-per-ip-per-minute 로 동일IP에 대해서 동일포트의 1분간 설정회수란다..
좀더 높여보자(imapd를 사용하는 웹메일에 문제가 있나?)

이왕 -R 값도 좀 높여보자..

일단 기존 inetd를 죽이고..
kill -9 624
재가동한다.

/usr/sbin/inetd -wW -C 256 -R 2048

그리고,
/etc/rc.conf 에 inetd_flag추가해주는 센쓰~

inetd_flag="-wW -C 256 -R 2048"

Trackback Address :: http://blog.bbom.org/trackback/18 관련글 쓰기
jojk | 2008/10/08 14:56 | PERMALINK | EDIT/DEL | REPLY
-C 는 default가 unlimit
-R 은 0가 unlimit
네요~ ^^;
Name
Password
Homepage
Secret


2008/03/04 21:04
FreeBSD 에서 Apache2 + PHP 5.x 를 설치하는 방법

kldload accf_http
를 띄운다.

vi /boot/loader.conf 에
accf_http_load="YES"
추가하고 리부팅 한번 때려주거나,

커널옵션에
options ACCEPT_FILTER_HTTP
를 추가하고 커널컴팔 후 리부팅한다.

최신 아파치(현재는 2.2.8) 을 가져와서 소스를 푼다.

./configure --prefix=/usr/local/apache2 --enable-module=most --enable-shared=max --enable-rewrite --enable-headers --enable-rewrite --enable-deflate --enable-so --with-included-apr

PHP를 동적으로 컴파일해야 하기때문에  --enable-so는 반드시 있어야한다.
그외 옵션추가는 ./configure --help  로 참조한다.
설치디렉토리는 --prefix 의 경로로  변경이 가능하다.

make; make install

위의 과정으로 아파치 컴파일은 완료!

FreeBSD 6.x 의 경우 기본적으로 perl이 설치안되어 있으므로 perl을 설치하는것이 좋겠다.

cd /usr/port/lang/perl5.8
make install

최신의 PHP 소스롤 가져다가 푼다.

./configure  --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/apache2/conf --with-mysql=/usr/local/mysql --with-zlib-dir=/usr/local/zlib --enable-ftp --enable-sockets --enable-mbstring --disable-debug --with-config-file-path=/usr/local/lib --with-iconv

아파치 설치된 경로로 apxs 를 지정한다.
그외 gd를 설치하거나 기타 옵션을 주려면, 마찬가지로 ./configure --help를 참고한다.

make; make install

인스톨후
# php -v
PHP 5.2.5 (cli) (built: Nov  5 2007 16:11:19)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
와 같이 버젼이 제대로 나오는지 확인한다.

아파치 설치 디렉토리에서
vi /usr/local/apache2/conf/httpd.conf
후에 아래를 추가한다.
LoadModule php5_module        modules/libphp5.so
AddType application/x-httpd-php .php

그외 아파치 설정파일은 아파치 문서를 참고한다.
.php 외의 확장자나 다른확장자로 php 스크립트를 만드려면 뒤에 추가해도 된다.
ex) AddType application/x-httpd-php .php .html .phps

/usr/local/apache2/bin/apachectl start

아파치를 구동한다.
Trackback Address :: http://blog.bbom.org/trackback/17 관련글 쓰기
응삼 | 2008/05/24 11:11 | PERMALINK | EDIT/DEL | REPLY
이미지 합치는 프로그램 정말 잘 쓰고 있습니다.
감사합니다 ^^
| 2008/09/21 11:09 | PERMALINK | EDIT/DEL | REPLY
비밀댓글 입니다
Name
Password
Homepage
Secret


2008/03/03 15:37

늘상있는대로 컴파일을 시도했다.


1.3.0 에서는 나오지 않는 에러가 나오는군... 뭔가 호환이 안되나...


gcc -DHAVE_CONFIG_H  -DFREEBSD6_2 -DFREEBSD6 -I.. -I../include -I/usr/local/mysql/include/mysql -O2 -Wall -c mod_sql_mysql.c
mod_sql_mysql.c: In function `cmd_defineconnection':
mod_sql_mysql.c:598: error: missing terminating " character
*** Error code 1

Stop in /usr/local/proftpd-1.3.1rc3/modules.
*** Error code 1

Stop in /usr/local/proftpd-1.3.1rc3.



따옴표문제가 설마...
일단 에러소스를 찾아보자.


vi ./contrib/mod_sql_mysql.c


598번째 라인이라... 헉!


     pr_log_pri(PR_LOG_WARNING, "warning: the mod_sql_mysql module has not been
      "properly intialized.  Please make sure your --with-modules configure "
      "option lists mod_sql *before* mod_sql_mysql, and recompile.");

    sql_log(DEBUG_FUNC, "%s", "The mod_sql_mysql module has not been properly "
      "intialized.  Please make sure your --with-modules configure option "
      "lists mod_sql *before* mod_sql_mysql, and recompile.");


뭐야.. 뭔가 이상하다... text를 그냥 엔터를 쳤네? 따옴표는 뭐양?


     pr_log_pri(PR_LOG_WARNING, "warning: the mod_sql_mysql module has not been \
      properly intialized.  Please make sure your --with-modules configure \
      option lists mod_sql *before* mod_sql_mysql, and recompile.");

    sql_log(DEBUG_FUNC, "%s", "The mod_sql_mysql module has not been properly \
      intialized.  Please make sure your --with-modules configure option \
      lists mod_sql *before* mod_sql_mysql, and recompile.");


위와 같이 고치고 컴파일을 해봤따아..

잘된다.. -.-;;

Trackback Address :: http://blog.bbom.org/trackback/16 관련글 쓰기
Name
Password
Homepage
Secret


2008/02/21 15:29

요즘 300만원을 주지 않으면 쇼핑몰을 다운시키겠다는 협박이 많이 있어난다.
수십대의 좀비PC를 컨트롤 할 수 있으면 가능한이고, 추적하기 힘들기때문에 오버추어의 상위
광고업체(돈좀있으니 광고를 한다는 생각?)에 협박을 많이 하는것 같다.

FreeBSD에서 DDOS공격의 하나인 ICMP flood attack 이 일어나게 되면,

Limiting icmp unreach response from 31377 to 200 packets/sec
Limiting icmp unreach response from 30094 to 200 packets/sec
Limiting icmp unreach response from 30958 to 200 packets/sec
Limiting icmp unreach response from 30992 to 200 packets/sec
Limiting icmp unreach response from 31039 to 200 packets/sec

위와 같은 메시지를 자주보게 된다. 주로 포트스캐닝할때 나타난다.
이러한 공격은 해당 서버의 네트워크의 자원을 고갈시키면서 정상적인 서비스를 불가능하게 만든다.
MRTG트래픽을 보니깐.. 200M 이상의 DDOS공격을 해오는듯..

사용자 삽입 이미지

위의 파란색그래프(트래픽유입,업로드)가 튄것을 볼 수 있다.

일단 FreeBSD에서

sysctl -w net.inet.udp.blackhole=1
sysctl -w net.inet.tcp.blackhole=2

위와 같이 설정하면,  어느정도 해결할 수 있다.

IP로그를 보려면,

sysctl -w net.inet.tcp.log_in_vain=1

을 설정하면 아래와 같이 나타난다.

Connection attempt to TCP 203.x.x.59:139 from 203.238.53.121:1762 flags:0x02
Connection attempt to TCP 203.x.x.59:139 from 203.238.53.121:1762 flags:0x02
Connection attempt to TCP 203.x.x.59:135 from 203.238.187.188:2610 flags:0x02
Connection attempt to TCP 203.x.x.59:139 from 203.238.51.239:4365 flags:0x02
Connection attempt to TCP 203.x.x.59:139 from 203.238.51.239:4365 flags:0x02
Connection attempt to TCP 203.x.x.59:139 from 203.238.51.239:2254 flags:0x02
Connection attempt to TCP 203.x.x.59:139 from 203.238.51.239:2254 flags:0x02
Connection attempt to TCP 203.x.x.59:135 from 203.238.187.188:2869 flags:0x02
Trackback Address :: http://blog.bbom.org/trackback/14 관련글 쓰기
| 2008/10/13 17:55 | PERMALINK | EDIT/DEL | REPLY
비밀댓글 입니다
Name
Password
Homepage
Secret


2008/02/20 21:03
사용자 삽입 이미지

위의 그래프는 웹서버 한대가 내는 mrtg그래프! 웹서버 한대가 200M 정도의 트래픽은 그냥 버텨준다.
서버환경은 FreeBSD 6.2, Xeon 2.13, 2G RAM, SAS Disk RAID1

평균로드는 0.2 대... 아직 널널하군요..
서비스가 저장된 파일시스템은 NFS로 연결된것이니 더욱 놀라울따름!

www.lighttpd.net 
Trackback Address :: http://blog.bbom.org/trackback/12 관련글 쓰기
Name
Password
Homepage
Secret


2008/02/18 12:08
사용자 삽입 이미지

IDC의 전원사고만 아니여도 1500일은 거뜬이 넘었을텐데..
서버의 노후화로 제온쿼드코어의 최신장비 교체로 안타깝지만.... shutdown을 하게 되었다..ㅎㅎ

서버가 400여대가 되는관계로 더 오래 가동된 서버도 있겠지만,
메인서버로서 많은 일을 해준 서버가 마냥 고맙기만 하다..
그동안 수고했다.. 땡큐~~!!

서버환경 : FreeBSD 4.9, Xeon 2.8 , 3G RAM, 73G SCSI RAID1
Trackback Address :: http://blog.bbom.org/trackback/10 관련글 쓰기
Name
Password
Homepage
Secret


2008/01/28 20:48

오디오(mp3)관련 포트 lame를 설치

/usr/ports/audio/lame]$ make install USE_NONDEFAULT_X11BASE=1

ffmpeg포트 설치

/usr/ports/multimedia/ffmpeg]$ make install USE_NONDEFAULT_X11BASE=1 WITH_LAME=1 FORCE_PKG_REGISTER=1

설치가 끝..

ffmpeg -i test.avi -r 32 -b 256 test.flv

flvtool2 -U test.flv

Trackback Address :: http://blog.bbom.org/trackback/3 관련글 쓰기
Name
Password
Homepage
Secret


prev"" #1 next