#!/bin/bash
# 安装lamp
yum -y install httpd php php-mysql mysql mysql-server &>/dev/null
# 整合PHP和apache
sed -i 's/DirectoryIndex/& index.php/' /etc/httpd/conf/httpd.conf
# 启动httpd
/etc/init.d/httpd start &> /dev/null
# 写PHP测试页
echo "<?php phpinfo(); ?>" > /var/www/html/index.php
echo "测试页完成可在浏览器中输入ip地址测试"
一键部署yum安装lamp
最新推荐文章于 2022-07-22 14:35:10 发布