测试环境

  • 登入
ssh -i /data/fotacode/fota_test.pem ubuntu@ec2-3-16-47-228.us-east-2.compute.amazonaws.com
  • 传送文件
scp -i /data/fotacode/fota_test.pem -r /home/android/fotaNodeRespon/remote/weibiao/fotaservice_amason/ ubuntu@ec2-3-16-47-228.us-east-2.compute.amazonaws.com:/home/ubuntu/weibiao/
  • 安装nodejs与运行环境
    curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
    sudo apt-get install -y nodejs
    sudo cnpm install yarn -g
    sudo apt-get install build-essential
    yarn

ubuntu@ip-172-31-14-229:~/weibiao/fotaservice_amason$ chmod 755 fotaservice
ubuntu@ip-172-31-14-229:~/weibiao/fotaservice_amason$ chmod 755 fotaService.sh

sudo ln -s /home/ubuntu/weibiao/fotaservice_amason/fotaservice /etc/init.d/fotaservice
systemctl daemon-reload

sudo ./fotaservice restart