系统环境 openEuler-20.03-LTS
配置Yum 源
cd /etc/yum.repos.d/
vim openeuler_x86_64.repo
[OS]
name=OS
baseurl=http://mirrors.aliyun.com/openeuler/openEuler-20.03-LTS/OS/$basearch/
enabled=1
gpgcheck=0
gpgkey=http://mirrors.aliyun.com/openeuler/openEuler-20.03-LTS/OS/$basearch/RPM-GPG-KEY-openEuler
[everything]
name=everything
baseurl=https://mirrors.aliyun.com/openeuler/openEuler-20.03-LTS/everything/$basearch/
enabled=1
gpgcheck=0
gpgkey=https://mirrors.aliyun.com/openeuler/openEuler-20.03-LTS/everything/$basearch/RPM-GPG-KEY-openEuler
[EPOL]
name=EPOL
baseurl=http://mirrors.aliyun.com/openeuler/openEuler-20.03-LTS-SP2/EPOL/main/$basearch/
enabled=1
gpgcheck=0
gpgkey=http://mirrors.aliyun.com/openeuler/openEuler-20.03-LTS-SP2/EPOL/main/$basearch/RPM-GPG-KEY-openEuler
[debuginfo]
name=debuginfo
baseurl=http://mirrors.aliyun.com/openeuler/openEuler-20.03-LTS-SP2/debuginfo/$basearch/
enabled=1
gpgcheck=0
gpgkey=http://mirrors.aliyun.com/openeuler/openEuler-20.03-LTS-SP2/debuginfo/$basearch/RPM-GPG-KEY-openEuler
[source]
name=source
baseurl=http://mirrors.aliyun.com/openeuler/openEuler-20.03-LTS-SP2/source/
enabled=1
gpgcheck=0
gpgkey=http://mirrors.aliyun.com/openeuler/openEuler-20.03-LTS-SP2/source/RPM-GPG-KEY-openEuler
[update]
name=update
baseurl=http://mirrors.aliyun.com/openeuler/openEuler-20.03-LTS-SP2/update/$basearch/
enabled=1
gpgcheck=0
gpgkey=http://mirrors.aliyun.com/openeuler/openEuler-20.03-LTS/OS/$basearch/RPM-GPG-KEY-openEuler
安装个人网盘nextcloud应用
安装依赖和基础工具
dnf install -y lrzsz cmake unzip curl wget bash-completion policycoreutils-python-utils mlocate bzip2
安装Apache web 服务器
dnf install -y httpd
启动Apache 网络服务
systemctl enable httpd
systemctl start httpd
安装PHP 所需包和模块
dnf install -y php php-gd php-mbstring php-intl php-mysqlnd php-opcache php-json php-pgsql php-fpm php-dom zlib-devel libzip php-cli php-devel libzip-devel
如果php安装的版本高了,使用以下方法安装
yum list php --showduplicates
yum list all --repo everything | grep php
dnf install -y php php-gd php-mbstring php-intl php-mysqlnd php-opcache php-json php-pgsql php-fpm php-dom zlib-devel libzip php-cli php-devel --repo everything
安装cMake
dnf -y install cmake
软件包安装libzip
[root@openEuler ~]# dnf -y install zlib-devel
[root@openEuler ~]# wget https://nih.at/libzip/libzip-1.2.0.tar.gz
[root@openEuler ~]# tar -zxvf libzip-1.2.0.tar.gz
[root@openEuler ~]# cd libzip-1.2.0
[root@openEuler libzip-1.2.0]# ./configure
[root@openEuler libzip-1.2.0]# make -j4 && make install
安装php-zip
[root@openEuler libzip-1.2.0]# cp /usr/local/lib/libzip/include/zipconf.h /usr/local/include/zipconf.h
[root@openEuler libzip-1.2.0]# cd
[root@openEuler ~]# wget http://pecl.php.net/get/zip-1.19.0.tgz
[root@openEuler ~]# tar -zxvf zip-1.19.0.tgz
[root@openEuler ~]# cd zip-1.19.0
[root@openEuler zip-1.19.0]# /usr/bin/phpize
[root@openEuler zip-1.19.0]# ./configure --with-php-config=/usr/bin/php-config
[root@openEuler zip-1.19.0]# make && make install
使用vi 命令打开/etc/php.ini 文件,在[PHP]下面添加以下代码
vi /etc/php.ini
extension=zip.so
启动php-fpm
systemctl start php-fpm
验证PHP 安装版本
php -v
验证PHP 安装模块
php -m
下载Nextcloud 软件包
wget https://download.nextcloud.com/server/releases/nextcloud-18.0.4.tar.bz2
解压Nextcloud 软件包
tar -jxvpf nextcloud-18.0.4.tar.bz2
拷贝文件夹至apache web 服务器的根目录
cp -R nextcloud/ /var/www/html/
创建数据文件夹
mkdir /var/www/html/nextcloud/data
更改Apache 对nextCloud 文件夹的读写权限
chown -R apache:apache /var/www/html/nextcloud
重启Apache
systemctl restart httpd
关闭防火墙
systemctl stop firewalld
临时关闭SElinux
setenforce 0