下载 perl 脚本,形成转换管道,生成 HTML 文件:
$ cd /opt
$ git clone git://github.com/bagder/roffit.git
$ cd roffit
$ mkdir -p /var/www/html/man
$ zcat /usr/share/man/man1/scp.1.gz \
| perl roffit \
| sudo tee /var/www/html/man/scp.1.html
$ ls /var/www/html/man/scp.1.html
$ yum -y install httpd
$ service httpd start
$ curl localhost
虚机 IP 是 192.168.73.101,在 windows 下用浏览器访问地址:http://192.168.73.101/man/scp.1.html 即可。
$ man scp > /var/www/html/man/scp.txt
然后再浏览器下用浏览器访问地址:http://192.168.73.101/man/scp.txt 即可。只是纯文本,格式差一些。

