Last active
May 20, 2021 07:39
-
-
Save takkii/5b6110b6643e28593842102c39fba0e5 to your computer and use it in GitHub Desktop.
mroonga
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://mroonga.org/ja/docs/install/others.html | |
※ インストールするMySQLはバージョンを同じにする必要がある。管理者権限はそのつど付与する。 | |
wget http://ftp.jaist.ac.jp/pub/mysql/Downloads/MySQL-8.0/mysql-8.0.25.tar.gz | |
tar xvzf mysql-8.0.25.tar.gz | |
mkdir /usr/local/src | |
※ ↑の場所に解凍したファイル群を移動する | |
mv mysql-8.0.25 /usr/local/src | |
mkdir /usr/local/build/mysql-8.0.25 | |
cd /usr/local/build/mysql-8.0.25 | |
※ buildフォルダcmakeを実行 | |
cmake /usr/local/src/mysql-8.0.25 | |
sudo cmake . -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock -DMYSQL_DATADIR=/var/lib/mysql -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/usr/local/mysql | |
sudo make -j4 | |
sudo make install | |
--- ソースからビルド --- | |
boost-1.73.0 | |
https://www.boost.org/users/history/version_1_73_0.html | |
./bootstrap.sh | |
sudo ./b2 install -j4 | |
> boost.cmake (URL:変更) | |
https://bugs.mysql.com/bug.php?id=103611 | |
--- ソースからビルド --- | |
--- homebrewで入れれば省略可能 -- | |
wget https://packages.groonga.org/source/groonga/groonga-10.0.8.tar.gz | |
tar xvzf groonga-10.0.8.tar.gz | |
cd groonga-10.0.8 | |
./configure | |
make | |
sudo make install | |
------------------------------- | |
wget https://packages.groonga.org/source/mroonga/mroonga-11.02.tar.gz | |
tar xvzf mroonga-11.02.tar.gz | |
cd mroonga-11.02 | |
brew install pkg-config | |
brew install groonga | |
sudo ./configure \ | |
--with-mysql-source=/usr/local/src/mysql-8.0.25 \ | |
--with-mysql-build=/usr/local/build/mysql-8.0.25 \ | |
--with-mysql-config=/usr/local/mysql/bin/mysql_config | |
手動 (groongaビルド後) | |
sudo GROONGA_CFLAGS="-I/usr/local/include/groonga" \ | |
GROONGA_LIBS="-L/usr/local/lib -lgroonga" \ | |
./configure \ | |
--with-mysql-source=/usr/local/src/mysql-5.7.32 \ | |
--with-mysql-build=/usr/local/build/mysql-5.7.32 \ | |
--with-mysql-config=/usr/local/mysql/bin/mysql_config | |
sudo make -j4 | |
※ makeビルド中、opensslでエラーになるとき | |
ln -s /usr/local/Cellar/openssl@1.1/1.1.1k/include/openssl /usr/local/include/openssl | |
sudo make install | |
/usr/local/mysql/bin/mysql -u root < /usr/local/share/mroonga/install.sql | |
※ 通らないことも現実なので、次の一手に移る。 | |
brew install mysql | |
※ コンソール出力に従い自動起動登録 | |
/usr/local/mysql/lib/plugin | |
ha_mroonga.a | |
ha_mroonga.0.so | |
ha_mroonga.la | |
ha_mroonga.so | |
この4ファイルを | |
homebrew | |
/usr/local/Cellar/mysql/8.0.25/lib/plugin | |
--- 現在は使用していないため未検証 ---- | |
macports | |
/opt/local/lib/mysql57/plugin | |
--------------------------------- | |
に複製する。移動でもよい。 | |
homebrew | |
mysql -u root -p < /usr/local/share/mroonga/install.sql | |
macports | |
INSTALL PLUGIN Mroonga SONAME 'ha_mroonga.so'; | |
これで導入が完了する。 |
nyasocom2からmroongaの依存をなくしました。gistは参考程度にどうぞ。
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
error: expected unqualified-idが流れてビルドできない。mysql-8.0.25