Wiki »
丼鯖を全文検索へ対応¶
ElasticSearchのインスコ¶
- 導入済みのportsを更新。
# make -C /usr/ports update fetchindex
# portupgrade -a
- textproc/elasticsearch7をインスコ。
# make -C /usr/ports/textproc/elasticsearch7 config-recursive install clean
- データ置き場を分けた方は, /usr/local/etc/elasticsearch/elasticsearch.yml の
path.data を変更。
path.data: /usr/home/elasticsearch
- /etc/rc.conf へ
elasticsearch_enable="YES" を追加。
- ElasticSearchを起動。
# service elasticsearch start
丼鯖の設定変更¶
- ~/live/.env.production へ次を追加。
ES_ENABLED=true
ES_HOST=localhost
ES_PORT=9200
- 索引を作成。
$ export RAILS_ENV=production
$ bundle exec rake chewy:upgrade
- /usr/local/etc/rc.d/mastodon の
# REQUIRE: へ, elasticsearch を追加。
# REQUIRE: nginx postgresql redis elasticsearch
- 丼サービスを再起動。
# service mastodon restart
白林檎 美和 さんが1年以上前に更新
· 4件の履歴