CentOS 7安装ownCloud

CentOS 7安装ownCloud

ownCloud官网:https://owncloud.org/
ownCloud官方文档:https://doc.owncloud.org/php

安装ownCloud

安装ownCloud 9,依赖于LNMP(环境)html

  • 安装Apache

参考:http://blog.csdn.net/wh211212...mysql

  • 安装php

参考:http://blog.csdn.net/wh211212...
http://blog.csdn.net/wh211212...linux

  • 安装Mariadb

参考:http://blog.csdn.net/wh211212...web

  • 安装ownCloud
# install from EPEL
[root@linuxprobe ~]# yum --enablerepo=epel -y install php-pear-MDB2-Driver-mysqli php-pear-Net-Curl
[root@linuxprobe ~]# wget http://download.owncloud.org/download/repositories/stable/CentOS_7/ce:stable.repo -P /etc/yum.repos.d
[root@linuxprobe ~]# yum -y install owncloud
[root@linuxprobe ~]# systemctl restart httpd
  • 在MariaDB中为ownCloud添加用户和数据库。
[root@linuxprobe ~]# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
[root@linuxprobe ~]# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 11
Server version: 5.5.52-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> create database owncloud;
Query OK, 1 row affected (0.15 sec)

MariaDB [(none)]> grant all privileges on owncloud.* to owncloud@'localhost' identified by 'password';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> exit
Bye

注:若是系统开启selinux,需设置如下操做:sql

[root@linuxprobe ~]# semanage fcontext -a -t httpd_sys_rw_content_t /var/www/html/owncloud/apps
[root@linuxprobe ~]# semanage fcontext -a -t httpd_sys_rw_content_t /var/www/html/owncloud/config
[root@linuxprobe ~]# restorecon /var/www/html/owncloud/apps
[root@linuxprobe ~]# restorecon /var/www/html/owncloud/config

这里写图片描述

  • 若是链接到数据库的信息是正确的,欢迎以下所示:

这里写图片描述

  • 这是ownCloud主页,能够使用ownCloud做为云存储。
    这里写图片描述

https://doc.owncloud.org/serv...数据库

相关文章
相关标签/搜索