-
Notifications
You must be signed in to change notification settings - Fork 8
/
Frappe Installation.txt
157 lines (100 loc) · 5.43 KB
/
Frappe Installation.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
############################################################ Frappe-bench installation guide ####################################################################
##################################################################################################################################################################
######## Pre-requisites #######
Python 3.6+
Node.js 14
Redis 5 (caching and real time 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)
wkhtmltopdf (version 0.12.5 with patched qt) (for pdf generation)
cron (bench's scheduled jobs: automated certificate renewal, scheduled backups)
NGINX (proxying multitenant sites in production)
STEP 1 Install git
Git is the most commonly used version control system. Git tracks the changes you make to files,
so you have a record of what has been done, and you can revert to specific versions should you ever need to.
Git also makes collaboration easier, allowing changes by multiple people to all be merged into one source.
sudo apt-get install git
STEP 2 install python-dev
python-dev is the package that contains the header files for the Python C API,
which is used by lxml because it includes Python C extensions for high performance.
install Python 2.7.X dev package
sudo apt-get install python-dev
OR
install Python 3.X dev package
sudo apt-get install python3-dev
STEP 3 Install setuptools and pip (Python's Package Manager).
Setuptools is a collection of enhancements to the Python distutils that allow developers
to more easily build and distribute Python packages, especially ones that have
dependencies on other packages. Packages built and distributed using setuptools
look to the user like ordinary Python packages based on the distutils.
pip is a package manager for Python. It's a tool that allows you to install and manage
additional libraries and dependencies that are not distributed as part of the standard library.
install Python 2.7.X
sudo apt-get install python-setuptools python-pip
OR
install Python 3.X
sudo apt-get install python3-setuptools python3-pip
STEP 4 Install virtualenv
virtualenv is a tool for creating isolated Python environments containing their own copy of
python , pip , and their own place to keep libraries installed from PyPI.
It's designed to allow you to work on multiple projects with different dependencies
at the same time on the same machine.
sudo apt-get install virtualenv
STEP 5 Create an alias for pip and python to enforce use of python 3
alias python=python3
alias pip=pip3
STEP 6 Install MariaDB 10.3 stable package
MariaDB is developed as open source software and as a relational database it provides an SQL interface
for accessing data.
open this link
https://downloads.mariadb.org/mariadb/repositories/#mirror=piconets
IMPORTANT :During this installation you'll be prompted to set the MySQL root password.
If you are not prompted for the same You can initialize the MySQL server setup by executing
the following command
sudo mysql_secure_installation
STEP 7 MySQL database development files
sudo apt-get install libmysqlclient-dev
STEP 8 Edit the mariadb configuration ( unicode character encoding )
sudo nano /etc/mysql/my.cnf
add this to the my.cnf file
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4
Now press (Ctrl-X) to exit
sudo service mysql restart
STEP 9 install Redis
Redis is an open source (BSD licensed), in-memory data structure store, used as a database,
cache, and message broker.
sudo apt-get install redis-server
STEP 10 install Node.js 14.X package
Node.js is an open source, cross-platform runtime environment for developing server-side and
networking applications. Node.js applications are written in JavaScript, and can be run within the Node.js
runtime on OS X, Microsoft Windows, and Linux.
sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
STEP 11 install Yarn
Yarn is a JavaScript package manager that aims to be speedy, deterministic, and secure.
See how easy it is to drop yarn in where you were using npm before, and get faster, more reliable installs.
Yarn is a package manager for JavaScript.
sudo npm install -g yarn
STEP 12 install wkhtmltopdf
Wkhtmltopdf is an open source simple and much effective command-line shell utility that enables
user to convert any given HTML (Web Page) to PDF document or an image (jpg, png, etc)
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb
sudo apt install ./wkhtmltox_0.12.6-1.bionic_amd64.deb
rm wkhtmltox_0.12.6-1.bionic_amd64.deb
STEP 13 install frappe-bench
pip3 install frappe-bench
IMPORTANT: you may wish to log out and log back into your terminal
before next step and You must login.
bench --version
### optional step
STEP 14 Create a user
sudo adduser dcode-frappe
sudo usermod -aG sudo dcode-frappe
su - dcode-frappe