[精讚] [會員登入]
1631

[Centos7] 安裝nodejs8+yarn

安裝nodejs 8+ yarn的過程記錄

分享此文連結 //n.sfs.tw/13759

分享連結 [Centos7] 安裝nodejs8+yarn@新精讚
(文章歡迎轉載,務必尊重版權註明連結來源)
最後編修
2019-11-05 11:40:55 By 張○○
 

自動目錄

在Centos 7上安裝 nodejs 8和yarn

NODEJS 8 安裝

如果直接用 yum install yarn的話,你會得到一個6.x的版本,因此需要下載 repository[1]

# curl -sL https://rpm.nodesource.com/setup_8.x
# yum install nodejs

檢測是否安裝完畢

$ node -v

v8.16.2

YARN 安裝

yarn是一個套件管理程式,和npm或yum是一樣[3]

先下載repository 並放到指定的位置中[2]

# curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo

安裝

# yum install yarn

遇到驗證pkg key的話請按Y

檢測

# yarn -v

1.19.1

 

參考資料

[1] https://www.hugeserver.com/kb/install-nodejs8-centos7-debian8-ubuntu16/

[2] https://linuxize.com/post/how-to-install-yarn-on-centos-7/

[3] https://yarnpkg.com/lang/en/

END

你可能感興趣的文章

[bc] linux 的計算機bc 如何計算帶小數點的指數 用 bc 來計算帶小數點的指數,得轉個彎才行

SELinux 常用指令和檔案 在Redhat系列中,Centos5以後加入了selinux,他並沒有這麼可怕,不必每次看到Selinux ,就想把他

[Centos] Linux mount 掛載檔案時的使用者和SELINUX和權限處理 linux下使用mount來掛載目錄或磁碟,我們一般會使用這樣的指令 # mount /dev/sdc1 /home/h

[Centos7] HTTPS/SSL憑證的SELINUX設置 把申請來的憑證檔放到指定的位置後,沒辦法啟動,怎麼辦?

[Centos8] 校時ntpdate? 以前常用的ntpdate,在centos8竟然不見了?

[Centos7] SSL自簽憑證+APACHE+Selinux SSL的自簽憑證

隨機好文

為什麼要買長達二十年的保單? 為什麼要買長達二十年的保單?找一個可以說服我買二十年保單的理由。

維修冰箱 維修冰箱

NETCRAFT發現你的網站及作業系統 NETCRAFT可以發現你的網站及作業系統

海棉寶寶超泡杯演奏的sweet victory 章魚哥和海棉寶寶在超泡杯的演奏歌曲

[Wildfly10] 發佈war檔 deploy war file onto wildfly10