1.添加nodejs的repository curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash - 2.安裝nodejs yum install nodejs