Installing sphinx

free open-source SQL full-text search engine
วันนี้ได้รับบัญชามาจากสวรรค์ให้ผมลง Sphinx ที่ Server ก็เลยต้องหาข้อมูลแล้วก็ลองมั่วดูครับคงไม่น่ายาก Sphinx เอาไว้ทำอะไรนั้นลองค้นหาดูนะครับ อธิบายสั้นๆคือเอาไว้ทำ Search ให้มันค้นหาไวๆครับอยากให้คลิ้กค้นหาที่เว็บของเราแบบเร็วๆก็ใช้ sphinx นี่แหล่ะช่วยได้เยอะ เริ่มกันเลย
# sudo aptitude install libmysql++-dev libmysqlclient15-dev checkinstall # wget http://www.sphinxsearch.com/downloads/sphinx-0.9.8.1.tar.gz # tar xvzf sphinx-0.9.8.1.tar.gz # cd sphinx-0.9.8.1/ # ./configure # make # make install
Configure sphinx (replace nano with your editor of choice):
# cd /usr/local/etc # cp sphinx-min.conf.dist sphinx.conf # nano sphinx.conf
Install Sphinx Client (จากที่โหลดมาครั้งแรกใช้ได้มันคือไฟล์เดียวกัน ก็เข้าไปตามโฟลเดอร์ libsphinxclient)
# cd sphinx-0.9.8.1/api/libsphinxclient/ # ./buildconf.sh # ./configure && make install
After that PECL will do all the work for you:
# pecl install sphinx-beta
หลังจากนั้นก็เชตที่ php.ini เพิ่ม extension=sphinx.so เข้าไปแล้วก็ restart apache ก็เป็นอันใช้ได้ครับ อยากรู้ว่าได้ไหมได้นั้นดูที่ phpinfo จะขึ้นประมาณนี้ครับ
sphinx
sphinx support enabled
Version 1.0.0
Revision $Revision: 1.17 $
ผมไม่รู้ว่าลงอะไรบ้างผมมั่วๆตามขั้นตอนที่เขียนมานั่นแหล่ะครับ ค้นหาเจอหลายๆเว็บก็เอามาลองยำๆวิธีใส่กันดีมั่วไปมั่วมาก็จะได้อีกแหล่ะ อิอิขอให้โชคดีครับ



Posted in
Tags:
Thks for the info! Cheers