2022-05-30 11:36:14 +02:00
#!/bin/bash
# version 2.0.1
# Script crée par Tykayn
# Copyleft 2018 Tykayn
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
#code mise en forme
neutre = '\e[0;m'
conseil = '\e[1;32m' #vert
clear
# sudo!
if [ " $UID " -ne "0" ]
then
echo -e " Il faut etre root pour executer ce script. ==> ${ conseil } sudo ./tykayn_postinstall.sh ${ neutre } "
exit
fi
# script appelé par le script post-install dans le cas du choix profil automatique (tykayn 16)
### Developement tools
echo -e " ${ conseil } Ce script va installer de quoi faire marcher des sites web localement, des logiciels de bureautique et de graphisme. enjoy! ${ neutre } "
echo "*******************************************************"
# config de clavier
# TODO: FIX
# echo "keybaord config"
# mv /etc/default/keyboard /etc/default/keyboard_backup
# wget https://gitlab.com/tykayn1/cipherbliss.com/raw/master/bash/postinstall/keyboard --directory-prefix=/etc/default
echo "dolphin config"
mv /etc/default/keyboard /etc/default/keyboard_backup
wget https://gitlab.com/tykayn1/cipherbliss.com/raw/master/bash/postinstall/user_config/dolphinrc --directory-prefix= /home/$USER /.config/
echo "add aliases to user profile"
# https://frama.link/tk_setup is equivalent to
# https://gitlab.com/tykayn1/cipherbliss.com/raw/master/bash/postinstall/tykayn_postinstall.sh
# wget https://frama.link/tk_setup --directory-prefix=/home/$USER
wget https://gitlab.com/tykayn1/cipherbliss.com/raw/master/bash/aliases.sh --directory-prefix= /home/$USER
mv /home/$USER /aliases.sh /home/$USER /.bash_aliases
echo "update and upgrade packages"
apt update && apt upgrade
### main programs
2022-07-06 22:58:02 +02:00
apt install git nano zsh nodejs npm docker docker-compose virtualbox pidgin openvpn curl -y
2022-05-30 11:36:14 +02:00
npm i -g yarn @angular/cli
### install oh my zsh
sh -c " $( curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh) "
2022-07-06 22:58:02 +02:00
echo "source ~/.bash_aliases" >> /home/$USER /.zshrc
2022-05-30 11:36:14 +02:00
# LAMP server
# https://doc.ubuntu-fr.org/lamp#installation
2022-07-06 22:58:02 +02:00
apt install mysql-server php-mysql php-curl php-gd php-intl php-json php-mbstring php-xml php-zip php-fpm nginx postgresql -y
2022-05-30 11:36:14 +02:00
# PHP related
# php extensions
#apache server
2022-07-06 22:58:02 +02:00
#a2enmod rewrite
2022-05-30 11:36:14 +02:00
echo "installing composer"
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
### Internet/Web
2022-07-06 22:58:02 +02:00
apt install firefox chromium-browser -y
2022-05-30 11:36:14 +02:00
### Multimédia
apt install gnome-mpv vlc blender kdenlive -y
### Graphisme
apt install mypaint krita krita-l10n -y
2022-07-06 22:20:42 +02:00
#apt purge gimp -y ; add-apt-repository -y ppa:otto-kesselgulasch/gimp ; apt update ; apt upgrade -y ; apt install gimp -y #gimp dernière version avec snap
# livestream obs studio
add-apt-repository ppa:obsproject/obs-studio
apt update
apt install obs-studio
2022-05-30 11:36:14 +02:00
### Outils
#Support système de fichier BTRFS
#Support système de fichier ExFat
#Support d'autres systèmes de fichier (f2fs, jfs, nilfs, reiserfs, udf, xfs, zfs)
2022-07-06 22:58:02 +02:00
apt install baobab grsync screen subdownloader audacity easytag screenfetch ncdu exfat-utils exfat-fuse f2fs-tools jfsutils nilfs-tools reiser4progs reiserfsprogs udftools xfsprogs xfsdump zfsutils-linux zfs-initramfs -y
2022-07-06 22:20:42 +02:00
#### démarrage de la distribution
apt install plymouth-theme-breeze kde-config-plymouth
2022-05-30 11:36:14 +02:00
######## config clavier
#Gnome Shell : augmenter durée capture vidéo de 30s à 10min
su $SUDO_USER -c "gsettings set org.gnome.settings-daemon.plugins.media-keys max-screencast-length 600"
#Optimisation grub : dernier OS booté comme choix par défaut
sed -ri 's/GRUB_DEFAULT=0/GRUB_DEFAULT="saved"/g' /etc/default/grub ; echo 'GRUB_SAVEDEFAULT="true"' >> /etc/default/grub
updade-grub
#Grub réduction temps d'attente + suppression test ram dans grub
sed -ri 's/GRUB_TIMEOUT=10/GRUB_TIMEOUT=2/g' /etc/default/grub ; mkdir /boot/old ; mv /boot/memtest86* /boot/old/
#Swapiness 95% +cache pressure 50
echo vm.swappiness= 5 | tee /etc/sysctl.d/99-swappiness.conf ; sysctl -p /etc/sysctl.d/99-swappiness.conf### Bureautique
apt install libreoffice-style-breeze libreoffice-style-elementary libreoffice-style-human libreoffice-style-sifr libreoffice-style-tango libreoffice-templates hunspell-fr mythes-fr hyphen-fr openclipart-libreoffice-y
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | /usr/bin/debconf-set-selections | apt install ttf-mscorefonts-installer -y
#TLP pour économie d'énergie pour les pc portable.
wget https://gitlab.com/simbd/Scripts_Ubuntu/raw/master/EconomieEnergie_TLP_Bionic.sh ; chmod +x EconomieEnergie_TLP_Bionic.sh
./EconomieEnergie_TLP_Bionic.sh ; rm EconomieEnergie_TLP_Bionic.sh
#police d'écriture MS
#plugin correction grammalecte
wget https://www.dicollecte.org/grammalecte/oxt/Grammalecte-fr-v0.6.2.oxt && chown $SUDO_USER Grammalecte* && chmod +x Grammalecte* ; unopkg add --shared Grammalecte*.oxt && rm Grammalecte*.oxt ; chown -R $SUDO_USER :$SUDO_USER /home/$SUDO_USER /.config/libreoffice #grammalecte
2022-07-06 22:20:42 +02:00
# jeux
2022-05-30 11:36:14 +02:00
apt install steam -y
2022-07-06 22:20:42 +02:00
# administration système et dev
2022-07-06 22:58:02 +02:00
apt install ansible borgbackup python3 python3-pip npm -y
2022-07-06 22:20:42 +02:00
pip3 -v install vosk
2022-07-06 22:58:02 +02:00
# node version manager
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
2022-07-06 22:20:42 +02:00
2022-05-30 11:36:14 +02:00
#snaps
2022-07-06 22:58:02 +02:00
snap install tor-mkg20001 postman rambox freemind emacs gimp postman ufw vlc thunderbird
2022-07-06 22:20:42 +02:00
snap install phpstorm --classic
2022-07-06 22:58:02 +02:00
snap install blender --classic
2022-05-30 11:36:14 +02:00
#config mysql
2022-07-06 22:20:42 +02:00
#mysql_secure_installation
2022-05-30 11:36:14 +02:00
#config git
git config --global credential.helper store
2022-07-06 22:20:42 +02:00
git config --global rerere.enabled true
git config --global user.email contact@cipherbliss.com
git config --global user.name TyKayn
# dev
# développement en ruby, RVM
curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -\n curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -\n curl -sSL https://get.rvm.io | sudo bash -s stable
source /etc/profile.d/rvm.sh
rvm install 2.7.4
# composer
curl -s https://getcomposer.org/installer | php
cp composer.phar /usr/local/bin/composer.phar
# Erlang elixir
wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb && sudo dpkg -i erlang-solutions_2.0_all.deb
apt-get update -y
apt-get install esl-erlang elixir
2022-05-30 11:36:14 +02:00
# Nettoyage fichiers/dossiers inutiles qui étaient utilisés par le script
rm *.zip ; rm *.tar.gz ; rm *.tar.xz ; rm *.deb ; cd .. && rm -rf /home/$SUDO_USER /script_postinstall
clear
# Maj/Nettoyage
apt update ; apt autoremove --purge -y ; apt clean ; cd .. ; clear
echo -e " ${ conseil } TADAM! ça c'est fait ${ neutre } "
echo "*******************************************************"
echo "Script fait par Tykayn - https://www.cipherbliss.com"
echo "Pour prendre en compte tous les changements, il faut maintenant redémarrer !"
read -p "Voulez-vous redémarrer immédiatement ? [o/N] " rep_reboot
if [ " $rep_reboot " = "o" ] || [ " $rep_reboot " = "O" ]
then
reboot
fi
2022-07-06 22:20:42 +02:00