Last active
October 1, 2022 16:56
-
-
Save warmwhisky/47475244335fc0dff42701332def08c2 to your computer and use it in GitHub Desktop.
Install MeiliSearch 0.27.1 from source on Centos 7 and set up a service that starts with boot
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
# Install meilisearch to usr/bin/meilisearch/target/release/meilisearch to use with | |
# | |
# Laravel 9.x | |
# PHP 8.1 | |
# Meilisearch 0.27.1 | |
# meilisearch/meilisearch-php 0.23.3 | |
# | |
# Using Meilisearch 0.27.1 does not require `GLIBC_2.xx' not found | |
# as root or sudo | |
## Install Rust | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh | |
## fecth meiliesearch 0.27.1 | |
curl -L https://github.com/meilisearch/MeiliSearch/archive/v0.27.1.tar.gz > meilisearch.tar.gz | |
## extract the tar | |
tar xf meilisearch.tar.gz | |
## cd into the tar | |
cd meilisearch-0.27.1/ | |
## build the source with Rust | |
~/.cargo/bin/cargo build --release | |
## change to root user dir | |
cd | |
## move meili to /usr/bin/meilisearch | |
mv meilisearch-0.27.1 /usr/bin/meilisearch | |
## enable meilisearch | |
systemctl enable meilisearch | |
## start meilisearch | |
systemctl start meilisearch | |
## check status of meilisearch | |
systemctl status meilisearch | |
## create meilisearch.service file and set up a service | |
vi /etc/systemd/system/meilisearch.service | |
## paste following into /etc/systemd/system/meilisearch.service then save and exit | |
[Unit] | |
Description=Meilisearch | |
After=systemd-user-sessions.service | |
[Service] | |
Type=simple | |
ExecStart=/usr/bin/meilisearch/target/release/meilisearch --http-addr 127.0.0.1:7700 | |
[Install] | |
WantedBy=default.target | |
## as doamin user in Laravel project directory | |
composer require meilisearch/meilisearch-php:v0.23.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment