阿里云ECS服务器部署Dart服务端程序

pub global activate [package]

Instead of this:

export PATH="$PATH":"~/.pub-cache/bin"

It should be

export PATH="$PATH:$HOME/.pub-cache/bin"




1.Dart服务端绑定域名为ECS的内部IP:172.31.213.9(自己的服务器内网IP)

io.serve(handler, '172.31.213.9', 80).then((server) {
    print('Serving at http://${server.address.host}:${server.port}');
  });

2.安全组策略开启80/TCP端口。

3.查看线程 ps -ef

4.杀死线程 $ kill -s 9 1827

其中-s 9 制定了传递给进程的信号是9,即强制、尽快终止进程。各个终止信号及其作用见附录。

1827则是上面ps查到的Dart服务的PID。

猜你喜欢

转载自yq.aliyun.com/articles/673817
今日推荐