树洞剪藏#剪藏#树洞剪藏

互联网存档系统:ArchiveBox安装使用 - Forever Young

2024 年 12 月 2 日1 分钟
分享Twitter / XTelegram微博
互联网存档系统:ArchiveBox安装使用 - Forever Young 封面

同步来源:树洞剪藏 源站剪藏 ID:185 原文地址:https://www.luxiyue.com/server/%E4%BA%92%E8%81%94%E7%BD%91%E5%AD%98%E6%A1%A3%E7%B3%BB%E7%BB%9F%EF%BC%9Aarchivebox%E5%AE%89%E8%A3%85%E4%BD%BF%E7%94%A8/

打开原文 · 打开源站剪藏快照


互联网存档系统:ArchiveBox安装使用 - Forever Young

跳至内容

[email protected]

Forever Young

Share Happiness,Enjoy Life~

Home Server Personal OpenWrt Knowledge Music Files

Forever Young

Share Happiness,Enjoy Life~

Home Server Personal OpenWrt Knowledge Music Files

互联网存档系统:ArchiveBox安装使用

文章目录 [ hide ] 1 简介 2 前期准备 3 安装 3.1 一键安装 3.2 手动安装 4 运行 5 扩展 5.1 反向代理 5.2 后台运行 6 最后

简介

ArchiveBox 是一个用Python编写的自托管且功能强大的互联网存档解决方案,是可用于Linux、macOS和Windows系统的跨平台工具。

它使您能够收集、保存和查看要脱机保存的站点,当前ArchiveBox可以设置为命令行工具、桌面应用程序或通过web访问,可以把你想静态化的任何网站进行静态化,包括文本、图片、PDF 甚至视频。

Github地址: https://github.com/ArchiveBox/ArchiveBox/

官方网站: https://archivebox.io/

前期准备

由于pip命令无法使用root权限运行,需要添加一个普通带sudo权限的账号:

adduser archivebox && usermod -a archivebox -G sudo && su archivebox

Copy

安装

一键安装

curl -sSL 'https://get.archivebox.io' | sh

Copy

手动安装

这边以Ubuntu为例,其他系统可以参考: 官方手动安装文档 ,更好的方式还是Docker。

安装依赖

sudo apt install python3 python3-pip python3-distutils git wget curl youtube-dl sudo apt install chromium-browser

Copy

安装archivebox

python3 -m pip install --upgrade archivebox

Copy

警告

WARNING: The script sqlformat is installed in '/home/allen/.local/bin' which is not on PATH . Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script pygmentize is installed in '/home/allen/.local/bin' which is not on PATH . Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script normalizer is installed in '/home/allen/.local/bin' which is not on PATH . Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script django-admin is installed in '/home/allen/.local/bin' which is not on PATH . Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The scripts ipython and ipython3 are installed in '/home/allen/.local/bin' which is not on PATH . Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script dateparser-download is installed in '/home/allen/.local/bin' which is not on PATH . Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script archivebox is installed in '/home/allen/.local/bin' which is not on PATH . Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

Copy

解决方案:

执行命令:

echo 'export PATH=/home/allen/.local/bin:$PATH' >> ~/.bashrc

Copy

将黄色警告部分提示的路径复制添加在 export PATH= 后面的, 你需要把你的黄色警告提示的路径复制粘贴替换.

然后再重新安装:

python3 -m pip install --upgrade archivebox

Copy

运行

初始化:

mkdir /home/allen/data && cd /home/allen/data archivebox init

Copy

创建管理员账户:

archivebox manage createsuperuser

Copy

我的密码设置太简单出现红色的警告。

启动服务:

archivebox server 0.0 .0.0:8000

Copy

浏览器打开,正常访问。

点击上面的 ADD ,添加 URL 地址:

等待抓取:

一段时间后可以看到抓取成功:

扩展

反向代理

Nginx的简单配置:

server { listen 80 ; listen [::]:80 ; server_name archivebox.yydnas.cn ; index index.php index.html index.htm ;

location / { proxy_pass http://localhost:8000 ; proxy_set_header Host $host ; proxy_set_header X-Real-IP $remote_addr ; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ; proxy_set_header X-Forwarded-Proto $scheme ; proxy_set_header REMOTE-HOST $remote_addr ; } }

Copy

后台运行

程序默认是在终端中运行,最简单的是运行以下命令:

nohup archivebox server 0.0 .0.0:8000 &> /dev/null &

Copy

也可以创建一个名为 start-archivebox.sh ,放在你的 archivebox 目录,内容如下:

#!/bin/bash

ps -aux | grep "archivebox server" | grep -v grep > /dev/null if [ " ${?} " == "0" ] ; then

echo archivebox is running

exit 1 fi

ABPath = /home/allen/data #替换为你的安装目录 ABPort = 8000

if [ -f ${ABPath} /ArchiveBox.conf ] ; then cd ${ABPath} nohup archivebox server 0.0 .0.0: ${ABPort} &> /dev/null & exit 0 fi

exit 2

Copy

运行: bash start-archivebox.sh 。

这个是参考的知乎上面的一篇文章 开源的私人档案馆ArchiveBox简介,及二段补强

最后

这只是最简单的安装,更多的使用方法请查阅 ArchiveBox Usage 。

不过这个程序好像无法设置语言,默认就是英文界面,但是由于界面元素不多,正常使用肯定是没有问题的。

Post navigation

← 前一篇文章 后一篇文章 →

相关文章

VuePress2详细安装流程

04/04/2023

文章目录1 介绍2 依赖环境3 安装3.1 步骤 1: 创建并进入一个新目录3.2 步骤 2: 初始…

阅读更多»

开源RSS聚合程序:FreshRSS安装使用

03/24/2023

文章目录1 简介2 需求3 下载4 配置4.1 数据库(2选1)4.2 服务器4.3 注意事项5 访…

阅读更多»

VMware虚拟机安装群晖DSM

03/23/2023

文章目录1 前言2 前期准备3 制作引导4 虚拟机配置5 安装引导6 安装群晖7 最后 前言 大名鼎…

阅读更多»

Wallabag安装使用(Ubuntu平台原生搭建教程,非Docker)

03/23/2023

文章目录1 简介2 前期准备3 下载4 安装5 服务器配置6 访问7 本地保存图片8 扩展应用9 最…

阅读更多»

0 0 投票数

文章评分

订阅评论

Label

{} [+]

名字*

邮箱

0 评论

Forever Young©2024

0 0

滚动至顶部

相关文章