能ping通的机器间传文件,快速搭建http服务

在 Linux 服务器上或安装了 Python 的机器上,可以使用 nohup python -m SimpleHTTPServer [port] & 快速搭建一个http服务。

在 Linux 服务器上或安装了 Python 的机器上,Python自带了一个WEB服务器 SimpleHTTPServer。

我们可以很简单的使用  python -m SimpleHTTPServer 快速搭建一个http服务,提供一个文件浏览的web服务。

命令如下:

python -m SimpleHTTPServer

python -m SimpleHTTPServer 8000

在另一个服务器上

wget http://ip:8000/文件名

wget http://10.16.128.15:8000/test.log

 或者在浏览器上

http://10.16.128.15:8000/

能ping通的机器间传文件,快速搭建http服务_第1张图片

这样就能在浏览器上浏览文件系统,下载也很方便

 

你可能感兴趣的:(能ping通的机器间传文件,快速搭建http服务)