Install Yarm-PM2 under Ubuntu

First open the official website of yarm. https://www.yarnpkg.com/zh-Hant/

(1) The official installation method of yarn:

  1. Install Yarn through the Debian package and paste the following command
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main"| sudo tee /etc/apt/sources.list.d/yarn.list
  1. Next, you can simply use the following instructions to install:
sudo apt-get update && sudo apt-get install yarn
  1. Yarn is installed at this point, but the server is abroad, which may be restricted by the network in later use, so we switch to Ali's server. The effect diagram is as follows:
yarn config set registry https://registry.npm.taobao.org 

(Two) install PM2

  1. We execute the following command to perform a global installation of pm2:
 npm install vue-cli pm2 -g
  1. After the installation is complete, we run the server.js written in the previous article.

Here to talk about it, once the js running through the node command is closed or unexpectedly ended, we cannot continue to access it. So we need to increase stability through pm2.

 pm2 start server.js

The rendering after successful operation is as follows:

If you are successful here, you don't need to read down. If the installation of pm2 fails, continue to read down.

Before, I kept making errors when configuring the environment on ubuntu14.04, and finally I came up with a set of commands, which can be installed normally. You can test it yourself.

(3) Installation failure resolution#

  1. First of all, since the installation failed, you must remove the previous installation. The code is as follows:
sudo apt remove cmdtest
sudo apt remove yarn
  1. After the removal is complete, follow the installation tutorial on the official website here, the code is as follows:
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main"| sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update
sudo apt install yarn
yarn config set registry https://registry.npm.taobao.org 
  1. Don't ask why when you get here, copy and paste and run:
1 apt-get update
2 apt-get install apt-transport-https
3 curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -4 echo "deb https://dl.yarnpkg.com/debian/ stable main"| tee /etc/apt/sources.list.d/yarn.list
5 apt-get update
6 apt-get install yarn
7 npm cache clean --force
8 npm install -g ionic cordova
9 npm install vue-cli pm2 -g
  1. If the normal error is resolved.

Finally, record the following commonly used pm commands:

Recommended Posts

Install Yarm-PM2 under Ubuntu
Install apache+PHP under Ubuntu
Install node.js under Ubuntu
Install python3.6 under Ubuntu 16.04
Install Thrift under ubuntu 14.10
Install OpenJDK10 under Ubuntu
Install Caffe under Ubuntu 14.04
2018-09-11 Install arduino under Ubuntu
Install ROS under ROS Ubuntu 18.04[2]
Install MySQL under Ubuntu
Install server-side Shadowsocks under Ubuntu 16.04
Install rgl package under Ubuntu
Install 3 single-cell R packages under Ubuntu
Install and deploy Gerrit under Ubuntu
Install MySQL under Ubuntu 18.04 (graphic tutorial)
Install JDK1.8 original under Ubuntu Kylin
Small tool: install screenshot tool under ubuntu
Install nodejs and npm under Ubuntu 16.04
How to install Audacious under Ubuntu
How to install Tensorflow under ubuntu 16.04
Compile and install QEMU under Ubuntu
ubuntu18.04 install python2
ubuntu18.04 install docker
Ubuntu install guide
ubuntu install nodejs
ubuntu 16 install asp.net
ubuntu install leanote
ubuntu install Jenkins
docker install ubuntu
ubuntu install elasticsearch
ubuntu16.0.1 install pagoda
ubuntu18.04 install python
ubuntu 18.04 install teamviewer
ubuntu install sendmail
Install linux (ubuntu) dual system under windows system
Install YouCompleteMe plugin for vim under Ubuntu
Install PyTesser under ubuntu 14.04 for OCR recognition
Install Ubuntu with Parallels Desktop under Mac
Three ways to install software under Ubuntu
Install utility software collection under Ubuntu system
install vscode on ubuntu18
How to install vim editor under Linux (Ubuntu 18.04)
Install mysql-pytho in Ubuntu
ubuntu install zsh terminal
Install Redis on Ubuntu
Install R4 on ubuntu20
Install nvtop on Ubuntu 18.04
Install postgresql-10 on Ubuntu 18.04
Install docker on Ubuntu
Install mysql5.7 under CentOS7
Ubuntu18.04 install opencv 3.2.0 solution
Install ActiveMQ under Centos7
Python MySQLd under Ubuntu
Install Docker on ubuntu18.04
Install nodejs10 on Ubuntu16
Install PostgreSQL12 under CentOS7
Install the old version of seurat under Ubuntu
Install CentOS under VMware
The solution to the failure to install .deb under Ubuntu 16.04
Install mysql on Ubuntu 14.04
Ubuntu16.04 install Mongodb tutorial