-
Notifications
You must be signed in to change notification settings - Fork 1
/
lamp.sh
executable file
·53 lines (36 loc) · 891 Bytes
/
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
48
49
50
51
52
#!/bin/bash
not_running_as_root() {
if [[ $EUID -ne 0 ]]; then return 0; fi
return 1
}
if not_running_as_root; then
echo "You must run this script as root!"
echo "Exiting..."
exit 23
fi
echo "Updating system before start installing..."
apt-get install update
echo "Installing Apache..."
apt-get install apache2
echo "Installing Mysql..."
apt-get install mysql-server
echo "Cleaning up Mysql installation [say yes to every question]..."
mysql_secure_installation
echo "Installing PHP..."
apt-get install php5 php-pear php5-mysql
echo "Installing PHPMyAdmin..."
apt-get install -y phpmyadmin
echo "Instalando NTP..."
apt-get install ntp ntpdate
echo "Reiniciando Apache"
service apache2 restart
# TODO
# --default-applications, -d:
# - make it less interactive
# - htop
# - git
# - vim
# - ntp
# dpkg-reconfigure tzdata
# apt-get -y remove --purge exim4
exit 0