-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Install ERPNext Version 5 on Debian
https://github.com/frappe/bench#manual-install
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
sudo su -
cat <<EOF >> /etc/apt/sources.list
# MariaDB 5.5 repository list
deb http://ftp.osuosl.org/pub/mariadb/repo/5.5/debian wheezy main
deb-src http://ftp.osuosl.org/pub/mariadb/repo/5.5/debian wheezy main
EOF
exit
sudo aptitude update
sudo aptitude upgrade
sudo aptitude install python2.7 mariadb-server libmariadbclient-dev python-mysqldb redis-server memcached git build-essential python-pip python-dev libldap2-dev libsasl2-dev wkhtmltopdf libjpeg-dev npm
npm -g install npm
sudo mkdir /opt/erpnext5
sudo chown <YOURNAME> /opt/erpnext5
cd /opt/erpnext5/
# NO sudo in this command:
git clone https://github.com/frappe/bench bench-repo
sudo pip install -e bench-repo
https://github.com/frappe/bench#setting-up-erpnext
[BROKEN LINK]
cd /opt/erpnext5
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
sudo python ez_setup.py
sudo pip -q install https://github.com/frappe/MySQLdb1/archive/MySQLdb-1.2.5-patched.tar.gz
Python gets upset if it can't chatter to the terminal & file system in UTF-8. Setup your locale with UTF8 correctly.
https://perlgeek.de/en/article/set-up-a-clean-utf8-environment
NOTE: On Debian systems the original "/usr/bin/node" executable has been renamed to "/usr/bin/nodejs". Create an alternative to provide both variants.
sudo update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10
bench requires python's MarkupSafe
sudo easy_install MarkupSafe
Now you may continue installing ERPNExt:
bench init frappe-bench
cd frappe-bench
bench get-app erpnext https://github.com/frappe/erpnext
This may be different for you, so follow what is suggested to you
[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
sudo service mysql restart
bench new-site erp.example.com
bench --site erp.example.com install-app erpnext # Install ERPNext for the site
By default this setup allows access only on localhost:8000. To allow remote access (i.e., setting up a headless machine) you need to edit frappe-bench/config/supervisor.conf and modify
command=/home/erpnext/frappe-bench/env/bin/gunicorn -b 127.0.0.1:8000 -w 2 -t 120 frappe.app:application
with
command=/home/erpnext/frappe-bench/env/bin/gunicorn -b x.x.x.x:8000 -w 2 -t 120 frappe.app:application
being x.x.x.x your preferred netmask, or 0.0.0.0 for unrestricted access. Of course, you can also adjust the port to your needs.
https://github.com/frappe/bench#production-deployment
sudo aptitude install supervisor
bench setup supervisor
sudo ln -s `pwd`/config/supervisor.conf /etc/supervisor/conf.d/frappe.conf
sudo aptitude install nginx
bench setup nginx
sudo ln -s `pwd`/config/nginx.conf /etc/nginx/conf.d/frappe.conf
sudo service supervisor restart
supervisorctl status
sudo service nginx restart
https://github.com/frappe/bench/wiki/Multitenant-Setup
bench new-site erp2.example.com
bench config dns_multitenant on
bench setup nginx
# see the config in config/nginx.conf
sudo service nginx reload
Custom Footer Page