1、需要LAMP架构
实验环境:centos7.4 64位系统
[[email protected] ~]# yum install -y httpd php php-mysql mariadb-server mariadb php-dom php-mbstring php-gd php-pdo
2、启动LAMP相关服务
[[email protected] ~]# systemctl start httpd.service
[[email protected] ~]# systemctl start mariadb.service
- 3、关闭防火墙
[[email protected] ~]# systemctl stop firewalld
[[email protected] ~]# systemctl disable firewalld
- 4、测试apache:
http://192.168.40.20
通过xshell中的rz上传owncloud-10.0.1.zip 到linux系统中:
[[email protected] ~]# unzip owncloud-10.0.1.zip
[[email protected] ~]# cp -r owncloud /var/www/html/
[[email protected] ~]# chown -R apache:apache /var/www/html/owncloud/
- 5、在MariaDB数据库中创建owncloud的数据库:
设置mysql的root密码:
[[email protected] ~]# mysqladmin -u root password "123456"
[[email protected] ~]# mysql -u root -p123456
MariaDB [(none)]> create database owncloud; #创建owncloud数据库:
- 6、通过web界面安装owncloud
http://192.168.40.20/owncloud
但是网页提示当前php版本是5.4,要求高于5.6,所以要更新php版本
查看版本
yum list installed | grep php
卸载
yum remove php.x86_64 php-cli.x86_64 php-common.x86_64 php-gd.x86_64 php-ldap.x86_64 php-mbstring.x86_64 php-mcrypt.x86_64 php-mysql.x86_64 php-pdo.x86_64
查看卸载干没干净
yum list installed | grep php
yum install epel-release
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
yum search php7
yum install php73-php php73-php-gd php73-php-mysqld php73-php-pecl-mysql php73-php-pecl-mysql-xdevapi php73-php-odbc php73-php-opcache php73-php-pdo php73-php-pecl-mcrypt php73-php-devel php73-php-cli php73-php-pecl-http php73-php-pecl-http-devel -y
- 8、缺模块安装模块
yum install php73-php-xml.x86_64 php73-php-intl.x86_64 php73-php-mbstring.x86_64 php73-php-mbstring.x86_64 -y
重启
systemctl restart httpd.service
解决换域名IP报错
vim /var/www/html/owncloud/config/config.php
添加域名和IP
原文地址:https://www.cnblogs.com/aslijitong/p/12623231.html