forked from teddysun/lamp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlamp.sh
46 lines (41 loc) · 1.5 KB
/
lamp.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
#===============================================================================#
# System Required: CentOS/RadHat 5+ / Debian 7+ / Ubuntu 12+ #
# Description: Install LAMP(Linux + Apache + MySQL/MariaDB/Percona + PHP ) #
# Author: Teddysun <i@teddysun.com> #
# Intro: https://lamp.sh #
#===============================================================================#
cur_dir=`pwd`
include(){
local include=$1
if [[ -s ${cur_dir}/include/${include}.sh ]];then
. ${cur_dir}/include/${include}.sh
else
echo "Error:${cur_dir}/include/${include}.sh not found, shell can not be executed."
exit 1
fi
}
#lamp main process
lamp(){
include config
include public
include apache
include mysql
include php
include php-modules
clear
echo
echo "#####################################################################"
echo "# Auto Install LAMP(Linux + Apache + MySQL/MariaDB/Percona + PHP ) #"
echo "# Intro: https://lamp.sh #"
echo "# Author: Teddysun <i@teddysun.com> #"
echo "#####################################################################"
echo
rootness
load_config
pre_setting
}
#Run it
lamp 2>&1 | tee -a /root/lamp.log