建立自己的私人云盘,有必要吗?当然。万一Veriron、360、金山网盘关张了呢?事实上Veriron、360已经关张了,目前只有百度云盘还活着,不过百度会偷偷地进去翻你的东西,甚至把它看不顺眼的文件直接删除。

这里介绍一个方法,使用ownCloud创建自己的网盘。

ownCloud 可以通过Docker部署,使用 the official ownCloud Docker image。该官方镜像设计为与宿主机文件系统的数据卷一起工作,包含独立的 MariaDB 和 Redis containers。配置如下:

exposes ports 80 and 443, allowing for HTTP and HTTPS connections.

mounts the data and MySQL data directories on the host for persistent storage.

Installation on a Local Machine¶

To use it, first create a new project directory and download docker-compose.yml from the ownCloud Docker GitHub repository into that new directory. Next, create a .env configuration file, which contains the required configuration settings. Only a few settings are required, these are:

Setting Name

Description

Example

OWNCLOUD_VERSION

The ownCloud version

latest

OWNCLOUD_DOMAIN

The ownCloud domain

localhost

ADMIN_USERNAME

The admin username

admin

ADMIN_PASSWORD

The admin user’s password

admin

HTTP_PORT

The HTTP port to bind to

80

HTTPS_PORT

The HTTP port to bind to

443

Then, you can start the container, using your preferred Docker command-line tool. The example below shows how to use Docker Compose.

You can find instructions for using plain docker in the GitHub repository.

# Create a new project directory

mkdir owncloud-docker-server

cd owncloud-docker-server

# Copy docker-compose.yml from the GitHub repository

wget https://raw.githubusercontent.com/owncloud-docker/server/master/docker-compose.yml

# Create the environment configuration file

cat << EOF > .env

OWNCLOUD_VERSION=10.0

OWNCLOUD_DOMAIN=localhost

ADMIN_USERNAME=admin

ADMIN_PASSWORD=admin

HTTP_PORT=80

HTTPS_PORT=443

EOF

# Build and start the container

docker-compose up -d

When the process completes, then check that all the containers have successfully started, by running docker-compose ps. If they are all working correctly, you should expect to see output similar to that below:

Name Command State Ports

-------------------------------------------------------------------------------------------------------

server_db_1 /usr/bin/entrypoint /bin/s ... Up 3306/tcp

server_owncloud_1 /usr/local/bin/entrypoint ... Up 0.0.0.0:443->443/tcp, 0.0.0.0:80->80/tcp

server_redis_1 /bin/s6-svscan /etc/s6 Up 6379/tcp

In it, you can see that the database, ownCloud, and Redis containers are running, and that ownCloud is accessible via ports 443 and 8080 on the host machine.

Just because all the containers are running, it takes a few minutes for ownCloud to be fully functional. If you run docker-compose logs --follow owncloud and see a significant amount of information logging to the console, then please wait until it slows down to attempt to access the web UI.

Logging In

To log in to the ownCloud UI, open https://localhost in your browser of choice, where you see the standard ownCloud login screen, as in the image below.

The username and password are the admin username and password which you stored in .env earlier.

The first time that you access the login page via HTTPS, a browser warning appears, as the SSL certificate in the Docker setup is self-signed. However, the self-signed certificate can be overwritten with a valid cert, within the host volume.

Stopping the Containers

Assuming you used docker-compose, as in the previous example, to stop the containers use docker-compose stop. Alternatively, use docker-compose down to stop and remove containers, along with the related networks, images, and volumes.

Upgrading ownCloud on Docker¶

When a new version of ownCloud gets released, you should update your instance. To do so, follow these simple steps.

First, go to your docker directory where your .yaml or .env file exists. Second, put ownCloud into maintenance mode; you can do so using the following command:

docker-compose exec server occ maintenance:mode --on

Third, create a backup in case something goes wrong during the upgrade process, using the following command:

docker-compose exec db backup

Fifth, shutdown the containers.

docker-compose down

Sixth, update the version number of ownCloud in your .env file or the YAML file. You can use sed for it, as in the following example.

# Make sure that you adjust the example to match your installation.

