PS: 所有操作都在 ~ 路徑下
sudo vim /etc/ssh/sshd_config
sudo service sshd restart
sudo passwd user
, 更新 user 密碼source ~/.bashrc
alias python=python3
source ~/.bashrc
sudo apt install python3.8-venv
sudo apt-get install python3-pip
sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://ftp.ubuntu-tw.org/mirror/mariadb/repo/10.3/ubuntu xenial main'
sudo apt-get update
sudo apt-get install mariadb-server-10.3
sudo apt-get install libmysqlclient-dev
curl -s https://deb.nodesource.com/setup_16.x | sudo bash
sudo apt-get install -y nodejs
sudo npm install -g yarn
sudo apt-get install redis-server
完成上述步驟後, 重新啟動 EC2
pip install frappe-bench
bench --version
bench init ./frappe-bench --frappe-path https://github.com/frappe/frappe --frappe-branch version-13 --python python3
因為 erpnext 會一直更新,尤其是每更新到一個大版本,對 Python 的最低版本要求就會變高,為了方便開發,因此有 clone 一版 13.36.2 的版本出來,後續如果有一些自定義的功能,也會直接更新這個部分
bench get-app erpnext https://gitlab.com/go-right-team/erpnext.git
bench new-site <site_name>
sudo bench setup production
如果設置時發生錯誤, 例如 Jinja 版本的要求等
參考以下步驟, 手動設置生產環境
pip install ansible==5.4.0 ansible-core==2.12.2 jinja2==2.10.3
sudo apt-get install supervisor nginx
bench setup supervisor
bench setup nginx
sudo ln -s /home/amadeus/frappe-bench/config/supervisor.conf /etc/supervisor/conf.d/frappe-bench.conf
sudo ln -s /home/amadeus/frappe-bench/config/nginx.conf /etc/nginx/conf.d/frappe-bench.conf
sudo shutdown -r now
如果發生 sudo: bench: command not found 的錯誤
可以執行
sudo pip3 install frappe-bench
然後再執行一次 sudo bench setup production
sudo apt-get install xfonts-intl-chinese fonts-wqy-zenhei fonts-arphic-ukai fonts-arphic-uming
新增的 worker queue name 需要放在這後面,這樣之後 bench restart 時才會一起重啟這些 queue
bench restart
未設定 print_hide = 0 且有值, 不是 Section Break, Column Break 或 Button 的欄位,都會依照欄位的順序出現在標準列印中