所在的位置: js >> js市场 >> NodeJS项目部署实战讲解

NodeJS项目部署实战讲解

中科白癜风医院爱心捐助 https://auto.qingdaonews.com/content/2018-06/26/content_20140182.htm

ubuntu1.位LTS

登录远端服务器

sshroot

ip

创建用户

#sudouseradd-m-d/home/sang-s/bin/bash-c"thesanguser"-Usang#passwdsangEnternewUNIXpassword:RetypenewUNIXpassword:passwd:passwordupdatedsuccessfully

useradd创建登录用户passwd设置用户登录密码赋予sudo权限

如果有必要使用sudu权限,请修改

#sudovi/etc/sudoers

复制root行改为sang即可

#Userprivilegespecificationroot  ALL=(ALL:ALL)ALLsang  ALL=(ALL:ALL)ALL

切换用户

#su-sanglspwd/home/sang

安装必备软件安装git

如果上面没有复制给sang账户sudo权限,请切换到root账户操作

sudoapt-getupdatesudoapt-getinstallgit

安装nginx

sudoapt-getinstallnginx

开机启动

sudoapt-getinstallsysv-rc-confsudosysv-rc-confnginxon

准备工作目录

mkdir-pworkspace/githubcdworkspace/github

安装nodejs安装nvm

curl-o-


转载请注明:http://www.aierlanlan.com/rzdk/7507.html

  • 上一篇文章:
  •   
  • 下一篇文章: