Projekt

Allgemein

Profil

Setup erpnext14 » Historie » Version 2

David Ayers, 11.10.2022 15:47
Initial Setup

1 1 Jeremias Keihsler
h1. Setup erpnext14
2
3
this is taken from David's bash-history ... needs some tidy up :-)
4
5
<pre><code class="shell">
6 2 David Ayers
# install Ubuntu Server
7
# German
8
# German no dead keys
9
# Ubuntu Server
10
# enp1s0:
11
# <static net>/<net>
12
# <static IP>
13
# <static gateway>
14
# <dns IP 1>,<dns IP 2>,<dns IP 3>
15
# -with LVM full disk
16
# <hostname>
17
# frappe <SecretPassword>
18
# Install openssh server
19
# Retrieve SSH key from Launchpad
20
# Do not allow password
21
22
sudo apt update
23
sudo apt full-upgrade
24
# unattended-upgrades.service
25
26 1 Jeremias Keihsler
sudoedit /etc/hosts
27 2 David Ayers
# add line
28
# <static IP>   <hostname.domain>
29
30
sudo apt install etckeeper
31
sudo git config --global --edit
32
# name = root
33
# email = <hostname.domain>
34
35
# my personal prefrences
36 1 Jeremias Keihsler
sudo apt install emacs-nox
37
export EDITOR=emacs
38 2 David Ayers
39
sudoedit /etc/inputrc
40
# "\e[5~": history-search-backward
41
# "\e[6~": history-search-forward
42
43
# setup core services
44
sudo apt install locate aptitude apticron fail2ban rkhunter chkrootkit
45
logwatch atop nmap arp-scan arping
46
# Postfix als Satellitensystem einrichten
47
# <hostname>.<domain>
48
# <smtp-relay>.<domain>
49
50 1 Jeremias Keihsler
sudoedit /etc/aliases
51 2 David Ayers
#root:         noc@domain
52
#alert:        alert@domain
53
sudo newaliases
54
55
sudoedit /etc/postfix/generic
56
#root@<hostname>.<domain>         noc@domain
57
#frappe@<hostname>.<domain>       noc@domain
58
59 1 Jeremias Keihsler
sudoedit /etc/postfix/main.cf
60 2 David Ayers
# smtp_generic_maps = hash:/etc/postfix/generic
61
62 1 Jeremias Keihsler
sudo postmap /etc/postfix/generic
63 2 David Ayers
64
65 1 Jeremias Keihsler
sudo apt install backup-manager
66 2 David Ayers
# /var/archives
67
# /etc /home/frappe /usr/local /var/backups
68
69
sudoedit /etc/ssh/sshd_config
70
#PermitRootLogin prohibit-password
71
72
73 1 Jeremias Keihsler
sudoedit /etc/rkhunter.conf
74 2 David Ayers
# MAIL-ON-WARNING=alert
75
# ALLOW_SSH_ROOT_USER=prohibit-password
76
# SCRIPTWHITELIST=/usr/bin/lwp-request
77
# ALLOWHIDDENDIR=/etc/.git
78
# ALLOWHIDDENFILE=/etc/.gitignore
79
# ALLOWHIDDENFILE=/etc/.etckeeper
80 1 Jeremias Keihsler
sudo rkhunter --propupd
81
sudo rkhunter --check --sk
82 2 David Ayers
83
84
85
# ERPnext
86 1 Jeremias Keihsler
sudo ufw allow 22,25,143,80,443,3306,3022,8000/tcp
87
sudo ufw enable
88 2 David Ayers
89
sudo apt install python3-minimal build-essential python3-setuptools
90
sudo apt install python3-dev python3.10-dev python3-setuptools python3-
91
pip python3-distutils redis-server
92 1 Jeremias Keihsler
sudo apt install python3.10-venv
93 2 David Ayers
sudo apt update
94
95 1 Jeremias Keihsler
sudo apt install xvfb libfontconfig wkhtmltopdf
96 2 David Ayers
97
sudo passwd root
98
99
sudo apt install mariadb-server mariadb-client
100
sudo mysql_secure_installation
101
# pwd
102
# Switch to unix_socket authentication: Y
103
# Change the root password? [Y/n] y
104
# password: pwd
105
# Remove anonymous users? [Y/n] y
106
# Disallow root login remotely? [Y/n] y
107
# Remove test database and access to it? [Y/n] y
108
109
# Reload privilege tables now? [Y/n] y
110
111
mysql -u root -p
112
ALTER USER root@localhost IDENTIFIED VIA mysql_native_password;
113
SET PASSWORD = PASSWORD(‘pwd’);
114
FLUSH PRIVILEGES;
115
quit
116
rm .mysql_history
117
118
sudoedit /etc/mysql/conf.d/erpnext.cnf
119
#[mysqld]
120
#character-set-client-handshake = FALSE
121
#character-set-server = utf8mb4
122
#collation-server = utf8mb4_unicode_ci
123
124
#[mysql]
125
#default-character-set = utf8mb4
126
127
sudo reboot
128
129
wget https://deb.nodesource.com/setup_16.x
130
less setup_16.x
131
# Wow... add someones key to be trusted by system apt to install nodejs :-/ not cool but lets just get done.
132
chmod +x setup_16.x
133
sudo -E setup_16.x
134
sudo apt install nodejs
135
136
cd
137
tee -a ~/.bashrc<<EOF
138
PATH=$PATH:~/.local/bin/
139
EOF
140
source ~/.bashrc
141
142
sudo mkdir /home/bench
143
sudo chown -R frappe /home/bench
144
cd /home/bench
145
sudo npm install -g yarn
146
147
pip3 install frappe-bench
148
bench init frappe --verbose --frappe-branch v14.4.3 #
149
https://github.com/frappe/frappe/tags
150
cd frappe
151
152
153
bench start
154
155
156 1 Jeremias Keihsler
</code></pre>