惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Secure Thoughts
Security Latest
Security Latest
Simon Willison's Weblog
Simon Willison's Weblog
O
OpenAI News
GbyAI
GbyAI
L
LINUX DO - 最新话题
A
Arctic Wolf
T
Tor Project blog
G
GRAHAM CLULEY
I
InfoQ
博客园_首页
IT之家
IT之家
The Register - Security
The Register - Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
The GitHub Blog
The GitHub Blog
Blog — PlanetScale
Blog — PlanetScale
N
Netflix TechBlog - Medium
K
Kaspersky official blog
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
U
Unit 42
PCI Perspectives
PCI Perspectives
量子位
P
Palo Alto Networks Blog
S
Securelist
T
Troy Hunt's Blog
博客园 - 【当耐特】
Recorded Future
Recorded Future
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Security Affairs
Engineering at Meta
Engineering at Meta
T
The Blog of Author Tim Ferriss
博客园 - 聂微东
罗磊的独立博客
N
News and Events Feed by Topic
人人都是产品经理
人人都是产品经理
B
Blog RSS Feed
NISL@THU
NISL@THU
C
Cisco Blogs
T
Threatpost
有赞技术团队
有赞技术团队
Forbes - Security
Forbes - Security
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
T
The Exploit Database - CXSecurity.com
Cloudbric
Cloudbric
Cyberwarzone
Cyberwarzone
Google DeepMind News
Google DeepMind News
C
Cyber Attacks, Cyber Crime and Cyber Security

小陈同学 - 脚本

FFmpeg 从入门到熟练:玩转视频剪辑、压缩与滤镜的神级工具 PIP 更换国内安装源 Conda安装与镜像源配置 Python 绘制古风山水画 vi/vim 编辑器使用
Liunx系统安装node和pm2
Caleb · 2020-02-05 · via 小陈同学 - 脚本

在Linux服务器上,通过nvm安装指定Node版本,并用npm全局部署PM2及日志插件,实现Node环境快速就绪。

内容简介,购买了 Linux 系统的服务器,需要安装 node 一系列的工具。几行命令快速安装。

初始化

1.安装 nvm

nvm 是 node 版本管理工具

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash

在安装后,记得退出服务器,然后重新登录进来

2.安装 node

nvm install 10.15.3

3.安装 pm2

pm2 是一个进程管理工具,可以用它来管理你的 node 进程,并查看 node 进程的状态,当然也支持性能监控,进程守护,负载均衡等功能

npm install pm2 -g

4.安装 pm2-logrotate

pm2-logrotate 可以理解为是一个 pm2 的插件,它扩充了 pm2 本身没有功能:日志管理

pm2 install pm2-logrotate

最后

此时就完成 node 和 pm2 的安装,然后就可以使用两个工具加载自己的网站程序。

作者: 文章链接: https://reinness.com/posts/76 版权声明:  本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自小陈同学