PHP8.0+Mariadb10.5+apache2.4/Nginx1.20.1安装配置步骤

本文详细介绍了在CentOS系统中,如何更换阿里云yum源,安装Apache2.4或Nginx1.20.1,并配置防火墙。接着,教程讲解了移除旧版MariaDB,创建新版本yum源,安装MariaDB10.5.8以及设置数据库密码的过程。最后,文章指导了如何安装PHP8.0及相应的扩展包,完成整个环境的搭建。
摘要由CSDN通过智能技术生成

1、 更换阿里云yum源并安装epel源

[root@localhost ~]# yum -y install vim wget
[root@localhost ~]#  mv /etc/yum.repos.d//CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
[root@localhost ~]# wget  http://mirrors.aliyun.com/repo/Centos-7.repo -O /etc/yum.repos.d/CentOS-Base.repo
[root@localhost ~]# yum -y install epel-release
[root@localhost ~]# yum -y update

2、安装apache-2.4.6,启动服务后并进行验证

[root@localhost ~]# yum -y install httpd httpd-devel
[root@localhost ~]# systemctl start httpd && systemctl enable httpd
[root@localhost ~]# httpd -v

在这里插入图片描述
或者安装Nginx1.20.1

[root@localhost ~]# yum -y install nginx
[root@localhost ~]# systemctl enable --now nginx
[root@localhost ~]# nginx -v

在这里插入图片描述

3、配置防火墙

[root@localhost ~]# firewall-cmd --zone=public --permanent --add-service=http
[root@localhost ~]# sys
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值