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

推荐订阅源

博客园 - Franky
C
CXSECURITY Database RSS Feed - CXSecurity.com
S
Schneier on Security
Know Your Adversary
Know Your Adversary
Security Latest
Security Latest
Spread Privacy
Spread Privacy
Project Zero
Project Zero
T
The Exploit Database - CXSecurity.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
AI
AI
N
News | PayPal Newsroom
A
Arctic Wolf
NISL@THU
NISL@THU
W
WeLiveSecurity
Security Archives - TechRepublic
Security Archives - TechRepublic
Hacker News: Ask HN
Hacker News: Ask HN
P
Palo Alto Networks Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
大猫的无限游戏
大猫的无限游戏
L
Lohrmann on Cybersecurity
Last Week in AI
Last Week in AI
T
Threatpost
The Last Watchdog
The Last Watchdog
博客园_首页
C
Cybersecurity and Infrastructure Security Agency CISA
酷 壳 – CoolShell
酷 壳 – CoolShell
量子位
Engineering at Meta
Engineering at Meta
爱范儿
爱范儿
aimingoo的专栏
aimingoo的专栏
S
Security Affairs
P
Privacy & Cybersecurity Law Blog
B
Blog RSS Feed
AWS News Blog
AWS News Blog
P
Proofpoint News Feed
雷峰网
雷峰网
T
Tenable Blog
Schneier on Security
Schneier on Security
H
Heimdal Security Blog
V2EX - 技术
V2EX - 技术
V
V2EX
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
Secure Thoughts
Latest news
Latest news
Help Net Security
Help Net Security
Jina AI
Jina AI
Stack Overflow Blog
Stack Overflow Blog
The Cloudflare Blog
V
Vulnerabilities – Threatpost
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org

小陈同学 - 脚本

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 许可协议。转载请注明来自小陈同学