本文基于京東云,Ubuntu 20.04 ,系統(tǒng)安裝
本文全程使用"FinalShell SSH" "Noepad++" 工具
一.使用ssh登錄京東云 (不會(huì)自行度娘)
二.更換阿里源(防止因網(wǎng)絡(luò)問題出錯(cuò))
1.安全起見先備份原始源
2.修改文件(位置:/etc/apt/sources.list)
2.打開sources.list文件,刪除里面全部?jī)?nèi)容,
替換以下源
修改后
保存上傳服務(wù)器
三,更新Ubuntu系統(tǒng)
1.檢查Ubuntu系統(tǒng)是否有更新
-
sudo apt update 
2.升級(jí)Ubuntu系統(tǒng)
3.確認(rèn)升級(jí)(輸入Y)
更新速度看服務(wù)器的帶寬
四.更新系統(tǒng)并且重啟系統(tǒng)
五.安裝curl
六.用curl下載node.js
七.安裝erpnext v13 依賴
八.修改數(shù)據(jù)庫(kù)文件 (位置 /etc/mysql/my.cnf) 最后面添加以下內(nèi)容
九.重啟數(shù)據(jù)庫(kù)
十.數(shù)據(jù)庫(kù)安全配置(記住自己的數(shù)據(jù)庫(kù)密碼)
- Enter current password for root (enter for none):
- #這里直接回車
- Set root password? [Y/n] Y
- New password: 輸入自己的數(shù)據(jù)庫(kù)密碼
- Re-enter new password: 輸入自己的數(shù)據(jù)庫(kù)密碼
- 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
十一.數(shù)據(jù)庫(kù)授權(quán)
-
mysql -u root -p - 輸入上面設(shè)置的密碼并執(zhí)行
UPDATE user SET plugin=' ' WHERE user ='root';

十二.創(chuàng)建用戶
- 創(chuàng)建用戶(zhzy更換自己用戶)
adduser zhzy - 輸入密碼
 - 下面直接回車鍵(最后輸入Y)
 -
授權(quán)(zhzy更換自己用戶) usermod -aG sudo zhzy
十三.切換剛創(chuàng)建的用戶并進(jìn)入根目錄(zhzy更換自己用戶)
-
su zhzy -
cd ~
十四.當(dāng)前用戶 pip 更換國(guó)內(nèi)源
- 創(chuàng)建目錄
mkdir ~/.pip - 打開文件
vim ~/.pip/pip.conf  - 粘貼以下內(nèi)容(注意粘貼內(nèi)容完整性)
index-url = https://mirrors.aliyun.com/pypi/simple/ trusted-host=mirrors.aliyun.com
 - 保存退出(先按一下鍵盤esc,接著shift+z+z)

十五.更改 root 用戶的 pip 國(guó)內(nèi)源(輸入自己用戶密碼)
-
sudo mkdir /root/.pip  -
sudo cp ~/.pip/pip.conf /root/.pip - 更改 npm 的源為國(guó)內(nèi)的淘寶
sudo apt install npm npm config set registry https://registry.npm.
十六.安裝yarn
-
sudo npm install -g yarn  - 配置 Yarn 為國(guó)內(nèi)的源
yarn config set registry https://registry.npm.  -
查看安裝版本 node -v && npm -v && python3 -V && pip3 -V && yarn -v
十七. 安裝bench(輸入下面兩條命令)
-
pip3 install frappe-bench  -
sudo pip3 install frappe-bench
十八.重啟系統(tǒng)
十九.安裝git
-
sudo apt install git 
二十. 使用bench命令安裝frappe框架 (此步驟時(shí)間長(zhǎng).耐心等待)一直無(wú)響應(yīng).輸入rm -r hrf 刪除之前 生成的目錄 重新運(yùn)行
- 切換用戶(更換自己創(chuàng)建的用戶名).并且在根目錄
su zhzy cd ~  - 安裝命令(hrf 更換自己目錄名)
bench init --frappe-branch version-13 hrf --frappe-path=https:///phipsoft/frappe   下面出現(xiàn)錯(cuò)誤(別急)  系統(tǒng)會(huì)接著 下載  出現(xiàn)以下就差不多了  安裝完成  - (重復(fù)此步驟.直到安裝成功) 如果未出現(xiàn)上圖所示或一直無(wú)響應(yīng). 斷開重新連接shh.回到第一步驟輸入
rm -r hrf 輸入2次y
二十一. 進(jìn)入bench目錄(hrf更換自己目錄名)
二十二.創(chuàng)建站點(diǎn)(指定數(shù)據(jù)庫(kù)創(chuàng)建站點(diǎn))
-
bench new-site erpnext --verbose --db-name erpnext --db-host 127.0.0.1 --db-port 3306 --mariadb-root-username root --mariadb-root-password xxxx --admin-password admin --force bench new-site erpnext 更換你的站點(diǎn)名 --db-name erpnext 更換自己數(shù)據(jù)庫(kù)名 --mariadb-root-password xxxx 更換上面數(shù)據(jù)庫(kù)的密碼 --admin-password admin 更換自己站點(diǎn)管理密碼 - 安裝完成{出現(xiàn)錯(cuò)誤(檢查問題)重復(fù)第一步驟}

二十三.下載Erpnext
二十四.安裝erpnext
二十五.supervisorctl管理.nginx作網(wǎng)頁(yè)反向代理服務(wù)器(zhzy更換自己創(chuàng)建的用戶名和用戶密碼)
二十六.瀏覽器輸入網(wǎng)站IP(恭喜你ERP架設(shè)完成)
以下為后續(xù)優(yōu)化.
歡迎加入ERPNext中文QQ群641514022(大神聚集為你排憂解難)
一 .安裝余老師漢化APP
- 下載
bench get-app --branch master https:///yuzelin/erpnext_chinese  - 安裝
bench install-app erpnext_chinese 
|