Installing ERPNext version 13 beta on Ubuntu 20.10 ( 20+ )

As CentOS dead ( or killed by IBM), Ubuntu becomes the de-facto OS for ERPNext hosting. These are the steps to install Frappe and ERPNext on Ubuntu ( or debian ) latest version. Feel free to comment

 · 2 min read


apt-get update -y
init 6  ( will restart )


apt-get install libffi-dev python3-pip python3-dev  python3-testresources libssl-dev wkhtmltopdf gcc g++ make -y


curl -sL https://deb.nodesource.com/setup_12.x | bash -


apt-get install nodejs redis-server -y


npm install -g yarn


apt-get install mariadb-server mariadb-client -y



mysql_secure_installation


Enter current password for root (enter for none): Press your [Enter] key, there is no password set by default
Set root password? [Y/n] Y
New password:
Re-enter new password:
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y




mysql -u root -p


MariaDB [(none)]>USE mysql;
MariaDB [(none)]>UPDATE user SET plugin='mysql_native_password' WHERE User='root';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;


vim /etc/mysql/mariadb.conf.d/erpnext.cnf

Add these lines
[mysqld]
innodb-file-format=barracuda
innodb-file-per-table=1
innodb-large-prefix=1
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

[mysql]
default-character-set = utf8mb4


systemctl restart mariadb


useradd -m -s /bin/bash erpnext


passwd erpnext


usermod -aG sudo erpnext


su - erpnext


vim ~/.bashrc
add this line
PATH=$PATH:~/.local/bin/


source ~/.bashrc


su - erpnext
sudo mkdir /opt/bench


sudo chown -R erpnext:erpnext /opt/bench


cd /opt/bench


pip3 install --user frappe-bench
 bench init frappe-bench --frappe-branch version-13-beta


cd frappe-bench
 sed -i '/web:/ s/$/ --noreload/' Procfile
 bench start >/tmp/bench_log &


bench new-site yourhost.example.com


At this point we have a frappe site running - bench start and you will get the website on port 8000. But ERPNext not yet installed. Let's continue


bench get-app erpnext --branch version-13-beta
 bench install-app erpnext


bench start


Now you have ERPNext on port 8000. ( http://yourhost.example.com:8000 )

You can run the setup-wizard on the browser. ( Setup-wizard often fail. Restart it again and again. This issue has been there since ages and yet to be fixed )


----- NOW deploy it in production mode - on nginx server -------



sudo apt install nginx supervisor
bench setup supervisor --yes
 bench setup nginx


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


sudo systemctl enable supervisor
 sudo systemctl enable nginx


restart the system - init 6 









Team ERPGulf

The team behind ERPGulf blogs here, expresses their thoughts, shares the experience, often show the frustrations. Contact us on support@ERPGulf.com

2 comments
fkalpana@hotmail.com January 13, 2021

Very short and precise - :) thanks.

Administrator January 13, 2021

thanks,

Add Comment