为MySQL-5.5.9编译安装Sphinx引擎
源码下载
wget http://admin.ooopic.com/soft/linux/cmake-2.8.3.tar.gz wget http://www.wapm.cn/uploads/csft/4.0/coreseek-4.0.1-beta.tar.gz wget http://ftp.jaist.ac.jp/pub/mysql/Downloads/MySQL-5.5/mysql-5.5.9.tar.gz
提示:安装5.5.9版本的mysql与前版本的安装方法不同,同时要用到cmake工具。默认安装到/usr/local/mysql路径,安装后更改即可。
安装CMake
tar zxvf cmake-2.8.3.tar.gz cd cmake-2.8.3 ./bootstrap make make install 安装MYSQL tar xzvf coreseek-4.0.1.tar.gz tar xzvf mysql-VERSION.tar.gz #将sphinx引擎源码拷贝到mysql源码包storage目录下 cp -R coreseek-4.0.1/csft-4.0.1/mysqlse mysql-5.5.9/storage/sphinx cd mysql-5.5.9 cmake . -DCMAKE_BUILD_TYPE=Release -DWITH_SPHINX_STORAGE_ENGINE=1 make #make中途会显示一下信息 Scanning dependencies of target sphinx [ 30%] Building CXX object storage/sphinx/CMakeFiles/sphinx.dir/ha_sphinx.cc.o Linking CXX shared module ha_sphinx.so [ 30%] Built target sphinx make install cd /usr/local/mysql mkdir -p /var/log/mysql /usr/local/mysql/etc cp support-files/my-medium.cnf /usr/local/mysql/etc/my.cnf
编译/etc/my.cnf,加入以下配置 basedir = /usr/local/mysql #mysql所在的位置 datadir = /usr/local/mysql/data #mysql数据库文件存放的路径
chown -R mysql:mysql /usr/local/mysql /usr/local/mysql/scripts/mysql_install_db --basedir=/usr/local/mysql --user=mysql ./bin/mysqld_safe --defaults-extra-file=/usr/local/mysql/etc/my.cnf --user=mysql & mysql -uroot -p mysql>install plugin sphinx soname "ha_sphinx.so"; mysql>show engines; #ENGINE列表显示出SPHINX表示安装成功,包括innodb,MyISAM
相关推荐
wenwentana 2020-07-05
zhenpy 2019-11-29
qianjq 2019-11-29
zk0 2019-11-20
看上去很美 2019-11-18
willcoder 2018-04-17
冷月醉雪 2018-04-17
赫赫小虾 2018-04-16
vitasfly 2016-12-28
半壁灯 2013-06-15
magiclake 2010-12-11
看上去很美 2019-07-01
leshem 2016-02-17
年轻就要对味 2015-01-25
momomoniqwer 2012-06-15
aikaibo 2012-02-14
快雪时晴天 2011-11-10
瑞邦 2019-06-27