安裝git
yum install git
或者
apt install git
下載qq音樂api的原始碼
git clone https://github.com/jsososo/QQMusicApi.git
下載nodejs的二進制包、解壓、重命名為nodejs
下載
wget https://cdn.npm.taobao.org/dist/node/v14.15.4/node-v14.15.4-linux-x64.tar.xz
解壓
tar -xJvf node-v14.15.4-linux-x64.tar.xz
重命名
mv node-v14.15.4-linux-x64 /root/nodejs
配置環境變數
vim /etc/profile
輸入G跳轉到檔案末尾,加上下面這行配置,也就是將解壓后的bin目錄路徑添加到環境變數中
export PATH=$PATH:/root/nodejs/bin
重繪組態檔
source /etc/profile
設定淘寶鏡像為鏡像源
npm config set registry https://registry.npm.taobao.org
進入QQ音樂原始碼包啟動qq音樂api服務
進入到qq音樂原始碼包進行安裝依賴
cd QQMusicApi
安裝依賴
npm install
以后臺的方式啟動
nohup npm start &
退出終端,輸入下面命令退出終端,如果直接關閉連接終端的程式例如xshell則會導致一起關閉
exit

轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/246218.html
標籤:區塊鏈
上一篇:Ubuntu下安裝Node.js
