Last active
March 27, 2023 08:11
-
-
Save sipatha/05901853c656ac3bec641885373dbe44 to your computer and use it in GitHub Desktop.
New ERPNext version 12 Installation on Ubuntu 18.04.4 LTS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# you have isnatlled ubuntu 18.04 LTS (supported until April 2023 at the time of writing 02.02.2020) | |
# up date server | |
sudo apt-get update | |
# upgrade all packages | |
sudo apt-get upgrade | |
# ensure python 3, build packages and other required packages are installed | |
sudo apt-get install software-properties-common openssl build-essential libssl-dev python3-minimal python3-setuptools python3-dev python3-pip curl wget git git-core libffi-dev fonts-cantarell liblcms2-dev libldap2-dev libwebp-dev redis-server -y --no-install-suggests --no-install-recommends | |
# upgrade pip3 | |
sudo -H pip3 install --upgrade pip | |
# install wkhtmltox, qt patched | |
sudo apt-get install libfontenc1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig -y | |
# get the package | |
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb | |
# install | |
sudo dpkg -i wkhtmltox_0.12.6-1.bionic_amd64.deb | |
# fix any broken packages | |
sudo apt --fix-broken install | |
# disable auto starting of redis server, bench will take care of that | |
sudo systemctl stop redis-server.service | |
sudo systemctl disable redis-server.service | |
# increase file watchers limit | |
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p | |
# install mariadb 10.4 refrence: https://downloads.mariadb.org/mariadb/repositories/#distro=Ubuntu&distro_release=bionic--ubuntu_bionic&mirror=host-europe&version=10.4 | |
# make sure its not installed | |
sudo apt-get remove mariadb-server | |
# get the signing key | |
sudo apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc' | |
# add mariadb repo. take not of the mirror and use ones closer to your server | |
sudo add-apt-repository "deb [arch=amd64,arm64,ppc64el] http://mariadb.mirror.liquidtelecom.com/repo/10.4/ubuntu $(lsb_release -cs) main" | |
# install | |
sudo apt -y install mariadb-server mariadb-client | |
# config mariadb with erpnext requirements | |
# add the below section user the [mysqld] of /etc/mysql/my.cnf | |
# start erpnext configs | |
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 | |
# end erpnext configs | |
# start and configure service | |
sudo systemctl restart mariadb | |
sudo systemctl enable mariadb | |
# secure the mariadb installation and enable password login, by default only socket is enabled | |
sudo su - | |
mysql_secure_installation | |
# exit root and test the new root password | |
exit | |
mysql -u root -p | |
# install node 12x, ref: https://www.rosehosting.com/blog/how-to-install-erpnext-on-ubuntu-18-04/ | |
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - | |
sudo apt-get install -y nodejs | |
# install yarn globally | |
sudo npm install -g yarn | |
# remove old packages and clean | |
sudo apt autoremove | |
sudo apt clean | |
# create application directory on a different volume | |
sudo mkdir -p /u02 | |
# create user with sudo rights | |
sudo useradd -s /bin/bash -d /u02/erp001/ -m -G sudo erp001 | |
# set the password for erp001 | |
sudo passwd erp001 | |
# install frappe-bench | |
sudo -H pip install frappe-bench | |
# confirm bench is installed | |
bench --version | |
# initialize the dev-bench for version-12 | |
bench init dev-bench --frappe-path https://github.com/frappe/frappe --frappe-branch version-12 --python python3 --verbose | |
# let get to the bench | |
cd dev-bench | |
# get erpnext version 12 | |
bench get-app erpnext https://github.com/frappe/erpnext --branch version-12 | |
# create a new site, site.local should be changed to your preferred name | |
bench new-site erp.vambita.com --db-name erpnext001 --admin-password 'admin123' --mariadb-root-password 'root123' --install-app erpnext --verbose | |
# ensure all requirements are build | |
bench setup requirements | |
# compile for the first time app python files. going forward changed .py files are automatically compilied to .pyc | |
bench build | |
# let start the application | |
nohup bench start > bench-start.log 2>&1 & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pandas 0.24.2 might to install. Download and path the sources with commit: pandas-dev/pandas@1f7ef05