It looks like you're new here. If you want to get involved, click one of these buttons!
After it took me weeks, if not months, to figure out how to do it correctly here is a guide (well, script) to do it. (DEBIAN 6 ONLY - DO NOT SIMPLY RUN THIS - READ AND EDIT)
groupadd mysql useradd -r -g mysql mysql echo "deb http://packages.dotdeb.org stable all" >> /etc/apt/sources.list echo "deb-src http://packages.dotdeb.org stable all" >> /etc/apt/sources.list wget http://www.dotdeb.org/dotdeb.gpg && cat dotdeb.gpg | apt-key add - && rm dotdeb.gpg apt-get update apt-get install libncurses5-dev unzip screen -y apt-get build-dep mysql-server-5.5 -y apt-get source mysql-server-5.5 -y wget http://sphinxsearch.com/files/sphinx-2.0.4-release.tar.gz wget "http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.23.tar.gz/from/http://mirror.leaseweb.com/mysql/" -O mysql-5.5.23.tar.gz tar -xvzf mysql-5.5.23.tar.gz tar -xvzf sphinx-2.0.4-release.tar.gz rm *.tar.gz rm mysql-5.5_5.5.23-1~dotdeb.0.dsc mv mysql-5.5.23 mysql-5.5.23-ORG cp -a mysql-5.5.23-ORG/Docs mysql-5.5-5.5.23/ cp -R /root/sphinx-2.0.4-release/mysqlse /root/mysql-5.5-5.5.23/storage/sphinx cd mysql-5.5-5.5.23/ sh BUILD/autorun.sh ./configure --build=x86_64-linux-gnu --host=x86_64-linux-gnu --prefix=/usr --exec-prefix=/usr --libexecdir=/usr/sbin --datadir=/usr/share --localstatedir=/var/lib/mysql --includedir=/usr/include --infodir=/usr/share/info --mandir=/usr/share/man --with-server-suffix="williams-finest-blent" --with-comment="(Debian6)" --with-system-type="debian-linux-gnu" --enable-shared --enable-thread-safe-client --enable-assembler --enable-local-infile --with-pstack --with-fast-mutexes --with-big-tables --with-unix-socket-path=/var/run/mysqld/mysqld.sock --with-mysqld-user=mysql --with-libwrap --without-readline --with-ssl --without-docs --with-extra-charsets=all --without-ndbcluster --with-embedded-server --with-embedded-privilege-control make make install make install scripts mkdir /etc/mysql cd /etc/mysql/ ######add my.cnf download/creation here###### cd ######download mysql dumps and sphinx config here if available###### cd sphinx-2.0.4-release/ apt-get install libmysqlclient-dev -y ./configure make make install cd /usr/local/etc/ cp /root/sphinx.conf sphinx.conf mkdir /var/data/ mkdir /var/data/sphinx/ mkdir /var/lib/mysql/ mkdir /var/run/mysqld/ chown -R mysql:mysql /var/run/mysqld/ mkdir /usr/share/mysql/ cd /usr/share/mysql/ wget http://fr.edis.at:8080/william/mysqldocs.zip unzip mysqldocs.zip && rm mysqldocs.zip chown -R mysql:mysql /var/lib/mysql/ cd /usr/ /usr/scripts/mysql_install_db /usr/bin/mysqld_safe --skip-grant-tables & mysql -uroot -hIP mysql #update user set Password=PASSWORD('NEWPASS') WHERE User='root'; #flush privileges; for pid in $(ps aux | grep mysql | grep -v grep | awk '{print $2}'); do kill -9 $pid; done screen -S mysqld mysqld #CTRL+AD mysql -uroot -pNEWPASS mysql #CREATE USER 'USER'@'%' IDENTIFIED BY 'NEWPASS'; #CREATE USER 'USER'@'mysql' IDENTIFIED BY 'NEWPASS'; #CREATE USER 'USER'@'127.0.0.1' IDENTIFIED BY 'NEWPASS'; #CREATE USER 'USER'@'localhost' IDENTIFIED BY 'NEWPASS'; #create database predb; #GRANT ALL PRIVILEGES ON *.* TO 'USER'@'%'; #GRANT ALL PRIVILEGES ON *.* TO 'USER'@'mysql'; #GRANT ALL PRIVILEGES ON *.* TO 'USER'@'127.0.0.1'; #GRANT ALL PRIVILEGES ON *.* TO 'USER'@'localhost'; #INSTALL PLUGIN sphinx SONAME 'ha_sphinx.so'; #flush privileges; cd /etc/init.d/ wget -O mysql-sphinx http://fr.edis.at:8080/william/mysqlinit wget -O searchd http://fr.edis.at:8080/william/searchdinit chmod +x mysql-sphinx chmod +x searchd mkdir /var/log/mysql mkdir /var/log/sphinx cd /root #IMPORT DB indexer --all --rotate searchd /usr/local/bin/indexer --rotate delta
Comments
Smart Cookie
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanks....?
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksLike a SmartBomb, but tastes better?
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanks@William
Sorry, I am noob, but what is the purpose of Sphinx? I've read the homepage/about page, but what can I do exactly with this software? :P
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksIt's a really good search engine/server. I used to use it on a large IPB forum, it cuts load down a LOT and returns queries extremely fast.
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanks^This. Quick full-text searches! And it's useful when doing partial keyword matching, as it returns a sorted array with a 'likeness' score.
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksSo, there is a way to integrate it with the forum... interesting.
This may help me for something... hmmm
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksAll popular forum implementations either support it natively, or have plugins for doing the same.
Fact is, anywhere you have a large search load (that deals with mysql), you should be using sphinx.
Thanks William for the guide, I'm sure it'll be useful for lots :)
Freelance Linux/Unix consultant, contact me if you need help!
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksTy n_n I am a SMF user, and it seems there is a mod around for this. Maybe I will try it :P
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksAs note: The initscripts are by me and (c) William under GPL (since i'm required by law to use some license here)
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksI'm curious: If you don't, won't it default to a regular all-rights-reserved kind of thing?
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksWell, it should, but better be on the safe side :)
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanksor google which supports operators, saves server load, has networks around the world, and even supports cached pages when you site is down.
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksGoogle is not usable when you need mysql or similar.
Also:
Free quota
Usage is free for all users, up to 100 queries per day.
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanks"create database predb;"
lol :)
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanksgreat guide,any site for this like gide shareing?
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksEh, lets pretend no one has seen it :p
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksI don't know, but someone should really buy lowendscript.com and put some kinda wiki up.
- Spam
- Abuse
- Troll
0 • Disagree Agree Thankslowendscript.com is gone
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanks