forked from mathiasbynens/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 49
/
firstInstallDebianBased.sh
executable file
·265 lines (225 loc) · 5.15 KB
/
firstInstallDebianBased.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
#!/usr/bin/env bash
# use the bash as default "sh", fixed some problems
# with e.g. third-party scripts
#sudo ln -sf /bin/bash /bin/sh
function ask_install() {
echo
echo
read -p"$1 (y/n) " -n 1
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
return 1
else
return 0
fi
}
# Make sure only root can run our script
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root"
echo "Plese use sudo or su"
exit 1
fi
# use aptitude in the next steps ...
if [ \! -f $(whereis aptitude | cut -f 2 -d ' ') ] ; then
apt-get install aptitude
fi
# update && upgrade
ask_install "upgrade your system?"
if [[ $? -eq 1 ]]; then
aptitude update
aptitude upgrade
fi
aptitude install \
`# read-write NTFS driver for Linux` \
ntfs-3g \
`# do not delete main-system-dirs` \
safe-rm \
`# default for many other things` \
tmux \
build-essential \
autoconf \
make \
cmake \
dialog \
`# unzip, unrar etc.` \
cabextract \
zip \
unzip \
rar \
unrar \
tar \
pigz \
p7zip \
p7zip-full \
p7zip-rar \
unace \
bzip2 \
gzip \
xz-utils \
advancecomp \
`# optimize image-size` \
gifsicle \
optipng \
pngcrush \
pngnq \
pngquant \
jpegoptim \
libjpeg-progs \
jhead \
`# utilities` \
coreutils \
findutils \
net-tools \
`# fast alternative to dpkg -L and dpkg -S` \
dlocate \
`# quickly find files on the filesystem based on their name` \
mlocate \
locales \
`# removing unneeded localizations` \
localepurge \
sysstat \
tcpdump \
colordiff \
moreutils \
atop \
ack-grep \
ngrep \
`# interactive processes viewer` \
htop \
`# mysql processes viewer` \
mytop \
`# interactive I/O viewer` \
iotop \
`# mysql tools` \
percona-toolkit \
tree \
`# disk usage viewer` \
ncdu \
rsync \
whois \
vim \
csstidy \
recode \
exuberant-ctags \
`# GNU bash` \
bash \
bash-completion \
`# command line clipboard` \
xclip \
`# more colors in the shell` \
grc \
`# fonts also "non-free"-fonts` \
`# -- you need "multiverse" || "non-free" sources in your "source.list" -- ` \
fontconfig \
ttf-mscorefonts-installer \
ttf-bitstream-vera \
xfonts-jmk \
`# trace everything` \
strace \
`# get files from web` \
wget \
curl \
w3m \
`# repo-tools`\
git \
subversion \
mercurial \
`# usefull tools` \
nodejs \
npm \
ruby-full \
imagemagick \
lynx \
nmap \
pv \
ucspi-tcp \
xpdf \
sqlite3 \
perl \
python \
python-dev \
python3-pip \
`# install python-pygments for json print` \
python3-pygments
# try zsh?
read -p "Do you want to use the zsh-shell? (y/n) " -n 1 yesOrNo
echo
if [[ $yesOrNo =~ ^[Yy]$ ]]; then
sudo aptitude install zsh
chsh -s $(which zsh)
fi
#
# install java
#
#su -
#echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee /etc/apt/sources.list.d
#echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources
#apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886
#aptitude update
#aptitude install oracle-java7-installer
#exit
#
# install new git / ubuntu
#
#sudo add-apt-repository -y ppa:git-core/ppa
#sudo aptitude update
#sudo aptitude upgrade git
#
# install new git / debian
#
#su -
#echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu precise main" | tee /etc/apt/sources.list.d/git-core.list
#echo "deb-src http://ppa.launchpad.net/git-core/ppa/ubuntu precise main" | tee -a /etc/apt/sources.d/git-core.list
#apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E1DF1F24
#aptitude update
#aptitude upgrade git
#exit
#
# install Sublime Text 3
#
#sudo add-apt-repository -y ppa:webupd8team/sublime-text-3
#sudo aptitude update
#sudo aptitude install sublime-text-installer
#sudo ln -sf /opt/sublime_text/sublime_text /usr/local/bin/sublime
#
# install node.js without deb-files e.g. for Debian - stable
#
#curl https://www.npmjs.org/install.sh | sudo sh
#
# for webworker
#
ask_install "install webworker tools"
if [[ $? -eq 1 ]]; then
echo "update/install ruby-rems ..."
aptitude install ruby ruby-dev
gem update
gem install sass
gem install compass
gem install autoprefixer-rails
gem install compass-rgbapng
gem install oily_png
echo "update/install npm-packages ..."
npm config set strict-ssl false
npm config set registry http://registry.npmjs.org
npm install -g npm
npm update -g
npm install -g diff-so-fancy
npm install -g bower
npm install -g grunt-cli
npm install -g grunt-init
npm install -g yo
npm install -g svgo
echo "install php ..."
aptitude install php php-cli php-bcmath php-dom php-curl php-gd php-intl php-imagick php-imap php-mbstring php-memcached php-mysqli php-mailparse php-json php-intl php-ftp php-readline php-snmp php-tidy php-xml php-xsl php-xdebug php-apcu php-zip
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin
ln -s /usr/bin/composer.phar /usr/bin/composer
fi
# clean downloaded and already installed packages
aptitude -v clean
# update-fonts
cp -vr $( dirname "${BASH_SOURCE[0]}" )/.fonts/* /usr/share/fonts/truetype/
dpkg-reconfigure fontconfig
fc-cache -fv
# update-locate-db
echo "update-locate-db ..."
updatedb -v