Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use ownCloud to create a network disk

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

In this issue, the editor will bring you about how to use ownCloud to create a network disk. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.

Use ownCloud to create your own network disk.

If you want external access, please refer to https://my.oschina.net/u/2306127/blog/2245765 for installation settings.

Run in a large cluster and deploy ownCloud cloud disk system in a Kubernetes cluster

OwnCloud can be deployed through Docker, using the official ownCloud Docker image. The official image is designed to work with the data volumes of the host file system and contains separate MariaDB and Redis containers. The configuration is as follows:

Expose ports 80 and 443, allowing access to HTTP and HTTPS connections.

Mount the data and MySQL data directories of the host for persistent storage.

Local installation

Create a new project directory, and then download docker-compose.yml from the ownCloud Docker GitHub repository to the specified local directory. Next, create a .env configuration file that contains configuration parameters. There are only a few parameters to configure, as follows:

Set parameter name description example OWNCLOUD_VERSIONThe ownCloud versionlatestOWNCLOUD_DOMAINThe ownCloud domainlocalhostADMIN_USERNAMEThe admin usernameadminADMIN_PASSWORDThe admin user's passwordadminHTTP_PORTThe HTTP port to bind to80HTTPS_PORTThe HTTP port to bind to443

Then you can start the container. Use Docker command-line tool. The following example uses Docker Compose to start the relevant container service.

Use docker to reference in the GitHub repository.

# Create a new project directorymkdir owncloud-docker-servercd owncloud-docker-server# Copy docker-compose.yml from the GitHub repositorywget https://raw.githubusercontent.com/owncloud-docker/server/master/docker-compose.yml# Create the environment configuration filecat .envOW NCLOUD_VERSION=10.0OWNCLOUD_DOMAIN=localhostADMIN_USERNAME=adminADMIN_PASSWORD=adminHTTP_PORT=80HTTPS_PORT=443EOF# Build and start the containerdocker-compose up-d

When the processing is complete, check to see if all containers have been started successfully by running docker-compose ps. If all are successful, the results are as follows:

Name Command State Ports- -server_db_1 / usr/bin/entrypoint / bin/s... Up 3306/tcpserver_owncloud_1 / usr/local/bin/entrypoint... Up 0.0.0.0 bin/s6-svscan 443-> 443/tcp, 0.0.0.0 bin/s6-svscan 80-> 80/tcpserver_redis_1 / bin/s6-svscan / etc/s6 Up 6379/tcp

You can see that database, ownCloud, and Redis containers are already running, and the ownCloud service can be accessed through host ports 443,80, that is, https and http ports.

When all the containers are up and running, it takes a few minutes for ownCloud to be fully available. If you run docker-compose logs-- follow owncloud to view the log output, you can see a lot of information output to the console window, wait a moment, when the message is reduced, you can access the web UI.

Login Page

Open the browser and enter https://localhost. You can see the ownCloud login screen.

The user name and password are admin, specified in the. env configuration above.

The first time you access through HTTPS, the browser warns that SSL certificate is self-signed. But the self-signed certificate can be overwritten with a valid cert, within the host volume.

Stop the container

Suppose you are using docker-compose, as in the previous example, to stop the container from using docker-compose stop. In addition, you can use docker-compose down to stop and delete containers, including their associated networks, images, and volumes.

Upgrade ownCloud

When ownCloud releases a new version, you should update the running container instance as follows:

First, go to the directory of the .yaml or .env file.

Then, let ownCloud enter maintenance mode with the following command:

Docker-compose exec server occ maintenance:mode-on

Third, to create a backup to prevent errors in the upgrade process, use the following command:

Docker-compose exec db backup

This assumes that you use the default database container from Webhippie.

Fourth, close the container.

Docker-compose down

Then, update the version number of ownCloud in the .env and YAML files. You can replace it with sed, as follows:

# Make sure that you adjust the example to match your installation.sed-I's / ^ ownCLOUD _ VERSION=.*$/OWNCLOUD_VERSION=/' / compose/*/.env

Check to see if all the changes are done and correct:

Cat .env

Finally, restart the service:

Docker-compose up-d

Now the new version of ownCloud is up and running.

Backup

The stored files are hung outside the container and will not be affected by the upgrade.

However, owncloud only stores a single copy, and for important data, you need to establish your own regular backup mechanism for storage.

The above is the editor for you to share how to use ownCloud to create a network disk, if you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report