# Install dependencies (bison, patch, automake, libtool), etc:
portsnap fetch update
cd /usr/ports/devel/bison && make install clean distclean
cd /usr/ports/devel/patch && make install clean distclean
cd /usr/ports/devel/automake110 && make install clean distclean
cd /usr/ports/devel/libtool22 && make install clean distclean
cd /usr/ports/ftp/wget && make install clean distclean
# Get sources:
mkdir -p /mysql_new/src && cd /mysql_new/src
wget "http://sphinxsearch.com/downloads/sphinx-0.9.9.tar.gz"
wget "http://downloads.mysql.com/archives/mysql-5.0/mysql-5.0.91.tar.gz"
# Extract sorces:
tar zxpf sphinx-0.9.9.tar.gz
tar zxpf mysql-5.0.91.tar.gz
# Patching MySQL sources:
cd mysql-5.0.91 && patch -p1 < ../sphinx-0.9.9/mysqlse/sphinx.5.0.37.diff
/bin/sh BUILD/autorun.sh
# Copy Sphinx sources to MySQL sources:
mkdir sql/sphinx && cp ../sphinx-0.9.9/mysqlse/* sql/sphinx
# Configure and make MySQL:
# Add this variables to make.conf
# and DONT FORGET REMOVE its from make.conf!
cat /etc/make.conf
CC='cc'
CFLAGS=' -DDBUG_OFF -O2 -pipe -fno-strict-aliasing '
CXX='c++'
CXXFLAGS=' -DDBUG_OFF -O2 -pipe -fno-strict-aliasing -O2 -pipe -fno-strict-aliasing -felide-constructors -fno-rtti -fno-exceptions -fno-implicit-templates -fno-exceptions -fno-rtti -DMYSQLD_NET_RETRY_COUNT=1000000'
LDFLAGS=''
ASFLAGS=''
./configure \
--localstatedir=/var/db/mysql \
--without-debug \
--without-readline \
--without-libedit \
--without-bench \
--without-extra-tools \
--with-libwrap \
--with-low-memory \
--with-sphinx-storage-engine \
--with-comment=FreeBSD && make
# Install MySQL:
make install
# Check it:
mysql> show engines\G
...
*************************** 9. row ***************************
Engine: SPHINX
Support: YES
Comment: Sphinx storage engine 0.9.9
...
Installing SphinxSE
Linux:
MySQL: How do you enable sphinxse (Sphinx Storage Engine) in your mysql installation?
-- FreeBSDer
No comments:
Post a Comment