CentOS 7 怎样安装 OwnCloud 7 私有云
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS 7 怎样安装 OwnCloud 7 私有云相关的知识,希望对你有一定的参考价值。
参考技术A 初始设置安装CentOS7默认最小配置然后安装目前所有的更新:yum-yupdate接下来,我们需要安装php,ApacheWeb服务器和mysql服务器和PHP扩展:yuminstallhttpdphpphp-mysqlmariadb-servermariadbsqlitephp-domphp-mbstringphp-gd 参考技术B CentOS 7 怎样Owncloud安装配置
1.更改yum源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
yum makecache
setenforce 0
systemctl stop firewalld
systemctl disable firewalld
2.更新
yum update
3.安装软件包
yum install -y httpd mariadb-server mariadb
yum install http://repo.webtatic.com/yum/el7/x86_64/RPMS/webtatic-release-7-3.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum install php70w-fpm php70w-cli php70w-json php70w-mcrypt php70w-pear php70w-mysql php70w-xml php70w-gd php70w-mbstring php70w-pdo php70w-dom
4.启动服务
systemctl start httpd.service
systemctl start mariadb.service
systemctl enable httpd.service
systemctl enable mariadb.service
chown -R apache.apache /var/www/html/owncloud/
5.配置数据库
mysql_secure_installation
MariaDB> create database owncloud;
MariaDB> CREATE USER ‘owncloud‘@‘localhost‘IDENTIFIED BY ‘owncloud‘;
MariaDB> grant all privileges on owncloud.* to ‘owncloud‘@localhost identified by ‘ownclound‘;
MariaDB> set password for ‘owncloud‘@‘localhost‘=password(‘owncloud‘);
MariaDB> flush privileges;
MariaDB> show database;
MariaDB> quit;
6.添加虚拟主机
vim /etc/httpd/conf.d/owncloud.conf
Alias /owncloud /var/www/html/owncloud
Options Indexes FollowSymLinks
<Directory /var/www/html/owncloud>
AllowOverride All
</Directory>
<Proxy *>
Order allow,deny
allow from all
</Proxy>
systemctl restart httpd.service
systemctl restart mariadb.service
7.配置owncloud
http://你的ip地址/owncloud
一、改变存储目录:
vi /var/www/html/owncloud/config/config.sample.php
将‘datadirectory‘ => ‘/var/www/owncloud/data‘更改为‘datadirectory‘ => ‘/media/disk/data‘
chown -R apache:apache /media/disk/data
chmod 777 /media/disk/data
在配置owncloud的界面把目录写进去
二、更改ownCloud的上传文件大小限制
vi /var/www/html/owncloud/.htaccess
修改以下几行:
php_value upload_max_filesize 10240M
php_value post_max_size 10240M
php_value memory_limit 10240M
vi /etc/php.ini
修改以下几行:
upload_max_filesize = 10240M
post_max_size = 10240M
systemctl restart httpd.service
systemctl restart mariadb.servic
以上是关于CentOS 7 怎样安装 OwnCloud 7 私有云的主要内容,如果未能解决你的问题,请参考以下文章