-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathphpsysinfo-ubuntu.sh
54 lines (40 loc) · 1.34 KB
/
phpsysinfo-ubuntu.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
!#/bin/bash
#################################################
# Server Configuration for Ubuntu 16.04 LTS #
# Don't use port 7071 #
#################################################
# install sudo
apt install sudo
## updating system
sudo apt update -y
## installing dependencies
sudo apt install unzip software-properties-common python3-software-properties python-software-properties sed -y
## intalling HTTP Server (Powered by Apache2)
sudo apt install apache2 -y
## starting the http server
sudo service apache2 start
## fix for hostname resolving
echo "ServerName localhost" >> /etc/apache2/apache2.conf
## restart the http service
sudo service apache2 restart
## adding the PHP Repository
sudo add-apt-repository ppa:ondrej/php -y
## update
sudo apt update
## install php
sudo apt install php7.0 php7.0-mcrypt php7.0-mysql php7.0-curl php7.0-mbstring libapache2-mod-php7.0 php7.0-common php7.0-xml -y
## change to port 7071
echo "Listen 8080" >> /etc/apache2/apache2.conf
## install phpsysinfo
cd /var/www/html
rm -R *
wget https://github.com/phpsysinfo/phpsysinfo/archive/master.zip
unzip master.zip
cp -r phpsysinfo-master/* /var/www/html
mkdir html
cp -r phpsysinfo-master/* /var/www/html/html
mv phpsysinfo.ini.new phpsysinfo.ini
cd html
mv phpsysinfo.ini.new phpsysinfo.ini
## restart
sudo service apache2 restart