-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
44 lines (38 loc) · 862 Bytes
/
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
#!/bin/bash
echo "Installation des prerequis"
apt-get update
echo "Faut-il installer apache2? y/n "
read response1
if [ "$response1" == 'y' ];
then
apt-get install -y apache2
else
""
fi
echo "Faut-il installer mysql-server ? y/n"
read response2
if [ "$response2" == 'y' ];
then
apt-get install -y mysql-server
else
""
fi
echo "Faut-il installer phpmyadmin ? y/n"
read response3
if [ "$response3" == 'y' ]
then
apt-get install -y phpmyadmin
else
""
fi
apt-get install -y nmap
apt-get install -y libmysqlclient-dev
echo "saisir nom utilisateur de la base de donnee"
read name
echo "saisir mot de passe base de donnee"
read -s mdp
mysql --verbose --batch --host=localhost --user="$name" --password="$mdp" --execute="CREATE DATABASE projet;"
mysql --user="$name" --password="$mdp" --use="projet" < database.sql
cd scripts/
./ListeActive.sh
./ScanPort.sh