Administration

Installation de Owncloud : Configuration de base

Installation de Owncloud : Configuration de base. 1) Installation des paquetages de base : [~] ➔ sudo apt-get install php5-gd php-xml-parser php5-intl php5-sqlite smbclient curl libcurl3 php5-curl 2) Téléchargement de l’archive Owncloud : [~] ➔ cd /var/www/ [/var/www] ➔ sudo wget https://download.owncloud.org/community/owncloud-8.0.0.tar.bz2 3) Décompression de l’archive : [/var/www] ➔ sudo tar xvfj owncloud-8.0.0.tar.bz2 4) Mettre […]

Installation d’un sous-domaine avec une adresse ip dynamique

Installation d’un nom de domaine avec une adresse ip dynamique. Matériels : – Livebox – Raspberry Pi I) Installation matériel : Le Raspberry Pi est alimenté par l’USB de la Livebox. Un câble réseau relie les 2 matériels. Voir l’article suivant : https://miniordi.hacktech.dev/raspberry-pi-livebox-zte/ II) Sur la Raspberry Pi, installer et configurer un serveur LAMP : […]

Minage de BitCoin

Minage de BitCoin. /!\ En-cours de rédaction /!\ 1) Répertoire de travail : [~] ➔ mkdir BITCOIN [~] ➔ cd BITCOIN/ 2) Téléchargement de CpuMiner : [~/BITCOIN] ➔ wget http://downloads.sourceforge.net/project/cpuminer/pooler-cpuminer-2.4.tar.gz 3) Décompression de l’archive : [~/BITCOIN] ➔ tar xvfz pooler-cpuminer-2.4.tar.gz [~/BITCOIN] ➔ cd cpuminer-2.4/ 4) Configuration de la compilation : [~/BITCOIN/cpuminer-2.4] ➔ ./configure 5) Compilation […]

Bashrc pour ArchLinux

Bashrc pour ArchLinux. Ouvrir : /etc/bash.bashrc Remplacer tout par : # /etc/bash.bashrc # # https://wiki.archlinux.org/index.php/Color_Bash_Prompt # # This file is sourced by all *interactive* bash shells on startup, # including some apparently interactive shells such as scp and rcp # that can’t tolerate any output. So make sure this doesn’t display # anything or bad […]

Sauvegarde d’une image docker

Sauvegarde d’une image docker. 1) Vérfication de /tmp : [root@framboisepi ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/root 15G 2.2G 12G 16% / devtmpfs 85M 0 85M 0% /dev tmpfs 93M 0 93M 0% /dev/shm tmpfs 93M 436K 92M 1% /run tmpfs 93M 0 93M 0% /sys/fs/cgroup tmpfs 93M 0 93M 0% […]

Installation de LAMP sous ArchLinux

Installation de LAMP sous ArchLinux. 1) Installation d’Apache : [root@framboisepi ~]# pacman -S apache 2) Installation de Php : [root@framboisepi ~]# pacman -S php php-apache 3) Installation de MariaDB : – Installation de MariaDB : [root@framboisepi ~]# pacman -S mariadb – Configuration : Ouvrir : /etc/mysql/my.cnf Chercher : #innodb_buffer_pool_size = 16M Remplacer par : innodb_buffer_pool_size […]

Exemple d’utilisation de Docker

Exemple d’utilisation de Docker. 1) Démarrage du service : root@alarmpi ~]# systemctl start docker 2) Lancement automatique du service au démarrage du système : [root@alarmpi ~]# systemctl enable docker ln -s ‘/usr/lib/systemd/system/docker.service’ ‘/etc/systemd/system/multi-user.target.wants/docker.service’ 3) Création d’un fichier Docker : Ouvrir : Dockerfile Ajouter : FROM resin/rpi-raspbian RUN apt-get update RUN apt-get install -y openjdk-7-jre-headless wget […]

Installation de Docker sur ArchLinux

Installation de Docker sur ArchLinux. 1) Installation de git : [root@alarmpi ~]# pacman -S git 2) Téléchargement du script d’installation de docker : [root@alarmpi ~]# git clone https://github.com/resin-io/docker-install-script.git [root@alarmpi ~]# cd docker-install-script/ 3) Lancement de l’installation : [root@alarmpi docker-install-script]# sh ./install.sh 4) Redémarrage : [root@alarmpi docker-install-script]# shutdown -r now 5) Lancer Docker en tâche de […]

Installation de ArchLinux

Installation de ArchLinux. I) Installation de l’image ArchLinux sur une carte SD. 1) A partir d’un ordinateur disposant d’un lecteur de carte mémoire, insérer la carte mémoire dans le lecteur de carte memoire. /!\ Ne pas monter la carte mémoire /!\ 2) Répertoire de travail : [~] ➔ mkdir -p RASPBERRYPI/ARCHLINUX [~] ➔ cd RASPBERRYPI/ARCHLINUX/ […]

Bashrc et git

Bashrc et Git. Ouvrir : ~/.bashrc Ajouter à la fin : RED= »\[\033[0;31m\] » YELLOW= »\[\033[0;33m\] » GREEN= »\[\033[0;32m\] » BLUE= »\[\033[0;34m\] » LIGHT_RED= »\[\033[1;31m\] » LIGHT_GREEN= »\[\033[1;32m\] » WHITE= »\[\033[1;37m\] » LIGHT_GRAY= »\[\033[0;37m\] » COLOR_NONE= »\[\e[0m\] » function parse_git_branch { git rev-parse –git-dir &> /dev/null git_status= »$(git status 2> /dev/null) » branch_pattern= »^# On branch ([^${IFS}]*) » remote_pattern= »# Your branch is (.*) of » diverge_pattern= »# Your branch and (.*) have diverged » if [[ ! ${git_status} =~ « working […]