2007년 9월 5일 수요일

lucene

http://lucene.apache.org/java/docs/demo2.html

설치 방법은

0) 우선 JDK 1.4 version 이상, Ant 1.6.2 version이상 설치한다
1) http://www.apache.org/dyn/closer.cgi/lucene/java/ zip, tar.gz 둘중 한개 파일을 받는다.
2) build.xml 파일 설정을 한다.
3) shell 상에서 'ant' 명령 실행(rebuild시에는 ant javacc)
4) CLASSPATH에 lucene-core-*.jar과 lucene-demos-*.jar를 등록한다.

이 부분에 대해서는 압축해제한 디렉토리에서 BUILD.txt 파일에 보면 자세히 설명이 되어있다.

테스트로 홈디렉토리에 있는 계정하나를 테스트 해봤는데 잘나오더라.

관련 : url

Lucene Home http://jakarta.apache.org/lucene/
Lucene FAQ http://lucene.sourceforge.net/cgi-bin/faq/faqmanager.cgi
Lucene Getting Started http://jakarta.apache.org/lucene/docs/gettingstarted.html
고수로 가는 지름길 Jakarta Project 가메출판사 최범균 저
QueryParser Rules http://today.java.net/pub/a/today/2003/11/07/QueryParserRules.html Give your Web site its own search engine using Lucene http://builder.com.com/5100-6389-5054799.html
Lucene Intro http://today.java.net/pub/a/today/2003/07/30/LuceneIntro.html
Parsing, indexing, and searching XML with Digester and Lucene http://www-106.ibm.com/developerworks/library/j-lucene/
Advanced Text Indexing with Lucene http://www.onjava.com/pub/a/onjava/2003/03/05/lucene.html
Introduction to Text Indexing with Apache Jakarta Lucene http://www.onjava.com/pub/a/onjava/2003/01/15/lucene.html
The Lucene search engine Powerful flexible and free http://www.javaworld.com/javaworld/jw-09-2000/jw-0915-lucene.html

2007년 9월 2일 일요일

ubuntu java eclipse

자바는 sun-java6-* 관련한 패키지를 설치하면 된다. 현재 사용되고 있는 자바를 보려면
update-java-alternatives -l

로 확인한다.
sudo update-alternatives -s java-6-sun

명령어를 내린다.
sudo update-alternatives --config java
sudo update-alternatives --config jar

명령으로 기본적인 설정을할 수 있다.

eclipse, eclipse-jdt를 설치하고 /etc/eclipse/java_home 파일에 /usr/lib/jvm/java-6-sun을 추가하고 사용하면 된다. ;-)

2007년 7월 3일 화요일

oracle

oracle 10g pro*c, proc*c++ 관련 자료

참조 url : http://docs.huihoo.com/oracle/docs/B19306_01/appdev.102/b14407/toc.htm

2007년 7월 1일 일요일

pyserial

python으로 시리얼 프로그램을 할려고 한다.
검색을 해보니 pyserial을 설치하면 쉽게(?) 프로그램이 가능한거 같다.
우선 pyserial을 설치한 후
>>> import serial
ImportError: No module named win32file

이런 에러가 나온다.(한번에 되는게 없네.)
검색을 해보니 Python Extensions for Windows 인가 관련된게 설치가 안되서 그런거 같다.

http://starship.python.net/crew/mhammond/win32/Downloads.html 검색을 해보니 이 페이지에서 python win32api관련된걸 다운받아 설치를 할 수있다.

설치를 하고 나니 에러 없이 잘된다.

관련 url :
http://pyserial.sourceforge.net/ 현재 이페이지에 있는 example 페이지가 열리지 않는다. :-(

2007년 6월 20일 수요일

apache ssl 관련

ssl은 신용카드 정보, 의료 기록, 법률 문서와 전자 상거래 애플리케이션과 같은 가장 기밀을 다루는 트랜잭션(transaction)들의 전송에 이용되는 것을 허용할 수 있도록 하는 요건을 실현하기 위한 것이다. 라고 http://kldp.org/HOWTO/html/SSL-RedHat-HOWTO/ssl-redhat-howto-2.html 여기에 나온다.
우선 비밀키를 사용하려면 openssl를 설치해야한다.
간단한 명령
# openssl genrsa -des3 -out server.key 1024
# openssl rsa -in server.key -out server.key.insecure
# openssl req -new -key server.key -out server.csr
# openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

생성된 파일들을 apache ssl관련 디렉토리에 이동 시킨다.
apache config 파일을 설정해야 하는데 ssl 443번을 이용하기에 가상호스트로 설정을 한다.
가상 호스트 설정에서
SSLEngine ON
SSLCertificateFile   crt 파일 절대 경로명
SSLCertificateKeyFile    key파일 절대 경로명

이 상위에 나오고 그 다음에 필요한 사항들을 설정해주면 된다.
특정 디렉토리만 ssl을 사용하게 되면 편하게 사용할 수 있을 것이다.
(Directory "~/~/~/ssl")
SSLRequireSSL
(/Directory)
(Directory "~/~/~/cgi-bin)
SSLOptions +StdEnvVars
(/Directory)

StdEnvVars에 대해서는 When this option is enabled, the standard set of SSL related CGI/SSI environment variables are created. This per default is disabled for performance reasons, because the information extraction step is a rather expensive operation. So one usually enables this option for CGI and SSI requests only. 이렇다는데...

마무리로 인증서를 설정하고 나서 apache를 실행이나 재시작 하는경우 ssl관련 패스워드를 물어본다. 이 부분을 없앨려면 openssl rsa -in filename.key-out new_filename.key으로 key파일을 변경해서 사용하면 된다.

관련 url :
http://kldp.org/HOWTO/html/SSL-RedHat-HOWTO/ssl-redhat-howto-2.html