docker部署owncloud私人网盘

docker部署owncloud私人网盘

1.部署mysql数据库

[root@tencent ~]# docker pull mysql:5.7
5.7: Pulling from library/mysql
a076a628af6f: Pull complete
f6c208f3f991: Pull complete
88a9455a9165: Pull complete
406c9b8427c6: Pull complete
7c88599c0b25: Pull complete
25b5c6debdaf: Pull complete
43a5816f1617: Pull complete
1831ac1245f4: Pull complete
37677b8c1f79: Pull complete
27e4ac3b0f6e: Pull complete
7227baa8c445: Pull complete
Digest: sha256:b3d1eff023f698cd433695c9506171f0d08a8f92a0c8063c1a4d9db9a55808df
Status: Downloaded newer image for mysql:5.7
[root@tencent ~]# docker run -it -d \
                     --restart=always \
                     --name mysql \
                     -p 3306:3306 
                     -v /etc/my.cnf:/etc/my.cnf
                     -v /data/mysql/:/var/lib/mysql 
                     -e MYSQL_ROOT_PASSWORD="123456"  mysql:5.7 \
                     --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
[root@tencent ~]# docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                               NAMES
f1d1f273e3a9        mysql:5.7           "docker-entrypoint.s…"   3 minutes ago       Up 3 minutes        0.0.0.0:3306->3306/tcp, 33060/tcp   mysql

/etc/my.cnf的内容如下

[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
[mysqld]
#最大连接数
max_connections=1000
#时区
default-time_zone = '+8:00'
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
datadir         = /var/lib/mysql
#log-error      = /var/log/mysql/error.log
# By default we only accept connections from localhost
#bind-address   = 127.0.0.1
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

2.部署owncloud

[root@tencent ~]# docker pull owncloud
Using default tag: latest
latest: Pulling from library/owncloud
177e7ef0df69: Pull complete
9bf89f2eda24: Pull complete
350207dcf1b7: Pull complete
a8a33d96b4e7: Pull complete
c0421d5b63d6: Pull complete
f76e300fbe72: Pull complete
af9ff1b9ce5b: Pull complete
d9f072d61771: Pull complete
a6c512d0c2db: Pull complete
5a99458af5f8: Pull complete
8f2842d661a0: Pull complete
3c71c5361f06: Pull complete
baeacbad0a0c: Pull complete
e60049bf081a: Pull complete
0619078e32d3: Pull complete
a8e482ee2313: Pull complete
174d1b06857d: Pull complete
4a86c437f077: Pull complete
5e9ed4c3df2d: Pull complete
8a1479477c8e: Pull complete
8ab262044e9e: Pull complete
Digest: sha256:173811cb4c40505401595a45c39a802b89fb476885b3f6e8fe327aae08d20fe8
Status: Downloaded newer image for owncloud:latest
[root@tencent ~]#  docker run -it -d  --restart=always --name owncloud -p 8080:80 --link mysql:db  owncloud

3.访问web页面,ip+8080端口 ,自己设置用户名跟密码
在这里插入图片描述

4.点击安装完成,跳转到登录页面,输入账号密码登陆进去
在这里插入图片描述
结束!!!

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值