Prérequis : 

Ubuntu 18.04 LTS Server  est un système d’exploitation open source

R est un langage de programmation pour l’informatique statistique et les graphiques

RSTUDIO est un environnement de développement intégré (IDE) pour le logiciel R

Navigateur Web pour les postes clients

 

Etape :

 1) Installation de Ubuntu 18.04 Server

 2) Configuration TCP/IP du serveur

 3) Installation du logiciel R

 4) Installation du logiciel Rstudio Server

 5) Installation des packages

 6) Création des comptes enseignants et etudiants dans ubuntu 18.04 Server

 7) Test

 

Configuration TCP/IP.

Donner une adresse IP statique au Serveur

# vi /etc/netplan/01-netcfg.yaml

network:
    version: 2
    renderer: networkd
    ethernets:
        ens18:
            dhcp4: no
            dhcp6: no
            addresses: [192.168.17.18/20]
            gateway4: 192.168.16.1
            nameservers:
                addresses: [192.168.1.1]

 

Appliquer le changement 

# netplan apply

 

Configurer le serveur DNS pour la résolutiond'adresse

# vi /etc/systemd/resolved.conf
    [Resolve]
    DNS=192.168.1.1

 

Redémarrer le service DNS 

# service systemd-resolved restart

 

Vérifier l'état du service DNS 

# systemd-resolve --status

 

Configurer le fichier hosts

vi /etc/hosts
127.0.0.1 localhost
127.0.1.1 dsi-rstudio1.alcd.fr dsi-rstudio1
192.168.17.18 dsi-rstudio1.alcd.fr dsi-rstudio1

192.168.1.10 ntp-server-host  * RM: -> a remplacer par l'adresse IP de votre serveur NTP

 

Configurer le service ntp pour la synchronisation de l'heure du serveur

# vi /etc/systemd/timesyncd.conf
[Time]
NTP=ntp.alcd.fr  * RM: -> a remplacer par le nom de votre serveur NTP

 

Redémarrer le service NTP 

# systemctl restart systemd-timesyncd

 

Vérifier l'état du service NTP 

# systemctl status systemd-timesyncd

 

Mettre à jour le système 

# apt-get update

# apt-get upgrade

 

Installation de RSTUDIO Server 

# apt-get install r-base

# apt-get install gdebi-core

# wget https://download2.rstudio.org/rstudio-server-1.1.463-amd64.deb

# gdebi rstudio-server-1.1.463-amd64.deb

Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading state information... Done

RStudio Server
RStudio is a set of integrated tools designed to help you be more productive with R. It includes a console, syntax-highlighting editor that supports direct code execution, as well as tools for plotting, history, and workspace management.
Do you want to install the software package? [y/N]:y
Selecting previously unselected package rstudio-server.
(Reading database ... 180932 files and directories currently installed.)
Preparing to unpack rstudio-server-1.1.463-amd64.deb ...
Unpacking rstudio-server (1.1.463) ...
Setting up rstudio-server (1.1.463) ...
groupadd: group 'rstudio-server' already exists
rsession: no process found
Created symlink /etc/systemd/system/multi-user.target.wants/rstudio-server.service -> /etc/systemd/system/rstudio-server.service.
* rstudio-server.service - RStudio Server
Loaded: loaded (/etc/systemd/system/rstudio-server.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2018-10-31 09:09:57 +04; 1s ago
Process: 6022 ExecStart=/usr/lib/rstudio-server/bin/rserver (code=exited, status=0/SUCCESS)
Main PID: 6030 (rserver)
Tasks: 3 (limit: 4915)
CGroup: /system.slice/rstudio-server.service
`-6030 /usr/lib/rstudio-server/bin/rserver

oct. 31 09:09:57 dsi-ptu-xrdp1 systemd[1]: Starting RStudio Server...
oct. 31 09:09:57 dsi-ptu-xrdp1 systemd[1]: Started RStudio Server.

 

Vérifier l'état du serveur RSTUDIO 

# ps -ef

rstudio+ 6030 1 0 09:09 ? 00:00:00 /usr/lib/rstudio-server/bin/rserver

 

Créer  le compte demo1 dans ubuntu 18.04 Server

# useradd -m -d /home/demo1 demo1 -s /bin/bash -c "Compte en demo"

# passwd demo1

Enter new UNIX password:temp2019
Retype new UNIX password:temp2019
passwd: password updated successfully

 

Tester le fonctionnement

# http://192.168.17.18:8787

 

Installer les packages supplémentaires : packages pixmap, packages FactoMineR, packages flashClust, packages xtable, 

# apt-get update

# apt-get install curl

# apt-get install libcurl4-openssl-dev

# rstudio-server verify-installation

# sudo R

R version 3.4.4 (2018-03-15) -- "Someone to Lean On"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> install.packages("pixmap", lib="/usr/local/lib/R/site-library")

** building package indices
** testing if installed package can be loaded
* DONE (pixmap)

The downloaded source packages are in
'/tmp/RtmpA5deoI/downloaded_packages'

> install.packages("flashClust", lib="/usr/local/lib/R/site-library")

** building package indices
** testing if installed package can be loaded
* DONE (flashClust)

The downloaded source packages are in
'/tmp/RtmpA5deoI/downloaded_packages'

> install.packages("xtable", lib="/usr/local/lib/R/site-library")

** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (xtable)

The downloaded source packages are in
'/tmp/RtmpA5deoI/downloaded_packages'

> install.packages("FactoMineR", lib="/usr/local/lib/R/site-library")

** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (FactoMineR)

The downloaded source packages are in
'/tmp/RtmpAYDnNq/downloaded_packages'

> q()
Save workspace image? [y/n/c]: y

 

 

Créer  les comptes enseignants et etudiants dans ubuntu 18.04 Server

#

 

Re-tester le fonctionnement

# http://192.168.17.18:8787