Otu esi etinye NodeJS na NPM kacha ọhụrụ na Linux


N'ime ntuziaka a, anyị ga-eleba anya ka ị ga-esi tinye ụdị Nodejs na NPM kachasị ọhụrụ na nkesa RHEL, CentOS, Fedora, Debian, na Ubuntu.

Nodejs bụ ikpo okwu Javascript dị fechaa ma rụọ ọrụ nke ọma dabere na Chrome's V8 JavaScript engine na NPM bụ njikwa ngwugwu NodeJS ndabara. Ị nwere ike iji ya wuo ngwa netwọk nwere ike ibugharị.

  1. Otu esi etinye Node.js 14 na CentOS, RHEL na Fedora
  2. Otu esi etinye Node.js 14 na Debian, Ubuntu na Linux Mint

Ụdị Node.js na NPM kachasị ọhụrụ dị site na ebe nchekwa NodeSource Enterprise Linux, nke webụsaịtị Nodejs na-echekwa ma ị ga-achọ itinye ya na sistemụ gị ka ị nwee ike ịwụnye ngwugwu Nodejs na NPM kachasị ọhụrụ.

Ihe dị mkpa: Ọ bụrụ na ị na-eme ntọhapụ ochie nke RHEL 6 ma ọ bụ CentOS 6, ị nwere ike ịgụ maka ịgba ọsọ Node.js na distros ochie.

Ka ịgbakwunye ebe nchekwa maka ụdị Node.js 14.x kachasị ọhụrụ, jiri iwu a dị ka mgbọrọgwụ ma ọ bụ na-abụghị mgbọrọgwụ.

-------------- As root user -------------- 
# curl -sL https://rpm.nodesource.com/setup_14.x | bash -

-------------- A user with root privileges  --------------
$ curl -sL https://rpm.nodesource.com/setup_14.x | sudo bash -

Ọ bụrụ na ịchọrọ ịwụnye NodeJS 12.x, tinye ebe nchekwa ndị a.

-------------- As root user -------------- 
# curl -sL https://rpm.nodesource.com/setup_12.x | bash -

-------------- A user with root privileges  --------------
$ curl -sL https://rpm.nodesource.com/setup_12.x | sudo bash -

Ọ bụrụ na ịchọrọ ịwụnye NodeJS 10.x, tinye ebe nchekwa ndị a.

-------------- As root user -------------- 
# curl -sL https://rpm.nodesource.com/setup_10.x | bash -

-------------- A user with root privileges  --------------
$ curl -sL https://rpm.nodesource.com/setup_10.x | sudo bash -

Na-esote, ị nwere ike tinye Nodejs na NPM na sistemụ gị site na iji iwu dị n'okpuru:

# yum -y install nodejs
OR
# dnf -y install nodejs

Nhọrọ: Enwere ngwaọrụ mmepe dị ka gcc-c++ ma mee ka ọ dị gị mkpa ịnwe na sistemụ gị, iji wuo addons obodo site na npm.

# yum install gcc-c++ make
OR
# yum groupinstall 'Development Tools'

Ụdị Node.js na NPM kachasị ọhụrụ dịkwa site na ebe nchekwa NodeSource Enterprise Linux, nke webụsaịtị Nodejs na-echekwa ma ị ga-achọ itinye ya na sistemụ gị ka ị nwee ike ịwụnye ngwugwu Nodejs na NPM kachasị ọhụrụ.

------- On Ubuntu and Linux Mint ------- 
$ curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
$ sudo apt-get install -y nodejs

------- On Debian ------- 
# curl -sL https://deb.nodesource.com/setup_14.x | bash -
# apt-get install -y nodejs
------- On Ubuntu and Linux Mint ------- 
$ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
$ sudo apt-get install -y nodejs

------- On Debian ------- 
# curl -sL https://deb.nodesource.com/setup_12.x | bash -
# apt-get install -y nodejs
------- On Ubuntu and Linux Mint ------- 
$ curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
$ sudo apt-get install -y nodejs

------- On Debian ------- 
# curl -sL https://deb.nodesource.com/setup_10.x | bash -
# apt-get install -y nodejs

Nhọrọ: Enwere ngwaọrụ mmepe dị ka gcc-c++ ma mee ka ọ dị gị mkpa ịnwe na sistemụ gị, iji wuo addons obodo site na npm.

$ sudo apt-get install -y build-essential

Na-anwale Nodejs kacha ọhụrụ na NPM na Linux

Iji nweta nnwale dị mfe nke nodejs na NPM, ị nwere ike lelee ụdị arụnyere na sistemụ gị site na iji iwu ndị a:

# node --version
# npm --version
$ nodejs --version
$ npm --version

Nke ahụ bụ, Nodejs na NPM arụnyere ugbu a ma dịrị njikere maka ojiji na sistemụ gị.

Ekwenyere m na usoro ndị a dị mfe ma dị mfe ịgbaso mana ọ bụrụ na nsogbu ị chere ihu, ị nwere ike ime ka anyị mara ma anyị chọta ụzọ isi nyere gị aka. Enwere m olileanya na ntuziaka a baara gị uru ma na-echeta mgbe niile ka ị na-ejikọ na Tecment.