用owncloud 打造自己的云盘
官網(wǎng)
https://owncloud.org/
安裝參考
https://doc.owncloud.org/server/latest/admin_manual/installation/
https://doc.owncloud.org/server/latest/admin_manual/installation/source_installation.html
安裝nginx和php
yum install -y epel-release
yum install -y nginx
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
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
取消注釋以下有關(guān)環(huán)境變量的行:
env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp
創(chuàng)建目錄,設置權(quán)限
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都起來了
安裝數(shù)據(jù)庫
yum install -y mariadb-server
mysql_secure_installation
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/*
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
systemctl restart httpd
訪問下
http://192.168.10.129/owncloud/
日,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
http://192.168.10.129/owncloud/index.php
無法寫入配置文件 Can't write into config directory! , 容我修個錯誤
This can usually be fixed by <a href="https://doc.owncloud.org/server/10.0/go.php?to=admin-dir_permissions" target="_blank" rel="noreferrer">giving the webserver write access to the config directory</a>.
https://blog.csdn.net/xuhuiyue/article/details/73554909
方案3搞定
$setsebool -P httpd_unified 1
$setsebool -P httpd_execmem 1
創(chuàng)建下這目錄
/var/www/html/owncloud/data
眼睛一閉就好了
然后就人人都會了
左上角可以切換到市場,可以找一些其他的插件來完善這個網(wǎng)盤
windows 映射網(wǎng)盤
win7之后,webdev認證方式要改一下,微軟不支持https加密認證
在注冊表,計算機\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters
basic認證1改成2
重啟webclient 服務
網(wǎng)盤左下角找到自己的webdav地址
映射下
http://192.168.10.129/owncloud/remote.php/dav/files/pcdog/
映射就好了
總結(jié)
以上是生活随笔為你收集整理的用owncloud 打造自己的云盘的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: MySQL 8.0 首个自适应参数横空出
- 下一篇: Elasticsearch 参考指南(介