返回顶部

部署私有云盘

部署私有云盘Nextcloud

Nextcloud插件多,功能较强,不仅支持文件同步,还支持日历,通讯录,视频会议等等

Nextcloud特点

  • 开源

  • 各个平台都有客户端,方便管理

  • 功能很完善

docker 部署

#安装docker环境
#cat > docker.sh <<EOF # step 1: 安装必要的一些系统工具 sudo yum install -y yum-utils device-mapper-persistent-data lvm2 # Step 2: 添加软件源信息 sudo yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo # Step 3 sudo sed -i 's+download.docker.com+mirrors.aliyun.com/docker-ce+' /etc/yum.repos.d/docker-ce.repo # Step 4: 更新并安装Docker-CE sudo yum makecache fast sudo yum -y install docker-ce # Step 4: 开启Docker服务 sudo service docker start EOF #docker 启动 docker run -d \ --name nextcloud \ -p 8000:80 \ -v /data/nextcloud:/var/www/html \ nextcloud #安装数据库 #yum -y install mariadb-server #systemctl restart mariadb.service #ss -tnl State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 128 *:8000 *:* LISTEN 0 50 *:3306 *:* #mysql > create database nextcloud; > show databases; MariaDB [(none)]> create user 'next'@'%' IDENTIFIED BY 'password'; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> grant all on *.* to 'next'@'%'; MariaDB [mysql]> grant all on *.* to 'root'@'%'; MariaDB [mysql]> grant all on *.* to 'oc_admin'@'%'; MariaDB [mysql]> grant all on *.* to 'oc_admin1'@'%'; MariaDB [mysql]> grant all on *.* to 'oc_admin2'@'%'; MariaDB [mysql]> grant all on *.* to 'oc_admin3'@'%'; MariaDB [mysql]> grant all on *.* to 'oc_admin4'@'%'; MariaDB [mysql]> grant all on *.* to next@'%' identified by 'password' with grant option; Query OK, 0 rows affected (0.00 sec) MariaDB [nextcloud]> flush privileges; Query OK, 0 rows affected (0.00 sec) #浏览器访问IP:8000输入用户名和密码,数据库即可 创建用户名/密码 admin/admin 数据库用户名: next 数据库密码: password 数据库名: nextcloud 地址端口: 10.0.0.117:3306

 

报错信息

`ERROR 1045 (28000): Access denied for user 'root'@'10.0.0.127' (using password: NO)
报错原因: 未授权
解决:
MariaDB [(none)]> grant all on *.* to 'next'@'%';
MariaDB [mysql]> grant all on *.* to 'root'@'%';
MariaDB [mysql]> grant all on *.* to 'oc_admin'@'%';
MariaDB [mysql]> grant all on *.* to 'oc_admin1'@'%';
MariaDB [mysql]> grant all on *.* to 'oc_admin2'@'%';
MariaDB [mysql]> grant all on *.* to 'oc_admin3'@'%';
MariaDB [mysql]> grant all on *.* to 'oc_admin4'@'%';
MariaDB [mysql]> grant all on *.* to next@'%' identified by 'password' with grant option;
MariaDB [nextcloud]> flush privileges;
 

 

访问浏览器

http://10.0.0.117:8000

 

 

 

 

 

 

 

 

官方链接

https://docs.nextcloud.com

https://docs.nextcloud.com/server/latest/admin_manual/installation/source_installation.html

posted @ 2022-03-24 16:59  九尾cat  阅读(199)  评论(0编辑  收藏  举报