[精讚] [會員登入]
1194

[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

你可能感興趣的文章

[Linux] 怎麼修改終端機console下ls的顏色? 在linux下的ls使用--color的參數時,雖然目錄有上色,但是顏色是深藍色很難辨識,要怎麼修改呢?

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

[Centos] 查看網路的流量 介紹 sar, iftop, nethogs, 和 vnstat 等流量監控程式

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

[postfix] open /etc/postfix/main.cf: Permission denied 等錯誤 遇到開啟 /etc/postfix/main.cf: Permission denied 等錯誤解決

[CENTOS8] Failed to download metadata for repo 'appstream' 的問題 Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist的解決方法。

我有話要說

>>

限制:留言最高字數1000字。 限制:未登入訪客,每則留言間隔需超過10分鐘,每日最多5則留言。

訪客留言

[無留言]

隨機好文

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

TFTP Server 安裝及使用 讓設備的網路設定檔或是韌體經由TFTP拷備出來,操作的方法

[CodeIgniter3] 解決無法上傳特定檔案(.sb2)的問題 上傳時出現The filetype you are attempting to upload is not allowed,要怎麼解決?

[NetBeans] 使用git複製別人的專案 NetBeans使用git複製別人的專案及版本控制

[PHP]解決ksort新增的SORT_NATURAL|SORT_FLAG_CASE方法 php>=5.4中ksort函數多了SORT_NATURAL 和 SORT_FLAG_CASE 旗標,對舊版的PHP中要怎麼辦?