#!/bin/bash
yum install -y httpd
yum install php php-mysql php-gd libjpeg* php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-bcmath php-mhash mariadb mariadb-server -y
#安装appache php mariadb
echo "lamp instarlled"
systemctl start mariadb.service #开启mariadb
systemctl start httpd.service #开启appache
systemctl enable httpd.service #开机自启
systemctl enable mariadb.service
echo "mariadb,httpd started"
cd /var/www/html
echo "
<?php
phpinfo();
?>">>index.php
chmod -R 777 /var/www/html
echo "index.php created"
echo "接下来,须做mysql配置,直接访问本机的IP就可以啦"
Centos 7 配置 LAMP的shell脚本
最新推荐文章于 2024-02-12 23:32:54 发布