本文共 2520 字,大约阅读时间需要 8 分钟。
在VMware Workstation软件内,使用CentOS 7系统搭建私人云盘owncloud
参考链接:
1、关闭防火墙、SELINUX安全模式
systemctl stop firewalld && systemctl disable firewalld
vi /etc/selinux/config
修改SELINUX=disabled :wq保存退出
2、安装yum源所需的工具包
yum install -y wget zip unzip bzip2
3、 安装samba服务和apache服务(httpd)
yum install -y samba.x86_64 && yum install -y httpd.x86_64
4、更新YUM源
1). 添加 EPEL
2). 安装WEBTATIC 软件源 参考链接:yum install -y epel-release
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
5、安装php服务
1).安装php56w
yum install -y php56w php56w-opcache php56w-xml php56w-mcrypt php56w-gd php56w-devel php56w-mysql php56w-intl php56w-mbstring
2). 查看本机已经安装的php版本
php -v
[root@owncloud ~]# php -vPHP 5.6.40 (cli) (built: Jan 12 2019 13:11:15) Copyright (c) 1997-2016 The PHP GroupZend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
之后登陆时报错,因安装的owncloud为最新版本,所以php56w版本低,需要升级至PHP 7.2.0版本。
参考链接:
This version of ownCloud requires at least PHP 7.2.0 You are currently running PHP 5.6.40. Please update your PHP version.
① 卸载之前的PHP
yum -y remove php*
② 更改yum源
yum install -y epel-release
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
③ 查看PHP7.2版本
yum list | grep php72
④ yum 安装php72w和各种拓展
yum -y install php72w php72w-cli php72w-fpm php72w-common php72w-devel php72w-embedded php72w-gd php72w-mbstring php72w-mysqlnd php72w-opcache php72w-pdo php72w-xml php72w-intl
⑤ 检查php版本,是否安装成功。
[root@owncloud html]# php -vPHP 7.2.34 (cli) (built: Oct 1 2020 13:37:37) ( NTS )Copyright (c) 1997-2018 The PHP GroupZend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.34, Copyright (c) 1999-2018, by Zend Technologies
⑥ 重启php-fpm
systemctl start php-fpm
⑦ 重启httpd服务
systemctl restart httpd.service
6、安装mariadb服务
yum install -y mariadb-server mariadb
7、开启相关服务并设置开机自启动
systemctl start smb.service
systemctl enable smb.service
systemctl start httpd.service
systemctl enable httpd.service
systemctl start mariadb.service
systemctl enable mariadb.service
8、修改/var/www/html此文件属主属组为 apache
chown apache.apache /var/www/html/
9、浏览器中测试主机ip地址是否显示nginx的测试页面
10、安装OwnCloud
1). 下载owncloud
下载链接: 2). 解压owncloud3).复制owncloud下面的index.php,返回上一次查看文件是否正确unzip owncloud-complete-20210326.zip
[root@owncloud ~]# mv owncloud /var/www/html/[root@owncloud ~]# cd /var/www/html/[root@owncloud html]# lltotal 4drwxr-xr-x 12 root root 4096 Mar 26 15:58 owncloud
11、重启httpd服务并修改owncloud的权限
systemctl restart httpd.service
chmod 777 /var/www/html/owncloud
转载地址:https://blog.csdn.net/qq_45392321/article/details/117444633 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!