From 272adadfdad48bd0879c6ea46cea2c046605323d Mon Sep 17 00:00:00 2001 From: Hussain Nagaria Date: Fri, 28 May 2021 07:03:48 +0530 Subject: [PATCH 1/3] docs: Redis 6 on apt-based systems --- frappe_docs/www/docs/user/en/installation.md | 23 +++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/frappe_docs/www/docs/user/en/installation.md b/frappe_docs/www/docs/user/en/installation.md index 69381aef..d81e1a46 100644 --- a/frappe_docs/www/docs/user/en/installation.md +++ b/frappe_docs/www/docs/user/en/installation.md @@ -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** From 265a82712c3c9ba32efaa988cd1234bb5c075ee4 Mon Sep 17 00:00:00 2001 From: Hussain Nagaria Date: Fri, 28 May 2021 07:04:13 +0530 Subject: [PATCH 2/3] docs: Rediseach installation --- frappe_docs/www/docs/user/en/installation.md | 21 ++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/frappe_docs/www/docs/user/en/installation.md b/frappe_docs/www/docs/user/en/installation.md index d81e1a46..a0adde9c 100644 --- a/frappe_docs/www/docs/user/en/installation.md +++ b/frappe_docs/www/docs/user/en/installation.md @@ -295,3 +295,24 @@ bench start ``` Congratulations, you have installed bench on to your system. + +## [ERPNext] Optional: Redisearch Redis Module + +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/ +``` + +More detailed instructions [here](https://oss.redislabs.com/redisearch/Quick_Start/#building_and_running_from_source). \ No newline at end of file From a050f77790e792bdc294a71696a56ad92982a7a0 Mon Sep 17 00:00:00 2001 From: Hussain Nagaria Date: Wed, 2 Jun 2021 16:13:47 +0530 Subject: [PATCH 3/3] docs: Add module load instructions --- frappe_docs/www/docs/user/en/installation.md | 24 +++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/frappe_docs/www/docs/user/en/installation.md b/frappe_docs/www/docs/user/en/installation.md index a0adde9c..a0c921dc 100644 --- a/frappe_docs/www/docs/user/en/installation.md +++ b/frappe_docs/www/docs/user/en/installation.md @@ -315,4 +315,26 @@ Move this binary to the `/etc` directory and restart your Frappe Server: sudo mv build/redisearch.so /etc/ ``` -More detailed instructions [here](https://oss.redislabs.com/redisearch/Quick_Start/#building_and_running_from_source). \ No newline at end of file +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). \ No newline at end of file