Skip to content
This repository was archived by the owner on Dec 6, 2021. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 60 additions & 6 deletions frappe_docs/www/docs/user/en/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
---
Expand All @@ -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)
Expand All @@ -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)

Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Member Author

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.

MariaDB 10.3.x / Postgres 9.5.x (to run database driven apps)
yarn 1.12+ (js dependency manager)
pip 20+ (py dependency manager)
Expand Down Expand Up @@ -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**
Expand Down Expand Up @@ -284,3 +295,46 @@ bench start
```

Congratulations, you have installed bench on to your system.

## [ERPNext] Optional: Redisearch Redis Module

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The 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).