基于Centos8创建可以开通nextcloud服务的LAMP环境的Shell脚本

本代码是基于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安装即可。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

helmer_hanssen

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值