Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
public:informatique:ordinateur_perso [2020/01/23 19:30] – [color prompt] rom1public:informatique:ordinateur_perso [2020/04/26 21:24] rom1
Line 1: Line 1:
-===== plex =====+===== Version =====
  
-[[https://linuxize.com/post/how-to-install-plex-media-server-on-ubuntu-18-04/|https://linuxize.com/post/how-to-install-plex-media-server-on-ubuntu-18-04/]]<code>+<code> 
 +su david 
 +lsb_release -a
  
-curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add - +</code> 
-echo deb https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list + 
-sudo apt update +Distributor IDUbuntu\\ 
-sudo apt install plexmediaserver+Description: Ubuntu 18.04.1 LTS\\ 
 +Release: 18.04\\ 
 +Codename: bionic 
 + 
 +<code> 
 +sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"
  
 </code> </code>
 +
 +===== color prompt =====
 +
 +ajoutezr dans le bashrc
 +
 +<code>
 +export PS1="\[\e[32m\][\[\e[m\]\[\e[31m\]\u\[\e[m\]\[\e[33m\]@\[\e[m\]\[\e[32m\]\h\[\m\]]\[\e[m\]\[\e[32;47m\]\\$\[\e[m\] "
 +alias ls='ls --color'
 +
 +</code>
 +
 +===== Chrome desactive trousseau =====
 +
 +<code>
 +sudo chmod a-x /usr/bin/gnome-keyring*
 +
 +</code>
 +
 +===== Mount disk =====
 +
 +<code>
 +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
 +
 +</code>
 +
 +===== SSH =====
 +
 +<code>
 +sudo apt install openssh-server
 +sudo apt install fail2ban
 +sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
 +
 +</code>
 +
 +<WRAP center round download 60%>\\
 +ssh-keygen -t rsa -b 4096 -C david20180919@home.server\\
 +</WRAP>
 +
 +==== restaure config ====
 +
 +<code>
 +cat /mnt/magneto/warehouse/backup_sickrage/id_rsa.pub>> ~/.ssh/authorized_keys​​​
 +sudo cp /mnt/magneto/warehouse/backup_sickrage/authorized_keys​​​ /home/david/.ssh
 +chmod 600 /home/david/.ssh/authorized_keys
 +sudo cp /mnt/magneto/warehouse/backup_sickrage/sshd_config  /etc/ssh/
 +sudo cp /mnt/magneto/warehouse/backup_sickrage/jail.local  /etc/fail2ban/
 +systemctl restart sshd.service
 +
 +</code>
 +
 +installer la clé prive sur le clients (windows putty)
 +
 +==== sauvegarde config ====
 +
 +<code>
 +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
 +sudo cp /etc/fail2ban/jail.local  /mnt/magneto/warehouse/backup_sickrage
 +
 +</code>
 +
 +===== Empty Trash =====
 +
 +<code>
 +sudo apt-get install trash-cli
 +
 +</code>
 +
 +===== desactiver ecran de veille =====
 +
 +<code>
 +sur le desktop ubuntu : launch parametre puis  energie -> ecran noir = jamais
 +
 +</code>
 +
 +===== Retailer le Swap ​a 6Gb =====
 +
 +<code>
 +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
 +
 +</code>
 +
 +===== Transmission =====
 +
 +<code>
 +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 usermod -a -G syslog debian-transmission
 +sudo service transmission-daemon stop
 +sudo adduser david debian-transmission
 +sudo chown david:david -R /var/lib/transmission-daemon/info/
 +sudo chown david:david -R /etc/transmission-daemon/settings.json
 +sudo chown david:david -R /mnt/magneto/videoclub/_complet/
 +sudo chown david:david -R /mnt/magneto/videoclub/_incomplet/
 +sudo chown -R david:david /var/lib/transmission-daemon/downloads
 +sudo chown -R david:david /var/lib/transmission-daemon/info
 +sudo chown -R david:david /var/lib/transmission-daemon/.config/transmission-daemon/settings.json
 +
 +chmod +x /mnt/diablo/kitchen/source_code/GestionnaireDownloadScript/transmission-purge-completed.sh
 +chmod +r /mnt/diablo/kitchen/source_code/GestionnaireDownloadScript/transmission-purge-completed.sh
 +
 +sudo touch /var/log/transmission.log
 +sudo chown debian-transmission /var/log/transmission.log
 +sudo chmod 644 /var/log/transmission.log
 +
 +sudo nano /lib/systemd/system/transmission-daemon.service  #ExecStart=/usr/bin/transmission-daemon -f --log-debug --logfile /var/log/transmission.log
 +
 +sudo service transmission-daemon start
 +
 +</code>
 +
 +==== restaure config ====
 +
 +<code>
 +sudo service transmission-daemon stop
 +sudo cp /mnt/magneto/warehouse/backup_sickrage/settings.json  /etc/transmission-daemon/
 +sudo chmod 777 /etc/transmission-daemon/settings.json
 +sudo service transmission-daemon start
 +
 +</code>
 +
 +==== sauvegarde config ====
 +
 +<code>
 +cp  /etc/transmission-daemon/settings.json /mnt/magneto/warehouse/backup_sickrage
 +
 +</code>
 +
 +===== Timeshift =====
 +
 +<code>
 +sudo add-apt-repository -y ppa:teejee2008/timeshift
 +sudo apt-get update
 +sudo apt-get install timeshift
 +mkdir /90-warehouse/backup_system/timeshift
 +ln -s /90-warehouse/backup_system/timeshift /mnt/cyclops/timeshift
 +
 +</code>
 +
 +===== Emby =====
 +
 +<code>
 +cd ~/
 +cp /mnt/magneto/warehouse/backup_sickrage/emby-server-deb_4.3.1.0_amd64.deb ~/
 +sudo dpkg -i emby-server-deb_4.3.1.0_amd64.deb
 +
 +</code>
 +
 +===== Webmin =====
 +
 +[[https://www.digitalocean.com/community/tutorials/how-to-install-webmin-on-ubuntu-16-04|https://www.digitalocean.com/community/tutorials/how-to-install-webmin-on-ubuntu-16-04]]<code>
 +
 +echo "deb http://download.webmin.com/download/repository sarge contrib" | sudo tee -a /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
 +
 +</code>
 +
 +===== Path Bin =====<code>
 +
 +sudo echo 'export PATH=$PATH:/mnt/diablo/kitchen/bin'>>  ~/.bashrc
 +export PATH=$PATH:/mnt/diablo/kitchen/bin
 +
 +</code>
 +
 +===== Organisation Répertoire =====
 +
 +<code>
 +sudo apt-get install samba
 +
 +</code>
 +
 +<code>
 +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
 +
 +</code>
 +
 +[[https://websiteforstudents.com/share-files-on-ubuntu-16-04-lts-with-windows-10-systems/|https://websiteforstudents.com/share-files-on-ubuntu-16-04-lts-with-windows-10-systems/]]
  
 ==== restaure config ====<code> ==== restaure config ====<code>
  
-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/smb.conf  /etc/samba/
-sudo cp /mnt/magneto/warehouse/backup_sickrage/Plug-ins /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/  -r+
  
 </code> </code>
Line 20: Line 241:
  
 <code> <code>
-sudo cp /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Preferences.xml /mnt/magneto/warehouse/backup_sickrage/PlexPreferences.xml +sudo cp /etc/samba/smb.conf /mnt/magneto/warehouse/backup_sickrage 
-sudo cp /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Plug-ins /mnt/magneto/warehouse/backup_sickrage/ -r+ 
 +</code> 
 + 
 +==== sur windows ==== 
 + 
 +{{:public:informatique:repertroiereseaux.png?200}} 
 + 
 +  * netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes 
 +  * netsh advfirewall firewall set rule group="Network Discovery" new enable=Yes 
 + 
 +---- 
 + 
 +=====   ===== 
 + 
 +=====   ===== 
 + 
 +===== pkg a installer ===== 
 + 
 +<code> 
 +sudo apt-get install tmux cpulimit ocrmypdf tesseract-ocr-fra php7.2-cli php7.2-curl php7.2-dom inotify-tools linux-tools-common linux-tools-generic linux-tools-`uname -r` dos2unix lynx ffmpeg curl dialog toilet 
 + 
 +</code> 
 + 
 +===== parametrage kitchen ===== 
 + 
 +<code> 
 +ln -s /mnt/diablo/kitchen/source_code/.secret /home/david/.secret 
 + 
 +</code> 
 + 
 +===== Sickrage (Sickchill now) ===== 
 + 
 +[[https://github.com/SickRage/SickRage/wiki/Sickrage-installation-Ubuntu-15|https://github.com/SickRage/SickRage/wiki/Sickrage-installation-Ubuntu-15]]<code> 
 + 
 +sudo apt-get update && sudo apt-get install unrar-free git-core openssl libssl-dev python2.7 
 + 
 +</code> 
 + 
 +<code> 
 +sudo addgroup --system sickchill 
 +sudo adduser --disabled-password --system --home /var/lib/sickchill --gecos "SickChill" --ingroup sickchill sickchill 
 + 
 +</code> 
 + 
 +<code> 
 +sudo adduser sickchill david 
 +sudo adduser sickchill debian-transmission 
 +sudo usermod -a -G david sickchill 
 + 
 +</code> 
 + 
 +<code> 
 +sudo mkdir /opt/sickchill && sudo chown sickchill:sickchill  /opt/sickchill 
 +sudo -u sickchill git clone https://github.com/SickChill/SickChill.git /opt/sickchill 
 + 
 +</code> 
 + 
 +<code> 
 +sudo cp -v /opt/sickchill/runscripts/init.systemd /etc/systemd/system/sickchill.service 
 + 
 +</code> 
 + 
 +<code> 
 +sudo chown root:root /etc/systemd/system/sickchill.service 
 +sudo chmod 644 /etc/systemd/system/sickchill.service 
 + 
 +</code> 
 + 
 +<code> 
 +sudo systemctl enable sickchill 
 +sudo systemctl start sickchill 
 +sudo systemctl status sickchill 
 + 
 +</code> 
 + 
 +<code> 
 +sudo ln -s  /usr/bin/python /opt/sickchill/python 
 + 
 +</code> 
 + 
 +
 + 
 +<note important>[[https://github.com/SickChill/SickChill/issues/5151|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|https://github.com/SickRage/SickRage]] to [[https://github.com/SickChill/SickChill.git|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</note> 
 + 
 +==== restaure config ====<code> 
 + 
 +curl http://192.168.1.237:8081/config/backuprestore/restore?backupFile="/90-warehouse/backup_sickrage/sickrage-20180921183800.zip" 
 + 
 +</code> 
 + 
 +<code> 
 +sudo systemctl restart sickchill 
 + 
 +</code> 
 + 
 +==== sauvegarde config ==== 
 + 
 +<code> 
 +curl http://192.168.1.237:8081/config/backuprestore/backup?backupDir="/mnt/magneto/warehouse/backup_sickrage/
 + 
 +</code> 
 + 
 +===== NZBGET ===== 
 + 
 +<code> 
 +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
  
 </code> </code>
  
-====== Server startup appmlication ======+​​​<WRAP center round download 60%> \\ 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 \\ </WRAP>
  
 ==== restaure config ==== ==== restaure config ====
  
 <code> <code>
-cp  /mnt/magneto/warehouse/backup_sickrage/*.desktop ~/.config/autostart/+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
  
 </code> </code>
Line 37: Line 370:
  
 <code> <code>
-cp  ~/.config/autostart/*.desktop /mnt/magneto/warehouse/backup_sickrage/+cp ~/.nzbget /mnt/magneto/warehouse/backup_sickrage/file.nzbget 
 +cp /etc/systemd/system/nzbget.service /mnt/magneto/warehouse/backup_sickrage
  
 </code> </code>
-===== color prompt ===== 
  
-a ajouter dans ~/bashrc+<del>====  = 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 ''  </del> 
 + 
 +===== java JRE =====
  
 <code> <code>
-export PS1="\[\e[32m\][\[\e[m\]\[\e[31m\]\u\[\e[m\]\[\e[33m\]@\[\e[m\]\[\e[32m\]\h\[\e[m\]:\[\e[36m\]\w\[\e[m\]\[\e[32m\]]\[\e[m\]\[\e[32;47m\]\\$\[\e[m\] "+sudo apt-get install default-jre 
 + 
 +</code> 
 + 
 +===== filebot ===== 
 + 
 +<code> 
 +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 
 + 
 +</code> 
 + 
 +==== restaure config ==== 
 + 
 +<code> 
 +filebot -script fn:preferences /mnt/magneto/warehouse/backup_sickrage/david.prefs.xml 
 + 
 +</code> 
 + 
 +==== sauvegarde config ==== 
 + 
 +<code> 
 +filebot -script fn:preferences --output /mnt/magneto/warehouse/backup_sickrage/ 
 + 
 +</code> 
 + 
 +===== dropbox (in/out server) ===== 
 + 
 +[[https://www.dropbox.com/fr/install-linux|https://www.dropbox.com/fr/install-linux]] [[https://www.dropboxwiki.com/tips-and-tricks/install-dropbox-in-an-entirely-text-based-linux-environment|https://www.dropboxwiki.com/tips-and-tricks/install-dropbox-in-an-entirely-text-based-linux-environment]]<code> 
 + 
 +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 
 +mkdir ~/Dropbox/StudioPhotoIntrants/ 
 +mv ~/Dropbox/StudioPhotoIntrants/00_NEW/* ~/Dropbox/StudioPhotoIntrants/ 
 +ln -s ~/Dropbox/StudioPhotoIntrants /mnt/cyclops/photo/00_NEW 
 + 
 +#depuis mi 2019 les lien symbolique ne sont plus suivi dans 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/ 
 + 
 +</code> 
 + 
 +Lien de chaque projet en cours<code> 
 + 
 +sudo ln -s /mnt/colossus/home-desk/950-ConstructionMaison/2018-06-19PCSketchUp ~/Dropbox/ 
 + 
 +</code> 
 + 
 +===== Spotify ===== 
 + 
 +<code> 
 +sudo snap install spotify 
 + 
 +</code> 
 + 
 +===== vino/X11/vnc connection a distance ===== 
 + 
 +<code> 
 +sudo apt install xrdp 
 +sudo apt install x11vnc 
 +sudo apt install dconf-editor 
 + 
 +  sur le desktop ubuntu : launch dconf puis  org -> gnome -> desktop -> remote-access -> remove encryption 
 + 
 +</code> 
 + 
 +[[https://doc.ubuntu-fr.org/bureau_a_distance|https://doc.ubuntu-fr.org/bureau_a_distance]] [[https://doc.ubuntu-fr.org/vnc?redirect=1|https://doc.ubuntu-fr.org/vnc?redirect=1]] [[https://websiteforstudents.com/access-ubuntu-18-04-lts-beta-desktop-via-vnc-from-windows-machines/|https://websiteforstudents.com/access-ubuntu-18-04-lts-beta-desktop-via-vnc-from-windows-machines/]] 
 + 
 +relancer gnome apres un freeze<code> 
 + 
 +DISPLAY=:0 gnome-shell --replace 
 + 
 +</code> 
 + 
 +=====   ===== 
 + 
 +====== Server startup application ====== 
 + 
 +==== restaure config ==== 
 + 
 +<code> 
 +cp  /mnt/magneto/warehouse/backup_sickrage/*.desktop ~/.config/autostart/ 
 + 
 +</code> 
 + 
 +==== sauvegarde config ==== 
 + 
 +<code> 
 +cp  ~/.config/autostart/*.desktop /mnt/magneto/warehouse/backup_sickrage/
  
 </code> </code>
Line 82: Line 510:
 <code> <code>
 /mnt/diablo/kitchen/source_code/start_and_stop/start.sh /mnt/diablo/kitchen/source_code/start_and_stop/start.sh
-#tweet "start "$(curl http://icanhazip.com)+#tweet "start  "$(curl https://ipv4.icanhazip.com/)
  
 </code> </code>
Line 108: Line 536:
 <code> <code>
 /mnt/diablo/kitchen/source_code/start_and_stop/stop.sh /mnt/diablo/kitchen/source_code/start_and_stop/stop.sh
-#tweet "stop  "$(curl http://icanhazip.com)+#tweet "stop  "$(curl https://ipv4.icanhazip.com/)
  
 </code> </code>
Line 140: Line 568:
  
 [[https://www.howtogeek.com/94110/wake-up-your-computers-using-your-android-phone/|https://www.howtogeek.com/94110/wake-up-your-computers-using-your-android-phone/]] [[https://www.howtogeek.com/94110/wake-up-your-computers-using-your-android-phone/|https://www.howtogeek.com/94110/wake-up-your-computers-using-your-android-phone/]]
- 
-===== clonezilla ===== 
- 
-sdd1 et sdd2 ⇒ sdb1/warehouse/backup_system 
  
 ===== redmine ===== ===== redmine =====
Line 160: Line 584:
  
 </code> </code>
 +===== retropie =====
 +
 +[[https://retropie.org.uk/docs/Debian/|https://retropie.org.uk/docs/Debian/]]
  
 ===== django gnucash ===== ===== django gnucash =====
Navigation
QR Code
QR Code public:informatique:ordinateur_perso (generated for current page)