-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathv13script.sh
75 lines (49 loc) · 1.92 KB
/
v13script.sh
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
#!/bin/bash
##### Package install cmds are in this weird way to avoid installation error "--fix-missing" ### Please modify accordingly if you know better :) ###
sudo apt clean
sudo apt-get update -y
sudo apt upgrade -y
sudo apt install aptitude -y
########################################
######### Dependencies #################
########################################
sudo aptitude install git make build-essential libssl-dev figlet zlib1g-dev -y
sudo aptitude install libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm -y
sudo aptitude install libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev redis mariadb-server cron -y
sudo aptitude install supervisor -y
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo aptitude install -y nodejs
sudo aptitude update -y
sudo aptitude install npm -y
########################################
# Setting up mysql and other services ##
sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
sudo systemctl start mariadb
sudo systemctl start redis
sudo systemctl start supervisor
echo " Do you want to change password of mysql? (yes/no)"
read OPTION
if [ $OPTION = yes ] || [ $OPTION = y ];
then
sudo mysql_secure_installation
fi
##########################################
sudo npm install --global yarn
####### Installing Pyenv #################
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
. ~/.bashrc
pyenv install 3.8.1
cd
pyenv shell 3.8.1
python --version
pip3 install frappe-bench==5.8.1
rm -rf frappe_v13
bench init --frappe-branch v13.23.0 frappe_v13
cd frappe_v13
pyenv local 3.8.1
bench get-app erpnext --branch v13.23.0
echo "Thanks for using script. Now use "bench new-site"
echo "- Envy" | figlet -f slant