私人网盘搭建及固定公网ip配置
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">直接说技术:owncloud(docker)+frps反向代理(想要公网ip<span style="color: black;">必须</span>一个固定ip的轻量服务器)。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">问:限速?</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">答:私人云,</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">问:<span style="color: black;">能够</span>在线看网盘视频吗?</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">答:网页端部分<span style="color: black;">能够</span>,app都<span style="color: black;">能够</span>。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">问:<span style="color: black;">能够</span>用从互联网<span style="color: black;">拜访</span>网盘吗?</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">答:反向代理后<span style="color: black;">能够</span>随便<span style="color: black;">拜访</span>。</p>
<h2 style="color: black; text-align: left; margin-bottom: 10px;"><span style="color: black;">过程</span>:</h2>
<h3 style="color: black; text-align: left; margin-bottom: 10px;"><span style="color: black;">1、</span>安装Linux(ubuntu/centos均可)</h3>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">注:笔者是直接装了双系统,不想装双系统的<span style="color: black;">亦</span><span style="color: black;">能够</span>用windows的WSL虚拟一个ubuntu,<span style="color: black;">然则</span>我不<span style="color: black;">举荐</span>(wsl容易出问题,还要折腾)。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">1.下载iso文件。2.制作<span style="color: black;">起步</span>盘。3.自定义安装。</p>
<h3 style="color: black; text-align: left; margin-bottom: 10px;"><span style="color: black;">2、</span>配置owncloud</h3>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">注:owncloud是一个带<span style="color: black;">拜访</span>界面的网盘服务器端软件,直接装比较麻烦,笔者<span style="color: black;">举荐</span>docker傻瓜式安装。docker<span style="color: black;">便是</span>linux下再开一个linux虚拟机,<span style="color: black;">然则</span>这个虚拟机非常轻量<span style="color: black;">况且</span>是完全<span style="color: black;">按照</span>需求配置好的,<span style="color: black;">没</span>需折腾。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">1. 配置 docker服务</p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><span style="color: black;"># 不挂梯子<span style="color: black;">意见</span>先换源,否则下载速度堪忧</span>
sudo apt-get install docker docker.io <span style="color: black;"># <span style="color: black;">倘若</span>是 centos <span style="color: black;">自动</span>换成 yum</span>
service docker start <span style="color: black;"># 开启 docker 服务</span>
docker pull owncloud <span style="color: black;"># 下载配置好的 owncloud docekr 镜像,<span style="color: black;">重视</span><span style="color: black;">这儿</span>的概念是镜像而不是容器</span></div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">2. 创建映射目录</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">把 docker 容器的数据目录映射到指定目录(<span style="color: black;">这儿</span>自定义了 /data/docker/owncloud)</p>
<div style="color: black; text-align: left; margin-bottom: 10px;">sudo mkdir -p /data/docker/owncloud</div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">3. 开启 docker 容器(<span style="color: black;">按照</span><span style="color: black;">刚才</span>的镜像开启一个虚拟机容器)</p>
<div style="color: black; text-align: left; margin-bottom: 10px;">docker run -itd <span style="color: black;">\
</span>--restart always <span style="color: black;">\
</span>-p <host port>:<docker port> <span style="color: black;">\
</span>--name <container name><span style="color: black;">\
</span>-v /data/docker/owncloud:/var/www/html owncloud
<span style="color: black;"># -d 是以后台形式<span style="color: black;">起步</span></span>
<span style="color: black;"># --restart always:开机自动<span style="color: black;">起步</span>容器</span>
<span style="color: black;"># -p <host port>:<docker port> :端口映射,将宿主机端口映射到容器端口,<span style="color: black;">意见</span>host port用80端口,例:8001:80</span>
<span style="color: black;"># --name:设定容器名<span style="color: black;">叫作</span>,<span style="color: black;">这儿</span><span style="color: black;">便是</span>owncloud</span>
<span style="color: black;"># -v /data/docker/nextcloud:/var/www/html:将容器中项目的 /var/www/html 数据目录映射到本地的 /data/docker/owncloud</span>
<span style="color: black;"># owncloud:<span style="color: black;">刚才</span>下载的 docker 镜像</span>
docker ps -a <span style="color: black;"># <span style="color: black;">能够</span>看一下容器</span>
</div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">4. 本地网盘搭建完成</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">同路由<span style="color: black;">构成</span>的以太网内,浏览器输入 <span style="color: black;">http://IP:</span><host port><span style="color: black;">/</span> <span style="color: black;">拜访</span>,提示新建账户<span style="color: black;">暗码</span>,创建就行,下面的选项默认就行不想折腾就不管(sql)</p>
<div style="color: black; text-align: left; margin-bottom: 10px;">ifconfig<span style="color: black;"># 查看 ip</span>
sudo apt-get install net-tools <span style="color: black;"># <span style="color: black;">倘若</span><span style="color: black;">无</span> ifconfig 命令</span></div>
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://pic1.zhimg.com/80/v2-26e121ffce5135cad0560f1a2fdf296c_720w.webp" style="width: 50%; margin-bottom: 20px;"></div>
感谢楼主分享,祝愿外链论坛越办越好! 外贸网站建设方法 http://www.fok120.com/ 你的留言真是温暖如春,让我感受到了无尽的支持与鼓励。
页:
[1]