forked from mhlavac/lamp-install-script
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·82 lines (60 loc) · 1.87 KB
/
install.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/bin/sh
if [ `id -u` -ne '0' ]; then
echo "This script must be run as root" >&2
exit 1
fi
# Lamp user creation
if ! id "lamp" > /dev/null 2>&1; then
echo "Lamp user does not exist - Creating lamp user..."
(echo "lamp"; echo "lamp"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "Y") | adduser -q lamp
adduser lamp sudo
fi
echo "lamp" > /etc/hostname
hostname lamp
baseDirectory=$(dirname $0)
pluginsDirectory=$baseDirectory/plugins
apt-get update --fix-missing
# System wide
echo "Installing system wide applications..."
command -v javac || apt-get install -y openjdk-7-jdk
apt-get install -y ant curl git openssh-server unzip
# Etckeeper
$pluginsDirectory/etckeeper/script/00-install.sh
$pluginsDirectory/etckeeper/script/20-config.sh
# Apache 2
$pluginsDirectory/apache2/script/00-install.sh
$pluginsDirectory/apache2/script/20-vhosts.sh
$pluginsDirectory/apache2/script/30-jenkins_virtual_host.sh
# PHP 5
$pluginsDirectory/php5/script/php.sh
# Memcached
apt-get install -y memcached
# SQL
$pluginsDirectory/sql/script/00-install.sh
# MongoDB
apt-get install -y mongodb
# RockMongo
wget http://rockmongo.com/downloads/go?id=10 -O rockmongo.zip; unzip rockmongo.zip
mkdir -p /var/www/mongo.lamp
mv -T rockmongo /var/www/mongo.lamp/web
rm rockmongo.zip
# Other utils
apt-get install -y coffeescript ruby-compass
# Webkit to PDF and Image
$pluginsDirectory/wkhtmlto/script/00-install.sh
# Samba
$pluginsDirectory/samba/script/00-install.sh
# Gradle
$pluginsDirectory/gradle/script/00-install.sh
# Setting bashrc
echo "Setting bashrc..."
cp $baseDirectory/bash.bashrc ~lamp/.bashrc
cp $baseDirectory/bash.bashrc /etc/bash.bashrc
# Jenkins
$pluginsDirectory/jenkins/script/00-install.sh
# Node.js
$pluginsDirectory/nodejs/script/00-install.sh
# Postfix
$pluginsDirectory/postfix/script/00-install.sh
# Lamp projects
$pluginsDirectory/lamp-projects/script/00-install.sh