This is an old revision of the document!


Version

sudo david

lsb_release -a

Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic

sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"

Webmin

https://www.digitalocean.com/community/tutorials/how-to-install-webmin-on-ubuntu-16-04

sudo cat '''deb http://download.webmin.com/download/repository sarge contrib'>> '' /etc/apt/sources.list

wget http://www.webmin.com/jcameron-key.asc

sudo apt-key add jcameron-key.asc

sudo apt-get update

sudo apt-get install webmin

Mount disk

sudo mkdir /mnt/cyclops
sudo mkdir /mnt/magneto
sudo mkdir /mnt/diablo

sudo apt install pmount

sudo mount /dev/disk/by-label/cyclops  /mnt/cyclops
sudo mount /dev/disk/by-label/magneto  /mnt/magneto
sudo mount /dev/disk/by-label/diablo  /mnt/diablo

Path Bin

sudo echo 'export PATH=$PATH:/mnt/diablo/kitchen/bin'>>  ~/.bashrc
sudo nano /etc/environment
 export PATH=$PATH:/mnt/diablo/kitchen/bin
Ctrl-X

Retailer le Swap ​a 6Gb

free -h
sudo ls -lh /swapfile
sudo swapoff -a
sudo fallocate -l 6G /swapfile
sudo ls -lh /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon -a
free -h

pkg tmux-cpulimit-php

sudo apt-get install tmux
sudo apt-get install cpulimit
sudo apt-get install ocrmypdf
sudo apt-get install tesseract-ocr-fra
sudo apt-get install php7.2-cli
sudo apt-get install php7.2-curl
sudo apt-get install php7.2-dom
sudo apt-get install inotify-tools
sudo apt-get install linux-tools-common linux-tools-generic linux-tools-`uname -r`
sudo apt install dos2unix
sudo apt install lynx

sudo apt  install ffmpeg

parametrage kitchen

ln -s /mnt/diablo/kitchen/source_code/.secret /home/david/.secret

Transmission

sudo add-apt-repository ppa:transmissionbt/ppa
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install transmission-cli transmission-common transmission-daemon

sudo usermod -a -G debian-transmission david
sudo service transmission-daemon stop
sudo adduser david debian-transmission
sudo chown david -R /var/lib/transmission-daemon/info/
sudo chown david -R /etc/transmission-daemon/settings.json
sudo chown david -R /mnt/magneto/videoclub/_complet/
sudo chown david -R /mnt/magneto/videoclub/_incomplet/
sudo service transmission-daemon start
sudo nano  ~/.config/transmission-daemon/settings.json "download-dir": "/mnt/magneto/videoclub/_complet", "incomplete-dir": "/mnt/magneto/videoclub/_incomplet", "rpc-authentication-required": true, "rpc-bind-address": "192.168.1.237", "rpc-enabled": true, "rpc-host-whitelist": "", "rpc-host-whitelist-enabled": true, "rpc-password": "clement", "rpc-port": 9091, "rpc-url": "/transmission/", "rpc-username": "romain", "rpc-whitelist": "192.168.1.*", "rpc-whitelist-enabled": true, "script-torrent-done-enabled": true, "script-torrent-done-filename": "/mnt/diablo/kitchen/source_code/GestionnaireDownloadScript/transmission-purge-completed.sh",sudo service transmission-daemon reload

restaure config

sudo service transmission-daemon stop
sudo cp /mnt/magneto/warehouse/backup_sickrage/settings.json  ~/.config/transmission-daemon/
sudo service transmission-daemon start

sauvegarde config

cp  ~/.config/transmission-daemon/settings.json /mnt/magneto/warehouse/backup_sickrage

Sickrage (Sickchill now)

https://github.com/SickRage/SickRage/wiki/Sickrage-installation-Ubuntu-15

sudo apt-get update && sudo apt-get install unrar-free git-core openssl libssl-dev python2.7
sudo addgroup --system sickrage
sudo adduser --disabled-password --system --home /var/lib/sickrage --gecos "SickRage" --ingroup sickrage sickrage
sudo adduser sickrage david
sudo usermod -a -G david sickrage
sudo mkdir /opt/sickrage && sudo chown sickrage:sickrage /opt/sickrage
sudo -u sickrage git clone https://github.com/SickChill/SickChill.git /opt/sickrage
sudo cp -v /opt/sickrage/runscripts/init.systemd /etc/systemd/system/sickrage.service
sudo chown root:root /etc/systemd/system/sickrage.service
sudo chmod 644 /etc/systemd/system/sickrage.service
sudo systemctl enable sickrage
sudo systemctl start sickrage
sudo systemctl status sickrage
sudo ln -s  /usr/bin/python /opt/sickrage/python

*

https://github.com/SickChill/SickChill/issues/5151 Backup config/setings/etc using built in backup tool Stop SickRage Edit config.ini from https://github.com/SickRage/SickRage to https://github.com/SickChill/SickChill.git Restart SickRage If you get an error stating “No NZB/Torrent providers found or enabled for daily searches and backlog searches” restore the backup completed in Step 1. Restart SickChill

restaure config

curl http://192.168.1.237:8081/config/backuprestore/restore?backupFile="/90-warehouse/backup_sickrage/sickrage-20180921183800.zip"
sudo systemctl restart sickrage

sauvegarde config

curl http://192.168.1.237:8081/config/backuprestore/backup?backupDir="/mnt/magneto/warehouse/backup_sickrage/"

NZBGET

sudo apt-get install nzbget -y
sudo apt-get install unrar -y
sudo apt-get install nodejs -y

sudo cp /etc/nzbget.conf ~/.nzbget/
sudo chown david:david ~/.nzbget

​​​


sudo nano ~/.nzbgetMainDir=/mnt/magneto/videoclub/_nzbgetDaemonUsername=davidControlIP=192.168.1.237ControlUsername=nzbgetControlPassword=nzbgetMainDir=/mnt/magneto/videoclub/_nzbgetDestDir=/mnt/magneto/videoclub/_DownSickRage
[Unit]Description=NZBGet Daemon[Service]User=davidGroup=davidType=forkingExecStart=/usr/bin/nzbget –daemonExecStop=/usr/bin/nzbget -QExecReload=/bin/kill -HUP $MAINPIDKillMode=processRestart=on-failure[Install]WantedBy=multi-user.target

restaure config

cp /mnt/magneto/warehouse/backup_sickrage/file.nzbget  ~/.nzbget
sudo chown david:david ~/.nzbget
sudo cp /mnt/magneto/warehouse/backup_sickrage/nzbget.service /etc/systemd/system

sauvegarde config

cp ~/.nzbget /mnt/magneto/warehouse/backup_sickrage/file.nzbget
cp /etc/systemd/system/nzbget.service /mnt/magneto/warehouse/backup_sickrage

==== = MiniDLNA ===== https://doc.ubuntu-fr.org/minidlna#configuration_de_minidlna sudo nano /etc/minidlna.conf media_dir=/var/lib/minidlna media_dir=V,/mnt/magneto/videoclub/Film/ media_dir=V,/mnt/magneto/videoclub/Anime/ media_dir=V,/mnt/magneto/videoclub/Series/ media_dir=V,/mnt/magneto/videoclub/Insanity/ media_dir=V,/mnt/magneto/videoclub/Video/ media_dir=P,/mnt/cyclops/photo/50_Phototheque/ log_dir=/var/log ==== restaure config ==== cp /mnt/magneto/warehouse/backup_sickrage/minidlna.conf /etc/ ==== sauvegarde config ==== cp /etc/minidlna.conf /mnt/magneto/warehouse/backup_sickrage

java JRE

sudo apt-get install default-jre

filebot

curl -L -O https://downloads.sourceforge.net/project/filebot/filebot/FileBot_4.7.9/filebot_4.7.9_amd64.deb
sudo dpkg -i filebot_4.7.9_amd64.deb

restaure config

filebot -script fn:preferences /mnt/magneto/warehouse/backup_sickrage/david.prefs.xml

sauvegarde config

filebot -script fn:preferences --output /mnt/magneto/warehouse/backup_sickrage/

dropbox (in/out server)

https://www.dropbox.com/fr/install-linux https://www.dropboxwiki.com/tips-and-tricks/install-dropbox-in-an-entirely-text-based-linux-environment

cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -
~/.dropbox-dist/dropboxd
mkdir -p ~/bin
wget -O ~/bin/dropbox.py "https://www.dropbox.com/download?dl=packages/dropbox.py"
chmod +x ~/bin/dropbox.py
sudo apt-get install nautilus-dropbox
sudo ln -s /mnt/diablo/kitchen/source_code  ~/Dropbox/
sudo ln -s /mnt/cyclops/photo/00_NEW ~/Dropbox/StudioPhotoIntrants
sudo ln -s /mnt/magneto/warehouse/backup_sickrage/id_rsa.putty.ppk ~/Dropbox/

Lien de chaque projet en cours

sudo ln -s /mnt/colossus/home-desk/950-Construction\ Maison/2018-06-19\ PC\ SketchUp ~/Dropbox/

Organisation Répertoire

sudo apt-get install samba
sudo ln -s /mnt/cyclops /mnt/colossus
sudo ln -s /mnt/cyclops/home-desk /10-home-desk
sudo ln -s /mnt/cyclops/photo /20-photo
sudo ln -s /mnt/magneto/videoclub /23-videoclub
sudo ln -s /mnt/diablo/kitchen /50-kitchen
sudo ln -s /mnt/cyclops/home-desk/80-Photocopie /80-photocopie
sudo ln -s /mnt/diablo/kitchen/source_code /82-source_code
sudo ln -s /mnt/magneto/warehouse /90-warehouse

sudo ln -s /mnt/magneto/warehouse /home/david/OneDrive/

sudo ln -s /mnt/cyclops/office /30-office
sudo ln -s /mnt/diablo/locker /40-locker
sudo ln -s /mnt/magneto/mediarack /70-mediarack

https://websiteforstudents.com/share-files-on-ubuntu-16-04-lts-with-windows-10-systems/

restaure config

cp /mnt/magneto/warehouse/backup_sickrage/smb.conf  /etc/samba/

sauvegarde config

cp /etc/samba/smb.conf /mnt/magneto/warehouse/backup_sickrage

sur windows

  • netsh advfirewall firewall set rule group=“File and Printer Sharing” new enable=Yes
  • netsh advfirewall firewall set rule group=“Network Discovery” new enable=Yes

SSH

https://doc.fedora-fr.org/wiki/SSH_:_Authentification_par_cl%C3%A9

sudo apt install openssh-server


ssh-keygen -t rsa -b 4096 -C david20180919@home.server

restaure config

cat /mnt/magneto/warehouse/backup_sickrage/id_rsa.pub>> ~/.ssh/authorized_keys​​​
sudo cp /mnt/magneto/warehouse/backup_sickrage/authorized_keys​​​ /home/david/.ssh
sudo cp /mnt/magneto/warehouse/backup_sickrage/sshd_config  /etc/ssh/
systemctl restart sshd.service

installer la clé prive sur le clients (windows putty) voir doc fedora

sauvegarde config

cp /home/david/.ssh/authorized_keys /mnt/magneto/warehouse/backup_sickrage
cp /home/david/.ssh/id_rsa /mnt/magneto/warehouse/backup_sickrage
cp /home/david/.ssh/id_rsa.pub /mnt/magneto/warehouse/backup_sickrage
cp /etc/ssh/sshd_config /mnt/magneto/warehouse/backup_sickrage

SSH en html5

Kodi

<del>sudo apt install kodi xinit

</del>

restaure config

<del>cp  /mnt/magneto/warehouse/backup_sickrage/.kodi ~/  -r

</del>

sauvegarde config

<del>cp  ~/.kodi /mnt/magneto/warehouse/backup_sickrage/ -r

</del>

Spotify

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0DF731E45CE24F27EEEB1450EFDC8610341D9410
sudo add-apt-repository "deb http://repository.spotify.com stable non-free"
sudo apt install spotify-client

vino/X11/vnc connection a distance

plex

https://linuxize.com/post/how-to-install-plex-media-server-on-ubuntu-18-04/

curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add -
echo deb https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list
sudo apt update
sudo apt install plexmediaserver

restaure config

sudo cp /mnt/magneto/warehouse/backup_sickrage/PlexPreferences.xml /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Preferences.xml
sudo cp /mnt/magneto/warehouse/backup_sickrage/Plug-ins /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/  -r

sauvegarde config

sudo cp /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Preferences.xml /mnt/magneto/warehouse/backup_sickrage/PlexPreferences.xml
sudo cp /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Plug-ins /mnt/magneto/warehouse/backup_sickrage/ -r

Server startup appmlication

restaure config

cp  /mnt/magneto/warehouse/backup_sickrage/*.desktop ~/.config/autostart/

sauvegarde config

cp  ~/.config/autostart/*.desktop /mnt/magneto/warehouse/backup_sickrage/

Onedrive by rclone (sauvegarde)

curl https://rclone.org/install.sh | sudo bash
rclone config

https://rclone.org/onedrive/ https://rclone.org/downloads/

restaure config

cp /mnt/magneto/warehouse/backup_sickrage/rclone.conf /home/david/.config/rclone/

sauvegarde config

cp /home/david/.config/rclone/rclone.conf /mnt/magneto/warehouse/backup_sickrage/

scheduled task windows

importer fichier wol serveur.xml dans le schedule task de windows 10

Cron server job

start server

/mnt/diablo/kitchen/source_code/start_and_stop/start.sh
#tweet "start "$(curl http://icanhazip.com)

CRONjob

#==== start photocopie ocr ====
cd /mnt/diablo/kitchen/source_code/ScriptOcr/;bash inotifywait80-Photocopie00_A_traiter.sh &
#==== sauvegarde photo ====
cd /mnt/diablo/kitchen/source_code/rclone/;bash rclonesync.sh
#==== sauvegarde ovh ====
cd /mnt/diablo/kitchen/source_code/rclone/;bash rclonesyncOvh.sh
#==== runtastic ====
cd /mnt/diablo/kitchen/source_code/Runtastic2Gagenda/;php Runtastic2Gagenda.php
#==== daily helth test ====
cd /mnt/diablo/kitchen/source_code/dailyHealthTest/;bash dailyHealthTest.sh
#==== auto shutdow ====
cd /mnt/diablo/kitchen/source_code/start_and_stop/;bash shutdown.sh

stop server

/mnt/diablo/kitchen/source_code/start_and_stop/stop.sh
#tweet "stop  "$(curl http://icanhazip.com)

restaure config

cp /mnt/magneto/warehouse/backup_sickrage/start_and_stop.service /etc/systemd/system/
crontab -u david /mnt/magneto/warehouse/backup_sickrage/backup.crontab
sudo crontab -u root /mnt/magneto/warehouse/backup_sickrage/backuproot.crontab

sauvegarde config

cp /etc/systemd/system/start_and_stop.service /mnt/magneto/warehouse/backup_sickrage/
crontab -l> /mnt/magneto/warehouse/backup_sickrage/backup.crontab
sudo crontab -u root -l> /mnt/magneto/warehouse/backup_sickrage/backuproot.crontab

WOL

sudo apt-get install ethtool
sudo apt install net-tools
sudo ethtool -s enp3s0 wol g

https://www.howtogeek.com/94110/wake-up-your-computers-using-your-android-phone/

clonezilla

sdd1 et sdd2 ⇒ sdb1/warehouse/backup_system

emby client

redmine

Navigation
QR Code
QR Code public:informatique:ordinateur_perso (generated for current page)