CentOS7一键搭建LAMP环境脚本:
1 |
wget -O lamp-centos7.sh https://git.io/vNGJp && chmod +x lamp-centos7.sh && /usr/bin/bash lamp-centos7.sh |
图片来源:Google图片
脚本说明:
1。PHP版本可选,安装前会提示让输入php版本号,支持php5.6、7.0、7.1、7.2,不过让输入版本时请根据提示输入56或70、71、72
2。数据库为MariaDB 10.3,版本不可选,安装前会提示让输入数据库管理密码
3。可选是否安装phpmyadmin,安装前会询问,输入yes、no确定是否安装,推荐yes,这样LAMP环境部署完可以直接访问http://YOUR_IP/phpmyadmin访问和设置数据库。
4。支持一键添加、删除域名功能,注意删除域名时会同时删除该域名网站的所有数据
5。支持Centos7系统,其它不支持,其实版本6也是支持的,只需要安装完手动启httpd、mariadb,再设置下iptables防火墙就行,因为很少使用centos6了,所以懒得在脚本中写判断系统版本的命令了,只针对CentOS7系统。
0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.