Monday, December 19, 2022

[Ubuntu] Cài đặt Nodejs theo Version mong muốn

Cài theo step by step

----Chuẩn bị

- sudo apt update

- sudo apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates

- curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -


Trong đường link download mình muốn dùng phiên bản bao nhiêu thì thế vào chổ {version-nodejs} như ví dụ bên dưới.


P/s: https://deb.nodesource.com/{version-nodejs}

example: https://deb.nodesource.com/setup_14.x


-----Cài đặt

- sudo apt -y install nodejs


Ví dụ: mình muốn chạy Nodejs vesion 12 thì như sau: rồi chạy lại lệnh "cài đặt"

curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -

 

No comments:

Post a Comment

[Ubuntu] Hướng dẫn cài LEM

  LEMP stack là một nhóm các phần mềm được sử dụng để tạo nên một web server xử lý ngôn ngữ PHP. Nhóm phần mềm này gồm hệ điều hành Linux, p...