鲲鹏920_ARM架构服务器上运行NodeJS
Posted 没刮胡子
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了鲲鹏920_ARM架构服务器上运行NodeJS相关的知识,希望对你有一定的参考价值。
安装NodeJS
[root@kunpeng opt]# yum install nodejs
Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Determining fastest mirrors
base | 3.6 kB 00:00:00
docker-ce-stable | 3.5 kB 00:00:00
epel | 5.4 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
updates/7/aarch64/primary_db | 2.1 MB 00:00:00
Resolving Dependencies
--> Running transaction check
---> Package nodejs.aarch64 1:6.17.1-1.el7 will be installed
--> Processing Dependency: npm = 1:3.10.10-1.6.17.1.1.el7 for package: 1:nodejs-6.17.1-1.el7.aarch64
--> Processing Dependency: libuv >= 1:1.9.1 for package: 1:nodejs-6.17.1-1.el7.aarch64
--> Processing Dependency: libicudata.so.50()(64bit) for package: 1:nodejs-6.17.1-1.el7.aarch64
--> Processing Dependency: libicui18n.so.50()(64bit) for package: 1:nodejs-6.17.1-1.el7.aarch64
--> Processing Dependency: libicuuc.so.50()(64bit) for package: 1:nodejs-6.17.1-1.el7.aarch64
--> Processing Dependency: libuv.so.1()(64bit) for package: 1:nodejs-6.17.1-1.el7.aarch64
--> Running transaction check
---> Package libicu.aarch64 0:50.2-4.el7_7 will be installed
---> Package libuv.aarch64 1:1.30.1-1.el7 will be installed
---> Package npm.aarch64 1:3.10.10-1.6.17.1.1.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===========================================================================================================================================================================
Package Arch Version Repository Size
===========================================================================================================================================================================
Installing:
nodejs aarch64 1:6.17.1-1.el7 epel 4.5 M
Installing for dependencies:
libicu aarch64 50.2-4.el7_7 base 6.8 M
libuv aarch64 1:1.30.1-1.el7 epel 132 k
npm aarch64 1:3.10.10-1.6.17.1.1.el7 epel 2.5 M
Transaction Summary
===========================================================================================================================================================================
Install 1 Package (+3 Dependent packages)
Total download size: 14 M
Installed size: 51 M
Is this ok [y/d/N]: y
Downloading packages:
(1/4): libuv-1.30.1-1.el7.aarch64.rpm | 132 kB 00:00:00
(2/4): npm-3.10.10-1.6.17.1.1.el7.aarch64.rpm | 2.5 MB 00:00:00
(3/4): libicu-50.2-4.el7_7.aarch64.rpm | 6.8 MB 00:00:05
(4/4): nodejs-6.17.1-1.el7.aarch64.rpm | 4.5 MB 00:00:15
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 931 kB/s | 14 MB 00:00:15
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 1:libuv-1.30.1-1.el7.aarch64 1/4
Installing : libicu-50.2-4.el7_7.aarch64 2/4
Installing : 1:npm-3.10.10-1.6.17.1.1.el7.aarch64 3/4
Installing : 1:nodejs-6.17.1-1.el7.aarch64 4/4
Verifying : libicu-50.2-4.el7_7.aarch64 1/4
Verifying : 1:libuv-1.30.1-1.el7.aarch64 2/4
Verifying : 1:nodejs-6.17.1-1.el7.aarch64 3/4
Verifying : 1:npm-3.10.10-1.6.17.1.1.el7.aarch64 4/4
Installed:
nodejs.aarch64 1:6.17.1-1.el7
Dependency Installed:
libicu.aarch64 0:50.2-4.el7_7 libuv.aarch64 1:1.30.1-1.el7 npm.aarch64 1:3.10.10-1.6.17.1.1.el7
Complete!
[root@kunpeng opt]#
准备好要运行的nodejs项目
存放到/opt/nodejs_pro目录下
安装依赖
cd /opt/nodejs_pro/
npm install
[root@kunpeng-centos nodejs_pro]# cd /opt/nodejs_pro/
[root@kunpeng-centos nodejs_pro]# npm install
npm WARN deprecated xmldom@0.4.0: Deprecated due to CVE-2021-21366 resolved in 0.5.0
CollaboraOnlineIntegrationExample@0.1.0 /opt/nodejs_pro
├─┬ body-parser@1.19.0
│ ├── bytes@3.1.0
│ ├── content-type@1.0.4
│ ├── depd@1.1.2
│ ├─┬ http-errors@1.7.2
│ │ ├── inherits@2.0.3
│ │ ├── setprototypeof@1.1.1
│ │ ├── statuses@1.5.0
│ │ └── toidentifier@1.0.0
│ ├─┬ iconv-lite@0.4.24
│ │ └── safer-buffer@2.1.2
│ ├─┬ on-finished@2.3.0
│ │ └── ee-first@1.1.1
│ ├── qs@6.7.0
│ ├─┬ raw-body@2.4.0
│ │ └── unpipe@1.0.0
│ └─┬ type-is@1.6.18
│ ├── media-typer@0.3.0
│ └─┬ mime-types@2.1.32
│ └── mime-db@1.49.0
├─┬ cookie-parser@1.4.5
│ ├── cookie@0.4.0
│ └── cookie-signature@1.0.6
├─┬ debug@2.6.9
│ └── ms@2.0.0
├─┬ express@4.16.4
│ ├─┬ accepts@1.3.7
│ │ └── negotiator@0.6.2
│ ├── array-flatten@1.1.1
│ ├─┬ body-parser@1.18.3
│ │ ├── bytes@3.0.0
│ │ ├── http-errors@1.6.3
│ │ ├── iconv-lite@0.4.23
│ │ └── raw-body@2.3.3
│ ├── content-disposition@0.5.2
│ ├── cookie@0.3.1
│ ├── encodeurl@1.0.2
│ ├── escape-html@1.0.3
│ ├── etag@1.8.1
│ ├─┬ finalhandler@1.1.1
│ │ └── statuses@1.4.0
│ ├── fresh@0.5.2
│ ├── merge-descriptors@1.0.1
│ ├── methods@1.1.2
│ ├── parseurl@1.3.3
│ ├── path-to-regexp@0.1.7
│ ├─┬ proxy-addr@2.0.7
│ │ ├── forwarded@0.2.0
│ │ └── ipaddr.js@1.9.1
│ ├── qs@6.5.2
│ ├── range-parser@1.2.1
│ ├── safe-buffer@5.1.2
│ ├─┬ send@0.16.2
│ │ ├── destroy@1.0.4
│ │ ├─┬ http-errors@1.6.3
│ │ │ └── setprototypeof@1.1.0
│ │ ├── mime@1.4.1
│ │ └── statuses@1.4.0
│ ├── serve-static@1.13.2
│ ├── setprototypeof@1.1.0
│ ├── statuses@1.4.0
│ ├── utils-merge@1.0.1
│ └── vary@1.1.2
├─┬ morgan@1.9.1
│ ├── basic-auth@2.0.1
│ └── on-headers@1.0.2
├── xmldom@0.4.0
└── xpath@0.0.32
[root@kunpeng nodejs_pro]#
启动程序
npm start
以上是关于鲲鹏920_ARM架构服务器上运行NodeJS的主要内容,如果未能解决你的问题,请参考以下文章