-
apt update && apt upgrade -y
-
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
-
apt install nodejs
-
sudo apt-get install gcc g++ make
-
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
-
echo “deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main” | sudo tee /etc/apt/sources.list.d/yarn.list
-
sudo apt-get update && sudo apt-get install yarn
-
sudo apt install -y mariadb-server redis-server nginx
Python 3.10 install and its dependencies
sudo apt install software-properties-common -y
-
sudo add-apt-repository ppa:deadsnakes/ppa
-
sudo apt update
-
apt list | grep python3.10
-
sudo apt install python3.10
These 3 next steps work when installing on ubuntu 20.04 LTS, you can ignore for 22.04LTS
-
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
-
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 2
-
sudo update-alternatives --config python3 (Choose the selection corresponding to Python3.10)
python3 --version (to check if Python now on lastest)
Fix pip
-
sudo apt remove --purge python3-apt
-
sudo apt autoclean
-
sudo apt install python3-apt
-
sudo apt install python3.10-distutils
-
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
-
sudo python3.10 get-pip.py
-
sudo apt install python3.10-venv
-
pip3 install psycopg2-binary
-
sudo apt-get install git
-
pip install markupsafe==2.0.1
-
apt install cython3
-
npm install socket.io
Add New User
-
adduser USERNAME (enter password and others details and press y)
-
usermod -aG sudo USERNAME
Mariadb Config
-
nano /etc/mysql/my.cnf and add these lines to the end of file and save it
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4
-
service mysql restart
-
mysql_secure_installation (Do not change to Unix socket)
Set root password? [Y/n] y
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] n
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y
-
mysql -u root -p (use password set on previous step)
USE mysql;
CREATE USER newuser@localhost IDENTIFIED BY ‘1234567890’;
GRANT ALL PRIVILEGES ON mysql.* TO newuser@localhost WITH GRANT OPTION;
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON mysql.* TO newuser@localhost;
FLUSH PRIVILEGES;
exit
-
node -v && npm -v && python3 -V && pip3 -V && yarn -v (check if all the version are correct)
-
su USERNAME
-
cd /home/USERNAME
-
pip3 install frappe-bench
-
sudo pip3 install frappe-bench
-
bench init --frappe-branch version-14-beta myfrappe
-
cd myfrappe
-
bench new-site mysite (enter mysql root password previous step) and enter new password
-
bench get-app --branch version-14-beta erpnext
-
bench --site mysite install-app erpnext
-
sudo bench setup production USERNAME
-
click y if asked
-
bench build
-
sudo service nginx restart
-
sudo supervisorctl reload
-
goto your ip erpnext and fill in wizard
-
bench --site all enable-scheduler
-
YOU ARE DONE! (in some case I had to do bench start)