如何部署ownCloud 10.x?
- By : Will
- Category : Cloud storage
- Tags: CentOS 7, ownCloud, Red Hat Enterprise Linux 7, Red Hat Enterprise Linux 8
1 理论基础
1.1 项目简介
ownCloud是一个基于Linux的开源云项目,允许用户以浏览器或WebDAV方式访问云服务器,进行各项管理工作。ownCloud支持多种设备访问,用户可以很方便地使个人设备与服务器上存储的文件、日程安排、通讯录、书签等重要数据保持同步。
1.2 服务器端环境
1.2.1 Operating System
– Centos Linux 6 and 7
– Debian 7 and 8
– Fedora 27 and 28
– Red Hat Enterprise Linux 6 and 7
– SUSE Linux Enterprise Server 12 with SP1, SP2 and SP3
– openSUSE Tumbleweed and Leap 15.0, 42.3
– Ubuntu 16.04 and 18.04
1.2.2 Database
– MySQL or MariaDB 5.5+
– Oracle 11g
– PostgreSQL
– SQLite
1.2.3 Web server
– Apache 2.4 with prefork Multi-Processing Module (MPM) and mod_php
1.2.4 PHP Runtime
– 5.6, 7.0, 7.1 & 7.2
1.3 客户端环境
1.3.1 Mobile
– iOS 9.0+
– Android 4.0+
1.3.2 Web Browser
– Edge (current version on Windows 10)
– IE11+ (except Compatibility Mode)
– Firefox 62 or 60.2 ESR
– Google Chrome 68+
– Safari 11
1.3.3 Hypervisors
– Hyper-V
– VMware ESX
– Xen
– KVM
1.3.3 Desktop
– Windows 7, 8+
– Mac OS X 10.12+ (64-bit only)
– CentOS 6 & 7 (64-bit only)
– Debian 7 & 8
– Fedora 27 & 28
– Ubuntu 16.04 & 18.04
– openSUSE Leap 15.0, 42.3
1.4 硬件要求
– 最低128MB RAM,建议512MB
2 最佳实践
2.1 运行环境
2.1.1 运行环境信息
ipaddress = 10.168.0.156
OS = CentOS 7.5 x86_64
2.1.2 LAMP环境搭建
Apache+PHP(编译安装)
http://www.cmdschool.org/archives/3208
MariaDB安装(二进制安装包,适用于CentOS 7.x-x86_64或RHEL 7.x-x86_64)
https://www.cmdschool.org/archives/2364
MariaDB安装(二进制安装包,适用于RHEL 8.x-x86_64)
https://www.cmdschool.org/archives/5841
2.2 安装前的准备
2.2.1 修改目录访问权限
vim /etc/httpd/httpd.conf
修改如下行:
<Directory /> AllowOverride none #Require all denied </Directory>
重启服务使配置生效
systemctl restart httpd.service
2.2.2 下载源码包
cd ~ wget https://download.owncloud.org/community/owncloud-10.0.10.tar.bz2
2.2.3 解压源码包
cd ~ tar -xf owncloud-10.0.10.tar.bz2
2.3 部署ownCloud
2.3.1 配置源码包
cd ~ mv owncloud /var/www/ chown -R apache:apache /var/www/owncloud chmod -R 700 /var/www/owncloud
2.3.2 配置apache
vim /etc/httpd/conf.d/owncloud.conf
配置如下:
Alias /owncloud "/var/www/owncloud/" <Directory /var/www/owncloud/> Options +FollowSymlinks AllowOverride All <IfModule mod_dav.c> Dav off </IfModule> SetEnv HOME /var/www/owncloud SetEnv HTTP_HOME /var/www/owncloud </Directory>
2.3.3 重启Apache服务
systemctl restart httpd.service
2.4 安装所需的模块
2.4.1 获取需要的模块
通过访问连接的方式获取欠缺的模块信息,详细请参考下图,
http://10.168.0.156/owncloud
2.4.2 编译安装模块gd
cd ~/php-7.0.31/ext/gd phpize ./configure make make install
根据提示解决依赖关系,
yum install -y libpng-devel openjpeg-devel
2.4.3 编译安装模块zip
cd ~/php-7.0.31/ext/zip phpize ./configure make make install
2.4.4 编译安装模块mbstring
cd ~/php-7.0.31/ext/mbstring phpize ./configure make make install
2.4.5 编译安装模块zlib
cd ~/php-7.0.31/ext/zlib cp config0.m4 config.m4 phpize ./configure make make install
2.4.6 编译安装模块curl
cd ~/php-7.0.31/ext/curl phpize ./configure make make install
2.4.7 编译安装模块pcntl
cd ~/php-7.2.11/ext/pcntl/ phpize ./configure make make install
2.4.8 编译安装模块intl
cd ~/php-7.2.11/ext/intl/ phpize ./configure make make install
根据提示解决依赖关系,
yum install -y libicu-devel
2.4.9 编译安装模块ldap
cd ~/php-7.2.11/ext/ldap/ phpize ./configure make make install
根据提示解决依赖关系,
yum install -y openldap-devel ln -s /usr/lib64/libldap.so /usr/lib/
2.4.10 编译安装模块openssl
cd ~/php-7.2.11/ext/openssl/ cp config0.m4 config.m4 phpize ./configure make make install
根据提示解决依赖关系,
yum install -y openldap-devel ln -s /usr/lib64/libldap.so /usr/lib/
2.4.11 动态加载模块
vim /etc/php.ini
加入如下配置:
extension=gd.so extension=zip.so extension=mbstring.so extension=zlib.so extension=curl.so extension=ldap.so extension=pcntl.so extension=intl.so extension=openssl.so
2.4.12 重启服务使配置生效
systemctl restart httpd.service
2.5 配置数据库连接
2.5.1 创建数据库
mysql -uroot -p
输入如下配置:
create database if not exists owncloud; grant all privileges on owncloud.* TO 'owncloud'@'localhost' IDENTIFIED BY 'owncloudpwd'; flush privileges;
2.5.1 连接数据库
通过访问连接可发现所有模块安装好后即可进行数据库连接等操作,详细请参考下图,
http://10.168.0.156/owncloud
注:界面操作不再详述,请自行摸索
参阅文档:
==============
安装文档:
————-
https://doc.owncloud.org/server/10.0/admin_manual/installation/
模块的安装向导:
————-
https://doc.owncloud.org/server/10.0/admin_manual/installation/source_installation.html
安装包下载:
————-
https://owncloud.org/download/#edition
历史版本:
————–
https://owncloud.org/changelog/
App的下载与安装:
————–
https://marketplace.owncloud.com/
沟通平台:
————–
https://central.owncloud.org/
没有评论