本代码是基于Centos8环境系统
根据nextcloud系统要求进行定制:
# 升级系统
yum update -y
# 安装下载工具
yum install wget -y
# 关闭防火墙
#systemctl stop firewalld
#systemctl disable firewalld
#安装必要的依赖
dnf install -y epel-release yum-utils unzip curl bash-completion policycoreutils-python-utils mlocate bzip2
# 安装Apache服务程序
yum -y install httpd
systemctl start httpd
systemctl enable httpd
# php安装
dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
dnf -y install yum-utils
dnf module reset php
dnf module install php:remi-8.0 -y
dnf install php php-{cli,fpm,mysqlnd,zip,devel,gd,intl,pecl-apcu,opcache,redis,imagick,mbstring,curl,xml,pear,bcmath,json,pdo} -y
echo "<?php phpinfo(); ?>" >>/var/www/html/info.php
systemctl restart httpd
# 安装mysql
# https://repo.mysql.com//mysql80-community-release-el8-1.noarch.rpm
wget https://repo.mysql.com//mysql80-community-release-el8-1.noarch.rpm
yum -y install mysql80-community-release-el8-1.noarch.rpm
yum clean all
yum makecache
dnf install -y mysql mysql-server
systemctl start mysqld
systemctl enable mysqld
dnf install -y redis
systemctl enable redis.service
systemctl start redis.service
把此代码复制到intall.sh里面,然后用命令bash install.sh执行。
执行完毕之后,参考nextcloud网站,进行nextcloud安装即可。