[精讚] [會員登入]
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

你可能感興趣的文章

[Linux] 使用tarball安裝下載PERL的tar檔模組 在Linux下,perl下載的pm模組,不使用cpan的安裝方法

[Centos8] PHP7.2升級到7.4 在centos8中把php 7.2升到7.4版

[Rocky9+Docker] Mariadb Cluster + HAPROXY + Docker compose 把mariadb多個節點放在同一個docker中建立叢集的作法到底可不可行?

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

[Centos] opentftp + selinux 安裝及設定 Centos 安裝微型ftp伺服器:tftp伺服器

[CentOS 8] 無法使用: No URLs in mirrorlist error Centos8 沒辦法使用yum安裝軟體的解決方法

隨機好文

使用Google尋找你的手機 這近發現google竟然可以用來找android的手機,而且不需要經過什麼設定或安裝軟體。

[MAC] 截取螢幕畫面的方法 截取螢幕畫面的方法,在MAC中叫作螢幕快照,英文是screenshot

UTF-8 BOM (Byte Order Mark) 的問題 在 Michael Kaplan 那看到 Every character has a story #4: U+feff

Smarty安裝 smarty 是著名的樣版引擎,非常的好用,用多了突然發現拿掉smarty反而不會寫php了,以下是安裝過程..

[CodeIgniter 3] 資料庫的使用方法整理1/2 --Select的使用 [CodeIgniter 3] 資料庫的使用方法整理:Select的使用