웹프로그래머의 홈페이지 정보 블로그 http://hompy.info
웹프로그래머의 홈페이지 정보 블로그 http://hompy.info
| [root@sphinx ~]# yum -y install mysql-devel [root@sphinx ~]# cd /usr/local/src [root@sphinx src]# wget http://www.sphinxsearch.com/downloads/sphinx-0.9.8.1.tar.gz [root@sphinx src]# tar xvzf sphinx-0.9.8.1.tar.gz [root@sphinx src]# cd sphinx-0.9.8.1 [root@sphinx sphinx-0.9.8.1]# ./configure [root@sphinx sphinx-0.9.8.1]# make [root@sphinx sphinx-0.9.8.1]# make install |
| [root@sphinx sphinx-0.9.8.1]# mysql -uroot -p Enter password: ******** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 116 Server version: 5.0.45 Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> grant all privileges on test.* to user@"localhost" identified by "password"; Query OK, 0 rows affected (0.05 sec) mysql> flush privileges; Query OK, 0 rows affected (0.01 sec) mysql> exit Bye [root@sphinx sphinx-0.9.8.1]# |
| [root@sphinx sphinx-0.9.8.1]# vi /usr/local/etc/sphinx-min.conf.dist [root@sphinx sphinx-0.9.8.1]# cp /usr/local/etc/sphinx-min.conf.dist /usr/local/etc/sphinx.conf [root@sphinx sphinx-0.9.8.1]# cat /usr/local/etc/sphinx.conf # # Minimal Sphinx configuration sample (clean, simple, functional) # source src1 { type = mysql sql_host = localhost sql_user = user sql_pass = password sql_db = test sql_port = 3306 # optional, default is 3306 sql_query = \ SELECT id, group_id, UNIX_TIMESTAMP(date_added) AS date_added, title, content \ FROM documents sql_attr_uint = group_id sql_attr_timestamp = date_added sql_query_info = SELECT * FROM documents WHERE id=$id } index test1 { source = src1 path = /var/data/test1 docinfo = extern charset_type = sbcs } indexer { mem_limit = 32M } searchd { port = 3312 log = /var/log/searchd.log query_log = /var/log/query.log read_timeout = 5 max_children = 30 pid_file = /var/log/searchd.pid max_matches = 1000 seamless_rotate = 1 preopen_indexes = 0 unlink_old = 1 } [root@sphinx sphinx-0.9.8.1]# |
| [root@sphinx sphinx-0.9.8.1]# mysql -uroot -p test < /usr/local/etc/example.sql Enter password: ******** [root@sphinx sphinx-0.9.8.1]# mkdir /var/data [root@sphinx sphinx-0.9.8.1]# indexer test1 [root@sphinx sphinx-0.9.8.1]# search number Sphinx 0.9.8.1-release (r1533) Copyright (c) 2001-2008, Andrew Aksyonoff using config file '/usr/local/etc/sphinx.conf'... index 'test1': query 'number ': returned 3 matches of 3 total in 0.000 sec displaying matches: 1. document=1, weight=1, group_id=1, date_added=Sat Dec 6 11:42:12 2008 id=1 group_id=1 group_id2=5 date_added=2008-12-06 11:42:12 title=test one content=this is my test document number one. also checking search within phrases. 2. document=2, weight=1, group_id=1, date_added=Sat Dec 6 11:42:12 2008 id=2 group_id=1 group_id2=6 date_added=2008-12-06 11:42:12 title=test two content=this is my test document number two 3. document=4, weight=1, group_id=2, date_added=Sat Dec 6 11:42:12 2008 id=4 group_id=2 group_id2=8 date_added=2008-12-06 11:42:12 title=doc number four content=this is to test groups words: 1. 'number': 3 documents, 3 hits [root@sphinx sphinx-0.9.8.1]# |
| [root@sphinx sphinx-0.9.8.1]# /usr/local/bin/searchd Sphinx 0.9.8.1-release (r1533) Copyright (c) 2001-2008, Andrew Aksyonoff using config file '/usr/local/etc/sphinx.conf'... creating server socket on 0.0.0.0:3312 [root@sphinx sphinx-0.9.8.1]# cd api [root@sphinx api]# php test.php number Query 'number ' retrieved 3 of 3 matches in 0.000 sec. Query stats: 'number' found 3 times in 3 documents Matches: 1. doc_id=4, weight=100, group_id=2, date_added=2008-12-06 11:42:12 2. doc_id=1, weight=1, group_id=1, date_added=2008-12-06 11:42:12 3. doc_id=2, weight=1, group_id=1, date_added=2008-12-06 11:42:12 [root@sphinx api]# |



프리윈드님 HTTrack 이 프로그램 저도 속도가 안나오는줄 알았는데요
설정만 바꿔주시면 몇메가바이트든 속도가 나오네요
BackStreet Browser 이거는 막히는 사이트도 있는데
HTTrack 요곤 막히는 사이트도 없고 네이버 카페도 되고
속도도 빠르니 아주 유용하네요 ㅇ_ㅇ 참고하시라고 적어드렸습니다 ㅎㅎ
대신 B/s 로 되어있으니까... kb/s 로 따지자면
1000 을 적으시면 1kb 일거구요 1000000 을 적으시면 1mb/s 일겁니다
대충 50000000 정도 적어주시면 최고속도 나오네요 ^^
댓글을 달아 주세요