1、在window下编写的sh脚本,在Linux上执行报错:/bin/sh^M: bad interpreter: No such file or directory 

  原因:.sh脚本在windows系统下用记事本文件编写的。不同系统的编码格式引起的。

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。   解决方法:修改.sh文件格式      (1)使用vi工具            vi start.sh       (2)利用如下命令查看文件格式            :set ff 或 :set fileformat         可以看到如下信息            fileformat=dos 或 fileformat=unix         (3) 利用如下命令修改文件格式            :set ff=unix 或 :set fileformat=unix            :wq (存盘退出)

   参考:https://www.cnblogs.com/felixzh/p/6108345.html

2、windows无法访问Linux上的服务

  https://blog.csdn.net/baidu_32045201/article/details/79332504

  开启防火墙:

  1、开启8080端口:

  firewall-cmd --zone=public --add-port=8080/tcp --permanent

  2、然后重启防火墙:

  firewall-cmd --reload
扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