-
Notifications
You must be signed in to change notification settings - Fork 0
/
one_script.sh
executable file
·116 lines (94 loc) · 3.28 KB
/
one_script.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#!/bin/bash
###output function
echo_green () {
green=`tput setaf 2`
reset=`tput sgr0`
word=$1
echo $green $word $reset
}
echo_red () {
red=`tput setaf 1`
reset=`tput sgr0`
word=$1
echo $red $word $reset
}
echo_green "### One Script Shall Install Them All ###"
echo_green "### Start Add PPA and do upgrade first###"
sudo apt-get update
sudo add-apt-repository ppa:ondrej/php -y
sudo add-apt-repository ppa:webupd8team/java -y
##sudo apt-get -y upgrade
echo_green "### Update ###"
sudo apt-get update
echo_green "### Install zsh ###"
sudo apt-get -qy install terminator
sudo apt-get -qy install zsh
sudo chsh -s $(which zsh)
echo_green "### Install CURL & Oh My Zsh! ###"
sudo apt-get -y install curl wget
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
echo_green "### Install PHP ###"
sudo apt-get -qy install php \
php-mysql \
php-soap \
php-mbstring \
php-mcrypt \
php-mongodb \
php-cli \
php-xml \
php-zip \
php-tokenizer \
php-pdo \
echo_green "### Install Composer ###"
EXPECTED_SIGNATURE=$(wget -q -O - https://composer.github.io/installer.sig)
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_SIGNATURE=$(php -r "echo hash_file('SHA384', 'composer-setup.php');")
if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]
then
>&2 echo_red "ERROR: Invalid installer signature"
rm composer-setup.php
echo 1
fi
php composer-setup.php --quiet
RESULT=$?
rm composer-setup.php
echo $RESULT
echo_green "### Install GIT ###"
sudo apt-get -y install git
echo_green "### Install python & python3 ###"
sudo apt-get -y install python-pip python-dev python3-pip python3-dev python-software-properties
echo_green "### Install debconf-utils ###"
sudo apt-get -y install debconf-utils
echo_green "### Install thefuck ###"
sudo pip install psutil thefuck
echo_green "### Install htop ###"
sudo apt-get -y install htop
echo_green "### Install NodeJs ###"
sudo apt-get -y install nodejs
echo_green "### Install VIM ###"
sudo apt-get -y install vim
echo_green "### Install JAVA 8 ###"
echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | sudo debconf-set-selections
sudo apt-get install -y oracle-java8-installer
echo_green "### Install Angular CLI ###"
sudo npm install -g @angular/cli
echo_green "### Install Docker ###"
sudo apt-get -y install \
apt-transport-https \
ca-certificates \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt-get update
sudo apt-get -y install docker-ce
echo_green "### Install Docker Compose 1.16.0 ###"
sudo curl -L https://github.com/docker/compose/releases/download/1.16.0-rc1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
echo_red "### If docker-compose install commad not work , try sudo -i "
echo_red " $ curl -L https://github.com/docker/compose/releases/download/1.16.0-rc1/docker-compose-\`uname -s\`-\`uname -m\` > /usr/local/bin/docker-compose"
echo_red " $ chmod +x /usr/local/bin/docker-compose "
echo_red " $ exit "