forked from JellyBool/laravel-server-script
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlaravel-app-server.sh
51 lines (36 loc) · 1.51 KB
/
laravel-app-server.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
#!/bin/bash
GREENCOLOR='\033[1;32m'
YELLOWCOLOR='\033[1;33m'
NC='\033[0m'
sudo service apache2 stop
sudo apt-get purge apache2 apache2-utils apache2.2-bin apache2-common
sudo apt-get -y autoremove
sudo service apache2 stop
sudo apt-get remove -y apache2*
sudo apt-get -y autoremove
printf "${GREENCOLOR}Nice And Clean,Let's Begin! ${NC} \n\n"
sudo apt-get update
sudo apt-get -y install zsh htop zip unzip composer
printf "${YELLOWCOLOR}Installing Nginx ${NC} \n"
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:nginx/development -y
sudo apt-get update
sudo apt-get -y install nginx
sudo service nginx start
printf "${GREENCOLOR}Adding PPA For PHP7.2 ${NC} \n\n"
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php -y
sudo apt-get update
printf "${GREENCOLOR}Successfully Added PPA For PHP7.2 ${NC} \n\n"
printf "${YELLOWCOLOR}Installing PHP7.2 And PHP7.2-FPM ${NC} \n"
sudo apt-get -y install php7.2
sudo apt-get -y install php7.2-mysql
sudo apt-get -y install php7.2-fpm
sudo apt-get -y install php7.2-curl php7.2-xml php7.2-json php7.2-gd php7.2-mbstring php7.2-bcmath
printf "${GREENCOLOR}Successfully Installed PHP7.1 And PHP7.1-FPM ${NC} \n\n"
printf "${YELLOWCOLOR}Configuring PHP7.2-FPM ${NC} \n"
sudo service php7.2-fpm restart
sudo service apache2 stop
sudo apt-get purge apache2 apache2-utils apache2.2-bin apache2-common
sudo apt-get remove -y apache2*
sudo apt-get -y autoremove
sudo cp /etc/nginx/sites-available/default /etc/nginx/sites-available/default.bak
printf "${GREENCOLOR}Everything is all set! ${NC} \n\n"