操作环境:CentOS 7
[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)
关闭防火墙和selinux
#systemctl stop firewalld
#systemctl disable firewalld
#sed -ri 's/^SELINUX=/cSELINUX=disabled/' /etc/selinux/config
#vim lamp.sh
#!/bin/bash
#install package
yum install -y httpd mariadb-server mariadb php php-mysql gd php-gd
#start httpd mariadb serevice
systemctl start httdp mariadb
systemctl enable httpd mariadb
部署完成