Ubuntu下部署NodeJS
2017-06-05 本文已影响14人
little阿飞
1.安装node.js
sudo apt-get install -y nodejs
2.配置mysql
(1) 安装mysql
sudo apt-get install mysql-server mysql-client
(2) 检测mysql是否安装正确
sudo netstat -tap | grep mysql
tcp 0 0 localhost:mysql : LISTEN 26393/mysqld
3.配置nginx
(1) 安装nginx
sudo apt-get install nginx
(2) 修改nginx配置反向代理nodejs
cd /etc/nginx/sites-enabled
vi default
具体修改查看:http://blog.jyootai.com/blog/2015/05/21/nodejs-product-environment-deploy.html
nginx -t //查看nginx配置是否正确