httrack是一款免费的网站镜像程序,简单理解就是可以在网站结构(网页及一些主要信息文件),下载到本地,可离线浏览,我是按照搭建成功后的console直译过来的
下面说下安装:
我都是在Linux环境下安装的:
centos7下安装:
#wget http://download.httrack.com/httrack-3.46.1.tar.gz #tar -xzvf httrack-3.46.1.tar.gz #cd httrack-3.46.1 #./configure #make #make install
如果安装没有报错,输入命令httrack 验证如下
如果你也遇到和我一样的报错如下:
别慌,我度娘查了下,才知道 linux 安装库 编译提示-lcrypto 无法链接,缺少 crypto 库
附上解决方案:
crypto 基于openssl,决定安装openssl-devel #yum install openssl openssl-devel
centos安装部分完
下面是ubuntu安装httrack
sudo apt-get install webhttrack
一步即可,urbuntu部分完
下面解释下httrack使用
命令行下运行httrack的方法
#httrack
Welcome to HTTrack Website Copier (Offline Browser) 3.46+libhtsjava.so.2
Copyright (C) Xavier Roche and other contributors
To see the option list, enter a blank line or try httrack –help
Enter project name :
//输入项目名称,程序会自动生成一个项目名称的目录
Base path (return=/root/websites/) :
//本地保存路径及目录,请输入一个本地的路径.
Enter URLs (separated by commas or blank spaces) :
//欲抓取的网站地址,这里我们以 https://www.dnspod.cn/ 演示
Action:
(enter) 1 Mirror Web Site(s)
2 Mirror Web Site(s) with Wizard
3 Just Get Files Indicated
4 Mirror ALL links in URLs (Multiple Mirror)
5 Test Links In URLs (Bookmark Test)
0 Quit
:
//抓取模式选项,选项汉化过来的意思是
行动:
(进入)1镜像网站(的)
2镜像网站(S)与向导
3只获得文件中声明的文件
4镜在URL中所有的链接(多镜)
5在URL链接(书签测试)的测试
0退出
//这里我选择2
侦察【减少与目标系统交互】
Proxy (return=none) :
//是否使用代理,我没有用代理,直接回车.
##可到此网站获取代理:hidemyass.com【免费代理需小心】
You can define additional options, such as recurse level (-r), separed by blank spaces
To see the option list, type help
Additional options (return=none) :
//抓取选项,输入help可以查阅详细参数,这里我直接回车
—> Wizard command line: httrack https://www.dnspod.cn/ -W -O “/home/RucLinux/DNSPod” -%v
Ready to launch the mirror? (Y/n) :
//输入 Y 回车
WARNING! You are running this program as root!
It might be a good idea to use the -%U option to change the userid:
Example: -%U smith
Mirror launched on Mon, 04 Mar 2013 02:35:02 by HTTrack Website Copier/3.46+libhtsjava.so.2 [XR&CO’2010]
mirroring https://www.dnspod.cn/ with the wizard help..
Done.
Thanks for using HTTrack!
*
//操作完毕