利用Nextcloud搭建个人私有网盘

简介:
Nextcloud 是一款开源免费的私有云存储网盘项目,可以让你快速便捷地搭建一套属于自己或团队的云同步网盘,从而实现跨平台跨设备文件同步、共享、版本控制、团队协作等功能。它的客户端覆盖了 Windows、Mac、Android、iOS、Linux 等各种平台,也提供了网页端以及 WebDAV接口,所以你几乎可以在各种设备上方便地访问你的云盘。

安装配置
操作系统:Centos7.x
环境:Apache,Mysql,PHP
1、安装依赖:
shell> yum install -y epel-release yum-utils unzip curl wget bash-completion policycoreutils-python mlocate bzip2shell> yum update -y

2、安装 Apache

shell> yum install -y httpd
shell> systemctl enable httpd.serviceshell> systemctl start httpd.service

2. 安装 MariaDB

shell> yum install mariadb-server -y
shell> systemctl start mariadb   # 启动服务shell> systemctl enable mariadb  # 设置开机启动
# 设置 MySQL 账户 root 密码:shell> mysqladmin -u root password 'pwd123'

3. 安装 php

如果 php 使用的是 php7.2 以前的老版本,需要卸载老版本而装新版本。

#卸载老版本 phpshell> yum remove php* php-common 
# 安装 php7 yum 源shell> rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
shell> yum install -y php72w php72w-cli php72w-common php72w-curl php72w-gd php72w-mbstring php72w-mysqlnd php72w-process php72w-xml php72w-zip php72w-opcache php72w-pecl-apcu php72w-intl php72w-pecl-redis
shell> systemctl restart httpd

 

如果 php7 解析 php 文件失败,可以执行yum -y install php* --skip-broken后再执行以上 php7 安装命令

4. 安装 nextcloud

shell> cd var/www/html/shell> wget https://download.nextcloud.com/server/releases/nextcloud-18.0.1.zipshell> yum -y install wget unzipshell> unzip nextcloud-18.0.1.zip
shell>  chown -R apache:apache /var/www/html/nextcloudshell>  chmod -R 775 /var/www/html/nextcloud

5. 配置 apache 虚拟目录

shell>  vim /etc/httpd/conf.d/vhost.conf
<VirtualHost *:80>    DocumentRoot "/var/www/html"    ServerName cloud.magedu.com    ServerAlias cloud.magedu.com    <Directory "/var/www/html/">         Options FollowSymLinks         AllowOverride All         Require all granted    </Directory></VirtualHost>
#重启 apacheshell> systemctl restart httpd 

6. 配置 nextcloud

利用 Nextcloud 搭建个人私有网盘

用户名和密码一定要记住,数据目录默认即可,数据库的用户名和密码根据自身情况而定;

数据库名任意,nextcloud 会自动创建这个数据库,不必要人为创建;

数据库如果是在操作的vps上,url可写成localhost:3306

7、登录验证

利用 Nextcloud 搭建个人私有网盘

来源:https://www.qcmoke.site/tools/nextcload.html
☆ END ☆

 

© 版权声明

☆ END ☆
喜欢就点个赞吧
点赞1 分享
图片正在生成中,请稍后...