当前位置:   article > 正文

owncloud php网盘源码,用owncloud 打造自己的云盘

php网盘源码

官网

安装参考

安装nginx和php

yum install -y epel-release

yum install -y nginx

yum install -y php70w-fpm php70w-cli php70w-json php70w-mcrypt php70w-pear php70w-mysql php70w-xml php70w-gd php70w-mbstring php70w-pdo

更新配置

vi /etc/php-fpm.d/www.conf

搜索包含“user”和“group”的那一行,并更改为:

user = nginx

group = nginx

取消注释以下有关环境变量的行:

env[HOSTNAME] = $HOSTNAME

env[PATH] = /usr/local/bin:/usr/bin:/bin

env[TMP] = /tmp

env[TMPDIR] = /tmp

env[TEMP] = /tmp

创建目录,设置权限

mkdir -pv /var/lib/php/session

chown nginx:nginx -R /var/lib/php/session/

systemctl start php-fpm

systemctl start nginx

systemctl enable nginx

systemctl enable php-fpm

端口9000和80都起来了

605435758dfe33d2fe6045be7d342d82.png

安装数据库

yum install -y mariadb-server

mysql_secure_installation

577ac773998e57dc268d39f8a4b157ed.png

mysql>

CREATE DATABASE owncloud;

create user owndbuser@localhost identified by '12345.coM';

GRANT ALL PRIVILEGES ON owncloud.* to owndbuser@localhost IDENTIFIED BY '12345.coM';

FLUSH PRIVILEGES;

做一个SSL证书

mkdir -p /etc/nginx/cert/

openssl req -new -x509 -days 365 -nodes -out /etc/nginx/cert/owncloud.crt -keyout /etc/nginx/cert/owncloud.key

chmod 600 /etc/nginx/cert/*

3969946f704e7ff2828e63d072456f49.png

yum --enablerepo=epel -y install php-pear-MDB2-Driver-mysqli php-pear-Net-Curl

wget http://download.owncloud.org/download/repositories/stable/CentOS_7/ce:stable.repo -P /etc/yum.repos.d

yum -y install owncloud

43f04b9cea90c36aa3b47cae406f392f.png

systemctl restart httpd

访问下

63ff4f08c0c6e983adef828f246fb169.png

日,php没有安装,而且php要大于5.6并且小于7.2,最新版本7.3是不支持的

yum install -y php70w php70w-opcache php70w-xml php70w-mcrypt php70w-gd php70w-devel php70w-mysql php70w-intl php70w-mbstring

systemctl restart httpd

a949a15071a0fb89b0501a5008f29c0c.png

无法写入配置文件 Can't write into config directory! , 容我修个错误

This can usually be fixed by giving the webserver write access to the config directory.

方案3搞定

$setsebool -P httpd_unified 1

$setsebool -P httpd_execmem 1

1f9ba0b1b09354595d43938f8ae7a0a9.png

创建下这目录

/var/www/html/owncloud/data

b81cc33cbc77e213b34c5a10314e79e4.png

0358a5e2c489cd6d59bffbd0a4ff03d2.png

眼睛一闭就好了

1890a612684873473ee71f0f709d6f03.png

然后就人人都会了

42ced853a3e0a163277f9f803aa45aa7.png

左上角可以切换到市场,可以找一些其他的插件来完善这个网盘

65932a7d5fb28e79502625d699a1d0df.png

9b84843b4b4f7b8c1c7147f6736e9254.png

9a2d5a688e696c15863a4cf10cbf0cff.png

f1e0c1f045807d14bb9551567e7eb9aa.png

windows 映射网盘

win7之后,webdev认证方式要改一下,微软不支持https加密认证

在注册表,计算机\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters

basic认证1改成2

953a8d489bea553145e482eb76045a82.png

重启webclient 服务

网盘左下角找到自己的webdav地址

fdcc0c57c71a895710e0516447730f85.png

映射下

3437ef37849e6ccc1535e591efd0985f.png

4d357b93bb140cd4fae74473c51ec295.png

74f4fb2f7c6229996193892d0d3a9666.png

映射就好了

e5951166369e49a4e21bf665d5df4a92.png

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/IT小白/article/detail/207348
推荐阅读
相关标签
  

闽ICP备14008679号