I’m trying to install Erpnext on a VPS running Ubuntu 22.04 and I been running into a plethora of issues. I am using d-CodE’s installation tutorial to install Erpnext and it was running fine in development mode but I couldn’t get it to run in production mode. Eventually I got it to work in production mode but I ended up breaking the UI:
So I had reinstall my VPS and start from scratch again and now whenever I run bench get-app erpnext --branch version-13
or bench get-app https://github.com/frappe/erpnext --branch version-13
it gets stuck everytime at:
Installing erpnext
$ /home/ubuntu/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/ubuntu/frappe-bench/apps/erpnext
Here are the steps I have been following:
2. Install GIT
sudo apt-get install git
3. Install pythonc api
sudo apt-get install python3-dev
4. Install PIP and Setuptools for python
sudo apt-get install python3-setuptools python3-pip
5. Install virtual environment for python
sudo apt-get install virtualenv
6. Install MariaDB
sudo apt-get install software-properties-common
sudo apt install mariadb-server
7. Setup MariaDB’s root password and other settings
sudo mysql_secure_installation
$ Enter current password for root (enter for none): press enter here
$ Switch to unix_socket authentication [Y/n] n
$ Change the root password? [Y/n] y
$ New password: *enter your password here*
$ Re-enter new password: *enter your password here again*
$ 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
8. Install MYSQL C development library
sudo apt-get install libmysqlclient-dev
9. Edit MariaDB’s configuration file using nano (or vi whatever text editor you are comfortable with)
sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf
Add the following to the file:
[server]
user = mysql
pid-file = /run/mysqld/mysqld.pid
socket = /run/mysqld/mysqld.sock
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
bind-address = 127.0.0.1
query_cache_size = 16M
log_error = /var/log/mysql/error.log
[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
Now these find these lines in the file, it should be under # * Character sets
and comment them out using # :
# character-set-server = utf8mb4
# collation-server = utf8mb4_general_ci
Press Ctrl+S to save the edited file and Ctrl+X to exit.
Now restart MYSQL again:
sudo service mysql restart
10. Install Redis server
sudo apt-get install redis-server
11. Install Node.js 14.X
sudo apt install curl
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.profile
nvm install 14.15.0
12. Install NPM and Yarn (package managers)
sudo apt-get install npm
sudo npm install -g yarn
13. Install wkhtmltopdf
sudo apt-get install xvfb libfontconfig wkhtmltopdf
14. Install Bench
sudo -H pip3 install frappe-bench
bench --version
15. Initialize Bench
bench init frappe-bench
16. Create your site for Bench and set it as the default site for Bench
cd frappe-bench/
bench new-site erp.mysite.com
bench use erp.mysite.com
17. Install Erpnext your Bench site
bench get-app erpnext --branch version-13
Or
bench get-app https://github.com/frappe/erpnext --branch version-13
bench --site erp.mysite.com install-app erpnext
18. Migrate your site and start Bench
bench migrate
bench start
If you are using a VPS, paste your server’s IP in the browser which should roughly look like xxx.xx.xx.xxx
and the site should load up normally.
Now you can log into the site by using the following credentials:
Administrator
*password_you_created_during_setup*
I am absolutely end of my wits here.