-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMintInstall.sh
More file actions
executable file
·325 lines (285 loc) · 9.37 KB
/
MintInstall.sh
File metadata and controls
executable file
·325 lines (285 loc) · 9.37 KB
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
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
#!/usr/bin/env bash
if [[ $EUID -eq 0 ]]; then
clear
echo " !!! ATENÇÃO !!!"
echo " NÃO execute este script como root!"
echo " Presione qualquer tecla para sair..."
read -s -n 1 -p " "
exit
fi
# ----------------------------- VARIÁVEIS ----------------------------- #
GIT_USER="seuUsuarioGit"
GIT_EMAIL="seuemailgit@email.com"
PASTA_USUARIO=$HOME
PPA_GIMP="ppa:ubuntuhandbook1/gimp"
PPA_LIBRE="ppa:libreoffice/ppa"
PPA_INKS="ppa:inkscape.dev/stable"
PPA_PHP="ppa:ondrej/php"
PPA_GRAPHICS_DRIVERS="ppa:graphics-drivers/ppa"
URL_WINE_KEY="https://dl.winehq.org/wine-builds/winehq.key"
URL_PPA_WINE="https://dl.winehq.org/wine-builds/ubuntu/"
URL_GOOGLE_CHROME="https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb"
URL_4K_VIDEO_DOWNLOADER="https://dl.4kdownload.com/app/4kvideodownloader_4.18.5-1_amd64.deb"
URL_ANYDESK="https://download.anydesk.com/linux/anydesk_6.1.1-1_amd64.deb"
URL_FDM="https://dn3.freedownloadmanager.org/6/latest/freedownloadmanager.deb"
URL_VCODE="https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64"
URL_SKYPE="https://go.skype.com/skypeforlinux-64.deb"
URL_WORKB="https://dev.mysql.com/get/Downloads/MySQLGUITools/mysql-workbench-community_8.0.27-1ubuntu20.04_amd64.deb"
DIRETORIO_DOWNLOADS="$PASTA_USUARIO/Downloads/programas"
PROGRAMAS_PARA_INSTALAR=(
mint-meta-codecs
dos2unix
language-pack-gnome-pt
language-pack-kde-pt
language-pack-pt-base
winff
guvcview
flameshot
steam-installer
steam-devices
steam:i386
ratbagd
gimp
gimp-gmic
gmic
gimp-plugin-registry
p7zip-rar
p7zip-full
lzma
lzma-dev
rar
unrar-free
p7zip
ark
ncompress
qt5-default
vlc
vlc-l10n
gdebi-core
gparted
inkscape
audacity
libdvd-pkg
libreoffice
libreoffice-styl*
libreoffice-l10n-pt-br
firefox-locale-pt
libavcodec-extra
ttf-mscorefonts-installer
ubuntu-restricted-extras
apt-transport-https
ffmpeg
libavcodec-extra
libdvdcss2
gpart
build-essential
libvulkan1
libvulkan1:i386
libgnutls30:i386
libldap-2.4-2:i386
libgpg-error0:i386
libxml2:i386
libasound2-plugins:i386
libsdl2-2.0-0:i386
libfreetype6:i386
libdbus-1-3:i386
libsqlite3-0:i386
filezilla
vim
clang
cmake
ninja-build
pkg-config
libgtk-3-dev
wget
git
git-flow
zsh
net-tools
openssl
mcrypt
php8.1
php8.1-mcrypt
php8.1-common
php8.1-mysql
php8.1-sqlite3
php8.1-dom
php8.1-bcmath
php8.1-xml
php8.1-xmlrpc
php8.1-curl
php8.1-gd
php8.1-imagick
php8.1-cli
php8.1-dev
php8.1-imap
php8.1-mbstring
php8.1-opcache
php8.1-soap
php8.1-zip
php8.1-intl
php8.1-cgi
php8.1-pgsql
php8.1-ldap
nodejs
gcc
g++
make
nodejs
yarn
npm
)
# ---------------------------------------------------------------------- #
# ----------------------------- REQUISITOS ----------------------------- #
## Removendo travas eventuais do apt ##
sudo rm /var/lib/dpkg/lock-frontend
sudo rm /var/cache/apt/archives/lock
## Adicionando/Confirmando arquitetura de 32 bits ##
sudo dpkg --add-architecture i386
## Atualizando o repositório ##
sudo apt update -y && sudo apt upgrade -y && sudo apt dist-upgrade -y && sudo apt autoclean && sudo apt autoremove -y
sudo apt install curl -y
sudo apt install software-properties-common -y
## Repositório Nodejs ##
curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
## Adicionando repositórios de terceiros e suporte a Snap (Driver Logitech, Lutris e Drivers Nvidia)##
sudo add-apt-repository "$PPA_GIMP" -y
sudo add-apt-repository "$PPA_INKS" -y
sudo add-apt-repository "$PPA_LIBRE" -y
sudo add-apt-repository "$PPA_PHP" -y
sudo apt-add-repository "$PPA_GRAPHICS_DRIVERS" -y
wget -nc "$URL_WINE_KEY"
sudo apt-key add winehq.key
sudo apt-add-repository "deb $URL_PPA_WINE focal main"
# ---------------------------------------------------------------------- #
# ----------------------------- EXECUÇÃO ----------------------------- #
## Atualizando o repositório depois da adição de novos repositórios ##
sudo apt update -y && sudo apt upgrade -y && sudo apt dist-upgrade -y && sudo apt autoclean && sudo apt autoremove -y
## Download e instalaçao de programas externos ##
mkdir "$DIRETORIO_DOWNLOADS"
wget -c "$URL_GOOGLE_CHROME" -P "$DIRETORIO_DOWNLOADS"
wget -c "$URL_4K_VIDEO_DOWNLOADER" -P "$DIRETORIO_DOWNLOADS"
wget -c "$ANYDESK" -P "$DIRETORIO_DOWNLOADS"
wget -c "$URL_FDM" -P "$DIRETORIO_DOWNLOADS"
wget -c "$URL_VCODE" -P "$DIRETORIO_DOWNLOADS"
wget -c "$URL_SKYPE" -P "$DIRETORIO_DOWNLOADS"
wget -c "$URL_WORKB" -P "$DIRETORIO_DOWNLOADS"
## Instalando pacotes .deb baixados na sessão anterior ##
sudo dpkg -i $DIRETORIO_DOWNLOADS/*.deb
# Instalar programas no apt
for nome_do_programa in ${PROGRAMAS_PARA_INSTALAR[@]}; do
if ! dpkg -l | grep -q $nome_do_programa; then # Só instala se já não estiver instalado
apt install "$nome_do_programa" -y
else
echo "[INSTALADO] - $nome_do_programa"
fi
done
sudo apt install -f
sudo apt install --install-recommends winehq-stable wine-stable wine-stable-i386 wine-stable-amd64 -y
sudo dpkg-reconfigure libdvd-pkg
sudo rm /etc/apt/preferences.d/nosnap.pref
sudo apt install snapd
# ----------------------------- PÓS-INSTALAÇÃO ----------------------------- #
## Finalização, atualização e limpeza##
## Instalando pacotes Snap ##
sudo snap install termius-app
sudo snap install flutter --classic
## Instalando pacotes Flatpak ##
flatpak install flathub com.obsproject.Studio -y
flatpak install flathub com.getpostman.Postman -y
flatpak install flathub com.spotify.Client -y
flatpak install flathub com.google.AndroidStudio -y
# ---------------------------------------------------------------------- #
sudo apt install -f
# Balena Etcher
curl -1sLf \
'https://dl.cloudsmith.io/public/balena/etcher/setup.deb.sh' |
sudo -E bash
sudo apt-get update
sudo apt-get install balena-etcher-electron
# Oh-my-zsh
chsh -s $(which zsh)
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# Atualizações
sudo apt update -y && sudo apt upgrade -y && sudo apt dist-upgrade -y && sudo apt autoclean && sudo apt autoremove -y
flatpak update
sudo snap refresh
# ---------------------------------------------------------------------- #
## Configuracoes do flutter #
flutter sdk-path
flutter config --no-analytics
flutter upgrade
## Configuracao GIT #
git config --global user.name "$GIT_USER"
git config --global user.email "$GIT_EMAIL"
git config --global core.editor vim
git config --list
ssh-keygen -t ed25519 -C "$GIT_EMAIL"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
## Instalacao Composer #
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php
php -r "unlink('composer-setup.php');"
sudo mv composer.phar /usr/local/bin/composer
composer self-update
## Parar e remover serviço apache instalado com PHP 8 #
sudo /etc/init.d/apache2 stop
sudo systemctl stop apache2.service
sudo systemctl stop apache2
sudo systemctl disable apache2
sudo apt remove apache2 -y
## Atalho Nodejs
sudo ln -s /usr/bin/nodejs /usr/bin/node
## Instalacao XAMPP 5.6 #
if [ ! -d "/opt/lampp/etc" ]; then
wget https://ufpr.dl.sourceforge.net/project/xampp/XAMPP%20Linux/5.6.40/xampp-linux-x64-5.6.40-1-installer.run
sudo chmod 755 xampp-linux-x64-5.6.40-1-installer.run
sudo ./xampp-linux-x64-5.6.40-1-installer.run --mode text --installer-language pt_BR
sudo rm xampp-linux*
sudo ln -s /opt/lampp/htdocs/ $PASTA_USUARIO/htdocs
sudo chmod 777 -R $PASTA_USUARIO/htdocs
sudo sed -i 's/display_errors=On/display_errors=Off/g' /opt/lampp/etc/php.ini
sudo sed -i 's/short_open_tag=Off/short_open_tag=On/g' /opt/lampp/etc/php.ini
rm -f $PASTA_USUARIO/.local/share/applications/XAMPP.desktop
rm -f $PASTA_USUARIO/Desktop/XAMPP.desktop
rm -f "$PASTA_USUARIO/Área de Trabalho/XAMPP.desktop"
sudo rm -f /usr/share/applications/XAMPP.desktop
cat >"$PASTA_USUARIO/.local/share/applications/XAMPP.desktop" <<EOT
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=XAMPP Control Panel
Comment=Start and Stop XAMPP
Exec=sudo /opt/lampp/manager-linux-x64.run
Icon=/opt/lampp/htdocs/favicon.ico
Categories=Development
Type=Application
Terminal=true
EOT
chown $USER:$USER -R "$PASTA_USUARIO/.local/share/applications/XAMPP.desktop"
chmod 755 -R "$PASTA_USUARIO/.local/share/applications/XAMPP.desktop"
ln -s "$PASTA_USUARIO/.local/share/applications/XAMPP.desktop" $PASTA_USUARIO/Desktop/XAMPP.desktop
ln -s "$PASTA_USUARIO/.local/share/applications/XAMPP.desktop" "$PASTA_USUARIO/Área de Trabalho/XAMPP.desktop"
sudo cp "$PASTA_USUARIO/.local/share/applications/XAMPP.desktop" /usr/share/applications/XAMPP.desktop
sudo chmod 755 -R /usr/share/applications/XAMPP.desktop
echo "XAMPP Instalado com sucesso!"
## Crinado Link simbólico Mysql #
sudo ln -s /opt/lampp/bin/mysql /usr/bin/mysql
# sudo /opt/lampp/lampp start
# xdg-open http://localhost
else
echo "Já exite uma instalação do XAMPP"
fi
## Apagando pasta de Downloads #
sudo rm -rf "$DIRETORIO_DOWNLOADS"
clear
echo "Adicione as informações abaixo ao seu github:"
echo ""
cat ~/.ssh/id_ed25519.pub
echo " "
echo "Atualizações concluídas"
read -s -n 1 -p "Pressione Enter para sair..."
exit