source: BOL/script_install/install_ubuntu22_packages.sh

Last change on this file was 4778, checked in by fhourdin, 6 months ago

Install testés sur ordi DELL enseignement.

  • Property svn:executable set to *
File size: 6.6 KB
Line 
1#!/bin/bash
2
3################################################################
4# Complément d'installation Ubuntu22
5# Frédéric Hourdin.
6#
7# Developpe et utilise a fins personnelles et pour les PCs
8# enseignement.
9# Permet de faire tourner entre autres LMDZ et les outils HighTune
10################################################################
11
12base=1
13compilation=1
14hightune=1
15bureautique=1
16latex=1
17graphique=1
18ferret=1
19system=1
20son=0
21acroread=1
22workspace_matrix=0
23miniconda=1
24panoply=1
25cours_m2=1
26
27install="sudo apt install -y"
28sudo apt update
29sudo apt upgrade
30
31#===============================================================================
32if [ $base = 1 ] ; then
33    # Base :
34    # ======
35    $install locate
36    $install ncftp vim nfs-common
37    # keychain semble etre devenu obsolete.
38    # ksh et csh inutile ?
39    for file in /home/*/.bashrc ; do
40        cat >> $file <<........eod
41        alias rm='rm -i'
42        alias cp='cp -i'
43        alias mv='mv -i'
44........eod
45    done
46fi
47#===============================================================================
48if [ $compilation = 1 ] ; then
49    # Pour compilation dont LMDZ
50    # ==========================
51    $install cdo nco netcdf-bin libnetcdf-dev libnetcdff-dev ncview   # netcdf
52    $install gfortran g++ libblas-dev subversion git git-lfs   # fortran et svn
53    $install openmpi-common libopenmpi-dev openmpi-bin # openmpi
54    $install make cmake
55fi
56#===============================================================================
57if [ $hightune = 1 ] ; then
58    # Pour HitghTune
59    # ==============
60    $install r-base
61    $install pip
62    $install python3-pip
63fi
64#===============================================================================
65if [ $bureautique = 1 ] ; then
66    # bureautique
67    # ===========
68    $install xournal
69    $install unoconv # conversion associee a libreoffice
70    $install dos2unix
71    $install qpdfview # un visualiseur remplissant mieux les pdf
72    $install pdftk # Autre package de concatenation de pdf
73    $install chromium-browser
74    $install pandoc # markdown
75fi
76#===============================================================================
77if [ $latex = 1 ] ; then
78    # LaTeX dont pdfjam
79    # =================
80    $install texlive-base texlive-latex-extra texlive-lang-french latexdiff  texlive-publishers
81    $install latexmk texlive-science
82    $install latex2html
83    $install texlive-extra-utils texlive-font-utils # pdfjam
84fi
85#===============================================================================
86if [ $graphique = 1 ] ; then
87    # graphique / video
88    # =================
89    $install xfig grads imagemagick gv grace           # graphique
90    $install inkscape gimp                             # dessin
91    $install gifsicle
92    $install ffmpeg
93    $install winff  # autre convertisseur video
94fi
95#===============================================================================
96if [ $ferret = 1 ] ; then
97    $install ferret-vis ferret-datasets
98    # Finalisation de l'installation de ferret-vis
99    # ============================================
100    # Active le bon environnement pour ferret
101    # Attention, pour que ca fonctionne completement (notamment le trace
102    # des frontieres) il manque des données.
103    # Pour le moment, on va chercher ces données dans le répertoire de
104    # l'installation conda. On a donc une double installation
105    for file in /home/*/.bashrc ; do
106        sed -i'' -e '/ferret-vis/d' $file
107        cat <<........eod>> $file
108        . /usr/share/ferret-vis/bin/ferret_paths # ferret-vis
109        alias ferret=ferret_c
110        export FER_DATA=". \$FER_DATA"
111........eod
112    done
113    cd /tmp
114    wget http://www.lmd.jussieu.fr/~lmdz/data_ferret.tar
115    cd /usr/share/ferret-vis
116    sudo tar xvf /tmp/data_ferret.tar
117fi
118#===============================================================================
119if [ $system = 1 ] ; then
120    # Outils systeme / collaboratifs
121    # ==============================
122    $install traceroute # aide systeme
123    $install synaptic gdebi                            # install paquets
124    $install tmate
125fi
126#===============================================================================
127if [ $son = 1 ] ; then
128    # Son
129    #=====
130    $install audacity
131fi
132#===============================================================================
133if [ $acroread = 1 ] ; then
134    # Acroread
135    # ========
136    sudo dpkg --add-architecture i386
137    $install libxml2:i386 libcanberra-gtk-module:i386 gtk2-engines-murrine:i386
138    $install libatk-adaptor:i386 libgdk-pixbuf2.0-0:i386
139    wget -O /tmp/adobe.deb ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/9.5.5/enu/AdbeRdr9.5.5-1_i386linux_enu.deb
140    sudo dpkg -i /tmp/adobe.deb
141fi
142#===============================================================================
143if [ $workspace_matrix = 1 ] ; then 
144    # Firefox
145    # =======
146    # Reinstallation d’une version de firefox pour permettre le multigrille
147    # https://ubuntuhandbook.org/index.php/2022/04/install-firefox-deb-ubuntu-22-04/
148    sudo snap remove firefox
149    sudo apt remove firefox
150    sudo add-apt-repository ppa:mozillateam/ppa
151    sudo cat <<....eod> /tmp/mozillateamppa
152    Package: firefox*
153    Pin: release o=LP-PPA-mozillateam
154    Pin-Priority: 501
155....eod
156    sudo cp /tmp/mozillateamppa /etc/apt/preferences.d/
157    sudo apt install -y chrome-gnome-shell
158    sudo apt install -y firefox
159   
160    echo Run firefox https://extensions.gnome.org/extension/1485/workspace-matrix/
161    echo first clicks in the top frame, install gnome extension, or so.
162    echo then reload browser
163    echo then click on the OFF button
164fi
165
166#===============================================================================
167if [ $miniconda = 1 ] ; then 
168   cd /tmp
169   wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
170   cd
171   # Option -b pour installer sans repondre aux droits
172   bash /tmp/Miniconda3-latest-Linux-x86_64.sh -b
173   export PATH=~/miniconda3/bin:$PATH
174   conda activater ; conda init ; conda deactivate
175   #conda init --reverse bash
176   conda create -n FERRET -c conda-forge pyferret ferret_datasets --yes
177   \rm -f Miniconda3-latest-Linux-x86_64.sh
178   wget http://www.lmd.jussieu.fr/~hourdin/COURS/UTILS/environment.yaml
179   if [ $cours_m2 ] ; then
180      conda env create -f environment.yaml
181      \rm -f environment.yaml
182   fi
183fi
184
185#===============================================================================
186if [ $panoply = 1 ] ; then 
187    cd
188    sudo apt-get install openjdk-11-jre
189    wget https://www.giss.nasa.gov/tools/panoply/download/PanoplyJ-5.3.0.tgz
190    tar xvzf PanoplyJ-5.3.0.tgz
191    \rm -f PanoplyJ-5.3.0.tgz
192    cd PanoplyJ/
193    # ./panoply.sh devrait ouvrir la fenêtre Panoply
194fi
Note: See TracBrowser for help on using the repository browser.