官方网站:
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 |
# 容器方式安装相关
# Create a new project directory
mkdir owncloud-docker-server
# Copy docker-compose.yml from the GitHub repository
wget https://raw.githubusercontent.com/owncloud/docs/master/modules/admin_manual/examples/installation/docker/docker-compose.yml
# Create the environment configuration file
cat << EOF > .env
OWNCLOUD_VERSION=latest
OWNCLOUD_DOMAIN=localhost
ADMIN_USERNAME=admin
ADMIN_PASSWORD=admin
HTTP_PORT=8080
EOF
# Build and start the container(PS: Must in .yml file directory)
docker-compose up -d
# if you setting succeed, docker ps
# open http://localhost:8080
# 重启里面 Ubuntu 系统命令
查看所有服务
service --status-all
# occ 命令相关
版本信息查看
occ [options] [arguments] 针对用户的操作
重置用户Loki的密码
sudo -u www-data php occ user:resetpassword Loki
# 进入维护模式,用于一般正常关闭或者升级服务器
occ maintenance:mode --on
occ maintenance:mode --off
# OCC命令之文件管理
files:cleanup 清理文件缓存
files:scan 重新扫描文件
files:transfer-ownership 将一个用户所有文件全部转移到另一个用户名下
使用格式: files:scan [-p|--path="..."] [-q|--quiet] [-v|vv|vvv --verbose] [--all] [user_id1] ... [user_idN]
参数:
user_id 用户名,扫描特定用户的文件
选项:
--path 限制扫描的目录
--all 扫描所有用户的所有文件
--quiet 不显示输出信息
--verbose 在扫描过程中显示文件和文件夹信息
对于Linux 添加信任域
首先使用cd命令进入ownCloud安装目录,如果多个请依次递增序号,例:
0 => 'localhost', 1 => 'www.XXX.com, 2 => 'www.OOO.com,
# vi config/config.php
# docker-compose 相关
docker-compose logs --timestamp owncloud
# stop the containers
docker-compose stop
# stop and remove containers along with the related networks, images, and volumes.
docker-compose down
# Upgrading ownCloud on Docker
docker-compose exec owncloud occ maintenance:mode --on
docker-compose exec db backup
docker-compose down
## update the version number of ownCloud in your .env file or the YAML file.
sed -i 's/^OWNCLOUD_VERSION=.*$/OWNCLOUD_VERSION=<newVersion>/' /compose/*/.env (仅供参考,默认值用latest即可)
docker-compose up -d
# 背景图替换的路径
参考资料:
https://www.orgleaf.com/owncloud
https://owncloud.org/help/
https://linux265.com/news/3518.html
https://blog.csdn.net/ZHANG_TIMI/article/details/88848837