[精讚] [會員登入]
1632

[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

你可能感興趣的文章

[Centos] 安裝及使用postfix,設定虛擬帳號及轉寄 使用postfix來設定虛擬帳號及轉寄

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

[Rocky9] codeignitor4+ php:8.3-apache + docker compose 這次的目標是把服務裝在docker,裡面放入php8.3-apache的 docker container, 並採用codeignitor4作基礎的設置。

[CentOS] 新增修改及刪除使用者 新增、修改、刪除使用者和群組

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

[Centos7] 安裝apache+php7+mariadb10+selinux Centos7 安裝apache+php7+mariadb10+selinux

隨機好文

Linux shell 的date表示法 linux下SHELL中的date表示法

[PHP] 檢查IP是否在某個網段內 mtachcidr 要檢查IP是否在某個網段內,要寫幾行?10行?5行? 不用,只要2行。以下是我寫的 code /** * matchCI

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

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

[AS3] 物件加上超連結的方法 物件加上超連結,可讓使用者點擊的方法