Summary[-][--][++]

How to get frappe and ERPNext up and running locally on your ArchLinux Manjaro machine

Exclamation3
This is actually fully untested and from memory only.

Setup Python via Pyenv[-][--][++]

pyenv is a python version manager that lets you have multiple versions of python on the same system.
Need to have pyenv successfully working on your lapbop
See https://github.com/pyenv/pyenv
Take note of all the ~/.bashrc stuff you have to add
There is a pacman version, but its broken, simply use github

Once properly installed and you can run the `pyenv` command successfully install these versions of python and set them as global

pyenv install 2.7.15
pyenv install 3.7.4
pyenv global 3.7.4 2.7.15

Now open a new terminal and type python --version and you should see it as 3.7.4 if not, try again

Setup NodeJS via nvm[-][--][++]

nvm is a nodejs version manager that lets you have multiple versions of python on the same system.
Again there is a pacman version of nvm, but use github
See https://github.com/nvm-sh/nvm

Once you have it installed properly with all ~/.bashrc stuff setup, you can open a new terminal and should be able to type nvm and it shows the nvm help (means its working).
Once nvm is working run

nvm install --lts
nvm ls # to see all versions installed, will be 12.something
nvm alias default 12.something to set your default

To test open a new terminal and type node --version, and it should be the proper version you aliased as default

Install Yarn globally via NPM[-][--][++]

yarn is an alternative package manager to npm for nodejs

npm install -g yarn

Install MariaDB[-][--][++]

Install mariadb database server on your laptop. Note I use yay not pacman. If you don't have yay just run sudo pacman -S yay. Yay is NOT meant to be run as sudo like pacman is.

yay -S mariadb    

By default archlinux sets newly installed daemons/services to OFF, so enable them

sudo systemctl enable mysqld
sudo systemctl start mysqld

NOTE there may not be a 'd' at the end, I don't remember

Now you have to customize mariadb specifically for frappe
create a new file using vim or nano text editor

sudo nano /etc/mysql/conf.d/frappe.cnf

and paste in this content (not the)

[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

Then restart mysql with

sudo systemctl restart mysqld

Install Redis[-][--][++]

Simply run

yay -S redis
sudo systemctl enable redis
sudo systemctl start redis

Install Frappe Bench Command Line Tool[-][--][++]

Simply use python pip to install it globally

pip install frappe-bench

Install Frappe and ERPNext[-][--][++]

Assuming you are using a Code folder in your home directoy and you want to install the entire project in a folder called erpnext

# Install frappe into ~/Code/erpnext
cd ~/Code
bench init erpnext --no-backups

# Change into the new directoy
cd ~/Code/erpnext

# Start erpnext which will fire up 3 additional redis processes required for the next steps
# This command will STAY RUNNING, its the bench frappe server.  If it stops and dumps you back to the command prompt something is broken
# Leave this bench server running in this terminal.
bench start

# Open ANOTHER terminal (leaving bench start still running)
# Create a new frappe "site" called mysite (name it whatever you want, mysite is an example)
# Ensure you are in ~/Code/erpnext still
cd ~/Code/erpnext
bench new-site mysite --db-name erpnext

# Restart the bench server
# Back in the other terminal that is running bench start, press CTRL+C to kill it and simply run bench start again

# Back in the second terminal (while bench start is still running in the other one)...still in ~/Code/erpnext
# Get the ERPNext app
bench get-app erpnext

# Restart the bench server
# Back in the other terminal that is running bench start, press CTRL+C to kill it and simply run bench start again

# Back in the second terminal (while bench start is still running in the other one)...still in ~/Code/erpnext
# Add this new erpnext "app" to your new site
bench --site mysite install-app erpnext

# Restart the bench server
# Back in the other terminal that is running bench start, press CTRL+C to kill it and simply run bench start again

# Now you should be done.  The "bench start" server should still be running successfully
# Simply visit http://localhost:8000 in your browser and you should see the ERPNext welcom/setup screens.