sed -i 's/^OWNCLOUD_VERSION=.*$/OWNCLOUD_VERSION=/' /compose/*/.env

Seventh, view the file to ensure the changes has been implemented.

cat .env

Eighth, start your docker instance again.

docker-compose up -d

Now you should have the current ownCloud running with docker-compose.

java怎么作用于云盘,建立自己的私人云盘 - 使用ownCloud相关推荐

  1. 云服务器体验——搭建简单私人网盘

    因为有项目要做,需要用到服务器,就开始玩玩服务器 云服务器就像一台虚拟的24小时不停运作的电脑,可以干很多事情,比如搭建自己的私人网盘.正好有大文件需要分享给别人,就打算学着搭建一个私人网盘,这样就避 ...

  2. 通过Cloudreve+云服务器快速搭建一个私人云盘

    文章目录 写在前面 Cloudreve 是什么? 废话不多说我们直接开始 1. 获取 Cloudreve 2. 上传Cloudreve安装包并解压运行 3. 设置进程守护 写在前面 本笔记使用Cent ...

  3. 百度智能云怎样建立服务器,百度智能云服务器BCC系统盘扩容如何做

    百度智能云服务器BCC系统盘扩容操作实例: 对于每一个BCC实例,您可以根据实际情况在控制台进行调整系统盘容量.带宽.升级.续费.登录服务器等操作. 系统盘扩容 当用户使用云服务器BCC创建实例时,百 ...

  4. linux 个人云存储_您的私人云管家 联想个人云存储上手体验

    在数据时代下人类拥有着一层又一层的身份,这些身份都以不同的信息形式传递扩散,我们想去整合每一个账号的资源却发现无从下手,不过在当下只需要一个网络存储服务器就可以搞定了!以后可以告别网盘和移动硬盘的时代 ...

  5. 计算机云共享盘,搭建私人云网盘:局域网访问共享数据

    搭建私人云网盘:局域网访问私人云的共享数据 作为一个云网盘,首先当然是得能访问里面的数据.我们首先来看局域网环境下的情况. 很多朋友都在使用路由器,家里有几部电脑或者手机都连接在同一个路由器中.在这种 ...

  6. requestPermissions读写手机存储权限_泛圈云盘可为企业建立高效安全的云办公在线协同文档存储?...

    泛圈企业云盘结合智能手机和无线网络,实现对任何办公地点和办公时间的无缝访问,提高办公效率.它可以连接客户原有的各种IT系统,包括OA.邮件.ERP等各种个人业务系统,使手机也可以用来操作.浏览.管理公 ...

  7. 【学习笔记】云服务器入门教程(搭建云盘、网站,安装anaconda、WinSCP、宝塔面板等)

    1. 关于阿里云服务器ECS的一些特点  2. 阿里云服务器ECS环境配置及创建普通账户 3. linux的一些常见命令(注意防火墙端口相关设置命令) 4. 搭建nextCloud云盘 5. 云服务器 ...

  8. 利用阿里云OSS开发一个私人网盘/外链系统,php+js实现

    什么是阿里云OSS? 简单地理解,阿里云OSS(以下简称OSS)就是一个储存空间比较大的硬盘. 一般储存空间在40GB-400TB范围内 根据自己的需要去购买,而且便宜! 在阿里云官网可以购买. 我自 ...

  9. 企业云盘的功能和个人云盘有什么区别

    随着企业无纸化办公的发展和信息化的建设,电子文档已成为企业数据资产的主要载体. 企业内部员工之间对文档传输和流通的需求正在增长. 诸如Internet之类的传统文档传递方法无法满足公司办公文档的集体收 ...

最新文章

  1. 网站内容收录除了原创性和质量其他因素也少不了
  2. helm部署postgresql
  3. redis三种架构:主从Cluster哨兵+整合Springboot访问redis
  4. git rebase/reset小计
  5. 4.02Day12函数 装饰器
  6. linux读写usb host,LINUX下USB1.1设备学习小记(3)_host与device
  7. python的继承用法_python中继承有什么用法?python继承的用法详解
  8. XCODE 出现 The operation couldn't be completed.(LaunchServicesError error 0.)错误修复
  9. 学习 WebService 第五步:在Local创建测试用WebService(WSDL)
  10. 设计模式 指令模式_指令设计模式
  11. html引入html include_PostgreSQL引入插件EXTENSION的常用方法
  12. linux下maxwell安装教程,Ubuntu下若干软件的安装方法
  13. 关于ioncube扩展的安装和使用
  14. 【js组件】仿照steam样式制造自定义横向纵向滚动条
  15. 图片Base64编码 图片Base64在线转换
  16. mumu安卓模拟器使用教程
  17. 英国几个有名的英语考试总结
  18. echarts 饼图 labelLine
  19. 手机计算机器的作用,小米手机自带的计算器简直绝了,这功能也太强大了吧!...
  20. A. Banana 2017 ACM-ICPC 亚洲区(乌鲁木齐赛区)网络赛

热门文章

  1. 用深度学习预知城市未来人流量
  2. SURF网格化特征点提取算法流程(一)
  3. kali linux 渗透测试
  4. 【经验】渗透测试信息收集步骤、网站、工具分享
  5. XmlPullParserException: unexpected character in markup
  6. [转载]谷歌地图下载
  7. 马云最头疼的对手之一,中国电商第二,京东,究竟有何过人之处?
  8. linux命令ls什么意思,ls是什么意思(精通 Linux 的 ls 命令)
  9. 团队管理36-规划自我管理之路
  10. 亚信科技java笔试题答案_亚信科技笔试题