forked from teddysun/lamp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlamp.sh
47 lines (41 loc) · 1.21 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
47
#!/usr/bin/env bash
# Copyright (C) 2014 - 2018, Teddysun <[email protected]>
#
# This file is part of the LAMP script.
#
# LAMP is a powerful bash script for the installation of
# Apache + PHP + MySQL/MariaDB/Percona and so on.
# You can install Apache + PHP + MySQL/MariaDB/Percona in an very easy way.
# Just need to input numbers to choose what you want to install before installation.
# And all things will be done in a few minutes.
#
# System Required: CentOS 6+ / Debian 7+ / Ubuntu 14+
# Description: Install LAMP(Linux + Apache + MySQL/MariaDB/Percona + PHP )
# Website: https://lamp.sh
# Github: https://github.com/teddysun/lamp
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
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
rootness
load_config
pre_setting
}
#Run it
lamp 2>&1 | tee ${cur_dir}/lamp.log