[精讚] [會員登入]
1314

[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

你可能感興趣的文章

[CENTOS7 8] 查看記憶體 linux 中查看記憶體狀態指令整理

[CENTOS7/8] 安裝中文字型 如何在Centos7上安裝和移除中文字型?

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

[Oracle9] 查看磁碟檔案類型、掛載和uuid linux 如何查看掛載的磁碟類型?此文做個整理。

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

[BASH] 自建檔案拷背程式--把指定的檔案拷背到指定的位置。 Git 是很好用的版本控制程式,但我沒辦法使用。 原因就是資安。用SHELL自建簡易的GIT

隨機好文

HP SAS硬碟leds燈號說明 HP SAS硬碟leds燈號(hp g7/g6系統適用)說明

[Windows7] 移除IE10及移除IE11 Windows7 不得已的情況要移除IE11或IE10怎麼做?

魔球中小女孩唱的歌 The show 魔球中小女孩唱的歌 The show

APACHE的記錄檔格式 LogFormat 語法 在APACHE中有定義一些記錄的語法模版 在 /etc/httpd/conf/httpd.conf 中: LogForm

問問題 問問題其實內涵很深,我悟了很久才懂。 有人問題的目的並不一定是想要得到答案,有時只是純粹想問問題..