Try ERPNext Buy Support Partners Foundation

Ubuntu 20.04 install

Hi

meaby this is a little more then a novice but have a testet guide to install frappe/erpnext onto ubuntu 20.04 running as wm. i would be nice if some of you mere knowning can simplyfy this…

Clean ubuntu 20.04

sudo -i

apt update && apt -y upgrade

##################################

user

##################################

adduser bench --home /opt/bench
usermod -aG sudo bench
nano /opt/bench/.bashrc

add path

PATH=$PATH:~/.local/bin/

##################################

Git

##################################

apt-get install git

##################################

phyton3 + pip3

##################################

apt -y install python3-dev
apt -y install python3-setuptools python3-pip
apt -y install virtualenv
alias python=python3
alias pip=pip3
apt -y install git build-essential libffi-dev libssl-dev

##################################

MariaDB 10.3

##################################

apt -y install software-properties-common mariadb-server mariadb-client
apt -y install libmysqlclient-dev
apt update && apt -y upgrade

##################################

MariaDB Server config

##################################
(ctrl+w = search)(alt+w = repeat search)(ctrl+x + “y” = save)

nano /etc/mysql/mariadb.conf.d/50-server.cnf

add

[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

[mysql]
default-character-set = utf8mb4
##################################

systemctl status mariadb
mysql -V

service mysql restart

mysql -u root -p
create user bench@localhost identified by ‘password’;
GRANT all privileges on . to ‘bench’@‘localhost’ IDENTIFIED BY ‘password’ WITH GRANT OPTION;
GRANT all privileges on . to ‘bench’@‘127.%.%.%’ IDENTIFIED BY ‘password’ WITH GRANT OPTION;
GRANT all privileges on . to ‘root’@‘localhost’ IDENTIFIED BY ‘password’ WITH GRANT OPTION;
GRANT all privileges on . to ‘root’@‘127.%.%.%’ IDENTIFIED BY ‘password’ WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;

reboot

##################################

Redis 5

##################################
sudo -i

apt -y install redis-server
redis-server -v

nano /etc/redis/redis.conf

##################################

replace

supervised no

with

supervised systemd
##################################

systemctl restart redis.service

##################################

Node.js 12.X

##################################

apt install curl
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
apt -y install nodejs
apt -y install nodejs && apt-get install -y gcc g++ make
npm install -g yarn

##################################

yarn

##################################

curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo “deb https://dl.yarnpkg.com/debian/ stable main” | sudo tee /etc/apt/sources.list.d/yarn.list
apt update && apt -y install yarn
apt -y install yarnpkg
yarnpkg --version

##################################

wkhtmltopdf

##################################

apt -y install fontconfig libxrender1 libxext6 libfreetype6 libx11-6 xfonts-75dpi xfonts-base zlib1g

wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb
apt -y install -f

ln -s /usr/local/bin/wkhtmltopdf /usr/bin
ln -s /usr/local/bin/wkhtmltoimage /usr/bin

wkhtmltopdf --version
wkhtmltoimage --version

##################################

Get Frappe Bench

##################################

su bench
cd /opt/bench
git clone -b master https://github.com/frappe/bench.git ~/.bench
pip3 install ~/.bench
sudo reboot

user login.: bench
cd /opt/bench

bench init --frappe-branch version-12 --python /usr/bin/python3 frappe-bench

sudo reboot

cd /opt/bench/frappe-bench
bench new-site test.site
bench --site test.site enable-scheduler

##################################

Setup Supervisor & Nginx for Production

##################################
su bench
cd /opt/bench/frappe-bench

sudo apt -y install supervisor
sudo systemctl start supervisor
sudo systemctl enable supervisor

bench setup supervisor
sudo ln -s pwd/config/supervisor.conf /etc/supervisor/conf.d/frappe-bench.conf

sudo reboot

##################################

Install nginx

##################################
su bench
cd /opt/bench/frappe-bench

sudo apt -y install nginx

Remove enable sites

sudo rm -f /etc/nginx/sites-enabled/*

Create symbolic link to nginx conf for frappe

sudo ln -s /opt/bench/frappe-bench/config/nginx.conf /etc/nginx/sites-enabled/frappe.conf

bench setup nginx
sudo service nginx restart

bench setup socketio
bench update --requirements
bench build

sudo reboot
cd /opt/bench/frappe-bench
bench update

##################################

Installing Frappé Apps onto Sites

##################################

bench get-app --branch version-12 erpnext
bench --site test.site install-app erpnext

##################################

Thanks in advance

2 Likes

Would recommend you use Ubuntu 18. Also you can use the Easy Install script.

i´m using ubuntu 18.04 now and how no current plans to upgrade but it is good to be prepared when a new version is released so when i want to upgrade the preparation have been made hereunder also found error´s before doing so if any ofcourse:slightly_smiling_face:.

Can you elaborate on this please.

Hi Eric,
Thanks for sharing the scripts for Ubuntu 20.04.
I too have an Ubuntu 18.04 installation. Agree with you that its better be prepared for the latest version.
Thanks,

since easy install not working without errors i used this as part reference to install redis