Some command lines that could be usefull.
ZSHsh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions # Autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting # Syntax HighlightPuis, modifier le fichier .zshrc:
theme="gnzh" | theme="refined"...plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
Puis, source.zshrc.
# Add Docker's official GPG key:sudo apt-get updatesudo apt-get install ca-certificates curlsudo install -m 0755 -d /etc/apt/keyringssudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.ascsudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/nullsudo apt-get update
# Then
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin<VirtualHost *:80> ServerName example.com ServerAlias www.example.com
HTTP To HTTPS RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined</VirtualHost>
<VirtualHost *:443> ServerName example.com ServerAlias www.example.com
ProxyPreserveHost On ProxyPass / http://localhost:5000/ ProxyPassReverse / http://localhost:5000/
<Location /> Require all granted </Location>
ErrorLog ${APACHE_LOG_DIR}/error_ssl.log CustomLog ${APACHE_LOG_DIR}/access_ssl.log combined</VirtualHost>Then, to enable the site and add HTTPS:
# Install certbotsudo apt install certbot python3-certbot-apache
# Enable the site and the required modulessudo a2ensite web_site_name.confsudo a2enmod ssl headers rewrite proxy proxy_httpsudo systemctl restart apache2.service
# Adding HTTPS using certbotsudo certbot --apache -d example.com -d www.example.com<VirtualHost *:80> ServerName example.com ServerAlias www.example.com
HTTP To HTTPS RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined</VirtualHost>
<VirtualHost *:443> ServerName example.com ServerAlias www.example.com
DocumentRoot /var/www/site <Directory /var/www/site> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory>
ErrorLog ${APACHE_LOG_DIR}/error_ssl.log CustomLog ${APACHE_LOG_DIR}/access_ssl.log combined</VirtualHost>Then, to enable the site and add HTTPS:
# Install certbotsudo apt install certbot python3-certbot-apache
# Enable the site and the required modulessudo a2ensite web_site_name.confsudo a2enmod ssl headers rewritesudo systemctl restart apache2.service
# Adding HTTPS using certbotsudo certbot --apache -d example.com -d www.example.com
# Vérifier la taille du disque et les partitions existantes
lsblk # Affiche la structure du disque et des partitions
sudo fdisk -l # Vérifie que le disque a bien la nouvelle taille
# Lancer fdisk sur le disque principal
sudo fdisk /dev/sda # Ouvre l’outil de partitionnement sur le disque principal
# Dans fdisk :
# - d → Supprimer la partition n°2
# - n → Créer une nouvelle partition n°2
# - Start sector : saisir la même valeur qu’avant (ex: 4096)
# - End sector : appuyer sur Entrée pour utiliser tout l’espace disponible
# - Quand il demande "remove ext4 signature?", répondre N (non)
# - p → Vérifier la table (la partition commence bien au même secteur)
# - w → Enregistrer et quitter
# Redémarrer la VM pour relire la table de partitions
sudo reboot
# Après redémarrage, agrandir le système de fichiers
sudo resize2fs /dev/sda2 # Étend la partition ext4 pour utiliser tout l’espace disque
# Vérifier le résultat
df -h # Affiche la taille et l’espace disponible sur les partitions