Frappe/ERPNext bench installation for Development for ubuntu 20.04 LTS (ARM64)
Here are the instructions to set up the equivalent environment in an Ubuntu 22.04 ARM64 system. You can install these packages and set up the tools manually by following the given steps:
Prerequisites
Before starting, make sure to have a user with sudo privileges and an active internet connection.
Update System Packages
sudo apt-get update
Install Required Packages
sudo DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
git \
mariadb-client \
postgresql-client \
gettext-base \
wget \
libssl-dev \
fonts-cantarell \
xfonts-75dpi \
xfonts-base \
libpango-1.0-0 \
libjpeg62-turbo \
libharfbuzz0b \
libpangoft2-1.0-0 \
libpangocairo-1.0-0 \
locales \
build-essential \
cron \
curl \
vim \
sudo \
iputils-ping \
watch \
tree \
nano \
less \
software-properties-common \
bash-completion \
libpq-dev \
libffi-dev \
liblcms2-dev \
libldap2-dev \
libmariadb-dev \
libsasl2-dev \
libtiff5-dev \
libwebp-dev \
redis-tools \
rlwrap \
tk8.6-dev \
ssh-client \
net-tools \
make \
libbz2-dev \
libsqlite3-dev \
zlib1g-dev \
libreadline-dev \
llvm \
libncurses5-dev \
libncursesw5-dev \
xz-utils \
tk-dev \
liblzma-dev
Note: Kindly ignore if package does not install libjpeg62-turbo
if you are trying it on Intel/AMD64 arch.
Set Locale
sudo sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
sudo dpkg-reconfigure --frontend=noninteractive locales
Install wkhtmltopdf
export WKHTMLTOPDF_VERSION=0.12.6-1
export ARCH=arm64
downloaded_file=wkhtmltox_$WKHTMLTOPDF_VERSION.buster_${ARCH}.deb
wget -q https://github.com/wkhtmltopdf/packaging/releases/download/$WKHTMLTOPDF_VERSION/$downloaded_file
sudo dpkg -i $downloaded_file
rm $downloaded_file
Create New User
sudo adduser -ms /bin/bash frappe
sudo groupadd -g 1000 frappe
sudo useradd --no-log-init -r -m -u 1000 -g 1000 -G sudo frappe
echo "frappe ALL=(ALL) NOPASSWD: ALL" | sudo tee -a /etc/sudoers
Switch to the New User
su - frappe
Install Python 3.9.9 & 3.10.5 for version 13 & 14 via pyenv
export PYTHON_VERSION_V13=3.9.9
export PYTHON_VERSION=3.10.5
git clone --depth 1 https://github.com/pyenv/pyenv.git ~/.pyenv
export PYENV_ROOT=~/.pyenv
export PATH=$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
pyenv install $PYTHON_VERSION_V13
pyenv install $PYTHON_VERSION
PYENV_VERSION=$PYTHON_VERSION_V13 pip install --no-cache-dir virtualenv
PYENV_VERSION=$PYTHON_VERSION pip install --no-cache-dir virtualenv
pyenv global $PYTHON_VERSION $PYTHON_VERSION_v13
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile
echo 'eval "$(pyenv init --path)"' >> ~/.profile
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
Clone and Install Bench
export PATH=$HOME/.local/bin:$PATH
export GIT_REPO=https://github.com/frappe/bench.git
export GIT_BRANCH=v5.x
git clone ${GIT_REPO} --depth 1 -b ${GIT_BRANCH} ~/.bench
pip install --no-cache-dir --user -e .bench
echo "export PATH=$HOME/.local/bin:\$PATH" >> ~/.bashrc
echo "export BENCH_DEVELOPER=1" >> ~/.bashrc
Install Node.js via NVM
export NODE_VERSION_14=14.19.3
export NODE_VERSION=16.18.0
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
export NVM_DIR=~/.nvm
source ${NVM_DIR}/nvm.sh
nvm install ${NODE_VERSION_14}
nvm use v${NODE_VERSION_14}
npm install -g yarn
nvm install ${NODE_VERSION}
nvm use v${NODE_VERSION}
npm install -g yarn
nvm alias default v${NODE_VERSION}
rm -rf ${NVM_DIR}/.cache
echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.bashrc
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc
echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion' >> ~/.bashrc
Verify the Setup
At this point, all the necessary tools should be installed. Verify this by checking the installed versions.
node --version
npm --version
yarn --version
bench --help
Install MariaDB/MySQL
sudo apt install mariadb-server
sudo mysql_secure_installation
Initially, there is no password for root. Press ENTER.
Enter current password for root (enter for none):
Press ENTER to enter a new password.
Set root password? [Y/n]
Enter and confirm a root password for MariaDB.
New password:
Re-enter new password:
Password updated successfully!
Press ENTER to remove the anonymous user.
Remove anonymous users? [Y/n]
Press ENTER to disallow remote root logins.
Disallow root login remotely? [Y/n]
Press ENTER to remove the test database.
Remove test database and access to it? [Y/n]
Press ENTER to reload the privilege tables.
Reload privilege tables now? [Y/n]
This completes the basic security configuration.
MySQL Config
sudo nano /etc/mysql/conf.d/frappe.cnf
Add following config to frappe.cnf
then save file and exit nano editor:
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4
Restart Msariadb server to apply new configuration
sudo systemctl restart mysqld.service
Install Redis Server
sudo apt install redis-server
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
Initialize Frappe bench with ERPNext v14
bench init frappe-bench --frappe-branch version-14 --install-app erpnext
Create first Site
bench new-site site1.local --install-app erpnext
# OR
# You can install addional apps using following commands
# bench get-app branch version-14 erpnext https://github.com/frappe/erpnext
# bench --site site1.local install-app erpnext
Start bench Development server
cd frappe-bench
bench start
You should now have a working Ubuntu 22.04 arm64 environment set up. Enjoy developing with Frappé!
Direct Download Links for downloading Ubuntu 20.04 LTS 64bit ARM Editions
Direct Download Links for downloading Ubuntu 20.04 LTS 64bit Editions
Desktop and Server Edition (Without Desktop)
ubuntu-20.04.6-desktop-amd64.iso 16-Mar-2023 15:58
ubuntu-20.04.6-live-server-amd64.iso 14-Mar-2023 23:02
Other mirrors (choose mirrors based on your country/location for faster download):
Frappe/ERPNext bench installation for Development for ubuntu 20.04 LTS (Intel/AMD64)
Install wkhtmltopdf for Intel/AMD64
Please note: The following adjustment is specifically necessary for those utilizing Intel/AMD64 architecture to ensure a successful installation. All other steps in the process will remain unchanged.
export WKHTMLTOPDF_VERSION=0.12.6-1
export ARCH=amd64
downloaded_file=wkhtmltox_$WKHTMLTOPDF_VERSION.buster_${ARCH}.deb
wget -q https://github.com/wkhtmltopdf/packaging/releases/download/$WKHTMLTOPDF_VERSION/$downloaded_file
sudo dpkg -i $downloaded_file
rm $downloaded_file