This repository was archived by the owner on Dec 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 102
docs: Redisearch Installation #145
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,8 +2,8 @@ | |
| title: Installation | ||
| image: /assets/frappe_io/images/frappe-framework-logo-with-padding.png | ||
| metatags: | ||
| description: > | ||
| Guide for installing Frappe Framework pre-requisites and the Bench CLI | ||
| description: > | ||
| Guide for installing Frappe Framework pre-requisites and the Bench CLI | ||
| add_breadcrumbs: 1 | ||
| page_toc: 1 | ||
| --- | ||
|
|
@@ -15,7 +15,7 @@ page_toc: 1 | |
|
|
||
| ## System Requirements | ||
|
|
||
| This guide assumes you are using a personal computer, VPS or a bare-metal server. You also need to be on a *nix system, so any Linux Distribution and MacOS is supported. However, we officially support only the following distributions. | ||
| This guide assumes you are using a personal computer, VPS or a bare-metal server. You also need to be on a \*nix system, so any Linux Distribution and MacOS is supported. However, we officially support only the following distributions. | ||
|
|
||
| 1. [MacOS](#macos) | ||
| 1. [Debian / Ubuntu](#debian-ubuntu) | ||
|
|
@@ -29,7 +29,7 @@ This guide assumes you are using a personal computer, VPS or a bare-metal server | |
| ``` | ||
| Python 3.6+ | ||
| Node.js 12 | ||
| Redis 5 (caching and realtime updates) | ||
| Redis 6 (caching and realtime updates) | ||
| MariaDB 10.3.x / Postgres 9.5.x (to run database driven apps) | ||
| yarn 1.12+ (js dependency manager) | ||
| pip 20+ (py dependency manager) | ||
|
|
@@ -107,10 +107,21 @@ npm install -g yarn | |
|
|
||
| ### Debian / Ubuntu | ||
|
|
||
| Install `git`, `python`, and `redis` | ||
| Install `git` and `python` | ||
|
|
||
| ```bash | ||
| apt install git python-dev redis-server | ||
| apt install git python-dev | ||
| ``` | ||
|
|
||
| Install Redis | ||
|
|
||
| ```bash | ||
| # Add official RedisLabs PPA | ||
| sudo add-apt-repository ppa:redislabs/redis | ||
| sudo apt-get update | ||
|
|
||
| # Install Redis | ||
| sudo apt-get install redis | ||
| ``` | ||
|
|
||
| **Install MariaDB** | ||
|
|
@@ -284,3 +295,46 @@ bench start | |
| ``` | ||
|
|
||
| Congratulations, you have installed bench on to your system. | ||
|
|
||
| ## [ERPNext] Optional: Redisearch Redis Module | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This shouldn't be here. We can't keep adding a list of app-specific dependencies in Frappe. Add this section as a system dependency in the ERPNext docs instead.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will move this to ERPNext docs. Need to figure out where. |
||
|
|
||
| We use the [redisearch](http://redisearch.io/) module for `redis` to enable super-fast and advanced product search functionality like **autocomplete, customizable field indexing, ranking and fuzzy searching** on ERPNext's E-Commerce module. Here are the steps to download and build `redisearch`: | ||
|
|
||
| ```bash | ||
| $ git clone --recursive https://github.com/RediSearch/RediSearch.git | ||
| $ cd RediSearch | ||
| $ sudo make setup # Remove `sudo` on macOS | ||
| $ make build | ||
| ``` | ||
|
|
||
| On successful completion of the above instructions, a `redisearch.so` binary file will be generated in the `RediSearch/build` directory. | ||
|
|
||
| Move this binary to the `/etc` directory and restart your Frappe Server: | ||
|
|
||
| ```bash | ||
| sudo mv build/redisearch.so /etc/ | ||
| ``` | ||
|
|
||
| Now, open the `redis_cache.conf` file located in the `config` directory (inside the bench directory). Add the following line before the `save ""` line and then restart bench server: | ||
|
|
||
| ```bash | ||
| loadmodule /etc/redisearch.so | ||
| ``` | ||
|
|
||
| This will load the redisearch module at startup. You can check if the module was loaded successfully by running the following command in the `redis-cli`: | ||
|
|
||
| ```bash | ||
| > MODULE LIST | ||
| ``` | ||
|
|
||
| and `search` should be one of the modules. | ||
|
|
||
| You can also load the module on a running redis instance by running the following command in the `redis-cli`: | ||
|
|
||
| ```bash | ||
| > MODULE LOAD /etc/redisearch.so | ||
| ``` | ||
|
|
||
| > We placed the `redisearch.so` module in the `/etc` directory, but it can be placed anywhere in the file system. We have used this directory because in the future the `loadmodule` line will be populated in the config file automatically and it will assume the binary is in the `/etc` directory. | ||
|
|
||
| More detailed instructions can be found [here](https://oss.redislabs.com/redisearch/Quick_Start/#building_and_running_from_source). | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
System requirements vary depending on Frappe versions. That should be made evident here. Specify that Version 13 requires Redis 6. But then we have develop which has higher Node requirements too....
This should be tracked on it's own separate page.
Is there a corresponding Frappe PR for this? Or do the older client versions simply work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works without any changes on v13.