PROJET AUTOBLOG


Planet-Libre

source: Planet-Libre

⇐ retour index

PostBlue : Passer à systemd sur un VPS OpenVZ avec Debian Jessie

jeudi 10 mars 2016 à 16:47

Attention : je n'ai pris aucune précaution, je ne pourrais être tenu pour responsable de quoique ce soit. Je suis d'ailleurs tout à fait irresponsable.

L'un des VPS que j'administre utilisait upstart comme système d'initialisation, parce que le noyau OpenVZ n'a longtemps pas supporté systemd, ou inversément systemd ne supportait pas les vieux noyaux d'OpenVZ, toujours est-il que la cohabitation était controversée.

Le noyau d'OpenVZ est basé sur Linux 2.6.32. 2009, tout de même ! C'est le noyau qui propulsa à leur époque (2009) Ubuntu 10.04 LTS « Lucid Lynx » et Debian 6.0 « Squeeze ». Or, Debian 8.0 « Jessie », sortie en avril 2015, intégra le noyau Linux 3.16, et passa de sysvinit à systemd comme système d'initialisation par défaut.

Donc les services, scripts, etc, sont par défaut écrits pour fonctionner avec systemd. Et depuis quelques temps, le noyau OpenVZ permet de parler la même langue que systemd (grosso modo). Et j'avais envie de tester le changement, sachant que j'avais transféré ma machine sur un dédié Kimsufi.

Donc, on se lance.

Dans une session SSH, je lance l'installation par aptitude, qui intègre un outil de résolution des conflits et offre des solutions de remplacement en cas d'installation problématique.

aptitude install systemd systemd-sysv

aptitude propose de remplacer upstart par systemd : il suffit d'accepter.

Plus qu'à redémarrer. Le système va se plaindre de ne pas pouvoir utiliser l'init pour lancer la commande reboot proprement (normal, vu qu'on vient d'en changer).

Pour être au minimum propre (ce que je n'ai pas fait), on peut stopper proprement les services chatouilleux, MySQL & co. Puis redémarrer brutalement :

reboot -f

La connexion est perdue directement. Quelques secondes à attendre avant de relancer une session SSH et tenter de se connecter à la machine.

Gravatar de PostBlue
Original post of PostBlue.Votez pour ce billet sur Planet Libre.

Littlewing : Développement WEB

jeudi 10 mars 2016 à 15:53

Bon je n’ai pas écrit d’article depuis quelques temps. Je suis à fond sur l’apprentissage des technologies WEB :

J’ai donc un peu laché le développement spark/scala pour le parcours de spécialisation coursera.

Je pense écrire un peu plus ensuite ( dans quelques mois …)

See you

 

 

Gravatar de Littlewing
Original post of Littlewing.Votez pour ce billet sur Planet Libre.

Goffi : Guru Meditation

jeudi 10 mars 2016 à 10:50

Un petit mot pour m'excuser auprès des lecteurs et en particulier des lecteurs de Planet Libre et de SeenThis : je viens de passer mon blog principal sur Salut à Toi/Libervia et avec lui les flux Atom (qui me permettent d'apparaître sur ces 2 médias), et je pensais qu'avec les dates de mise à jour j'apparaîtrais à la même place qu'avant (soit en décembre pour mon dernier article). Il se trouve que mes 10 derniers articles sont apparus en tête probablement parce qu'il y a eu un changement de liens et d'identifiants, c'est pourquoi vous voyez autant de (vieux) articles d'un coup.

Toutes mes excuses pour ce spam involontaire, il ne devrait plus y avoir de problème désormais, et si jamais c'était le cas je désactiverais la synchronisation le temps de les résoudre.

J'en profite pour annoncer que je vais faire une mini série d'articles pour expliquer comment installer une instance de Libervia et importer son blog dessus.

Gravatar de Goffi
Original post of Goffi.Votez pour ce billet sur Planet Libre.

Francois Aichelbaum : Share a multifunctional printer (with your Synology)

jeudi 10 mars 2016 à 10:00

So, lately, we decided to truly use several different computers at home. The fun part is that we want to share the same peripherals (as the multi-functional printer (here, as an HP PhotoSmart B109a), with different OS (for now, Linux and Windows). Let’s see how our Synology saved the day.

The Synology NAS embed a Linux system so basically, we should be able to run most of the applications, as far as we can deploy/compile it. But, because the Synology guys wants to ease our life, they did a great thing : they offer the possibility to add a multi-functional printer and manage it. As far as they did great, the system only embed some drivers (and software – i.e. only cups) and for me, even if the printer is fully discovered, only the print services will be shared over network.

So I had to complete the setup. First, I need to be able to extend the system with new package. As we have a pretty recent DS1515+, we don’t have any ipkg system out of the box. But now, this is pretty well documented over internet (in english or in french, for instance).

Now that we can install third party software easily on the CLI, let’s setup SANE. So, as a root on the Synology :

ipkg install hplip libusb libieee1284 sane-backends xinetd
echo "hpaio" >> /opt/etc/sane.d/dll.conf
echo "hpaio" > /opt/etc/sane.d/dll.d/hplip

Let’s see if the Synology see the scanner :

sane-find-scanner

Which should reply something like :

found USB scanner (vendor=0x03f0 [HP], product=0x7a11 [Photosmart B109a-m]) at libusb:002:003

Since the NAS sees the scan, let’s test it with SANE via :

scanimage -L

It will reply something as :

device `hpaio:/usb/Photosmart_B109a-m?serial=CN999750CB05C7' is a Hewlett-Packard Photosmart_B109a-m all-in-one

Now, let’s ensure that the service is visible from the rest of the network. To do so, we need to edit /opt/etc/xinetd.conf where we check the line “only_from” : it should match the IP range of the local network. Then we edit /opt/etc/sane.d/saned.conf with the same purpose. We can now edit xinetd to start the sane service properly with the right port, editing /opt/etc/xinetd.d/sane-port :

service sane-port
{
    port = 6566
    socket_type = stream
    wait = no
    user = root
    group = root
    server = /opt/sbin/saned
}

Let’s start it (it will be automatically started on the next reboot :

/opt/etc/init.d/S10xinetd

As we’re good on the server side, let’s focus on the client side. We’ll start with the Linux client as it’s the simpliest. I assume you already installed xsane.  Now, we just need to tell Xsane where it can find the scan. So, we edit /etc/sane.d/net.conf to replace “# localhost” with the IP of the Synology. The printer is just a few click away when you go through the regular GUI to add a network printer. We’re good to go.

On the Windows side (Windows 10 here), it’s a bit more tricky. First, we’ll focus on the printer service. For this, we’ll have to follow the directives from Synology. This will enable a printer. Windows might complain about missing drivers for some mass storage USB device and an unknown device but you can just ignore as those are the scan and the multi card reader.

For the scan service, we’ll have to install some other tools. Indeed, Windows use a specific protocol which is not compatible with sane (it can be TWAIN, ISIS or WIA).  But , as we exposed the scan via sane, we need … sane … Absolute logical logic. Thanks to our opensource community friends, port exists. Not so much up2date or maintained, but it’s enough ok to be used. The solution here will be SaneWinDS. Just download the installer, follow the instruction of the GUI and here you go. Reboot your Windows (after all, it remains as a Windows), and now you have a Sane application on your Windows that you can use. The UI is pretty archaic but it should do the trick.

The post Share a multifunctional printer (with your Synology) appeared first on Here and Now ... Then and There.

Gravatar de Francois Aichelbaum
Original post of Francois Aichelbaum.Votez pour ce billet sur Planet Libre.

Articles similaires

genma : Firefox OS - Quick Settings Enhancement

jeudi 10 mars 2016 à 09:00

Quick Settings Enhancement est un addon disponible dans le marketplace, et dont le code source est sur Github

Comme le montre cette image

cette addon est bien pratique car elle ajoute dans la barre de notification tout un tas de raccourcis fort pratique qui viennent s'ajouter à ceux existant (mode avion, wifi, connexion de données) à savoir : l'activation ou la désactivaton du NFC, de la Géolocalisation, du mode économie de la batterie, réglage de la luminosité de l'écran... Tout un tas d'options et de réglages qui sont normalement disponibles via les menus du paramétrage sont enfin à portée de main et c'est fort pratique.

Le petit plus, une option Lampe de poche qui permet d'allumer en continue la led Flash du téléphone (pour les modèles en disposant comme le Sony Z3C par exemple).

Un addon devenu indispensable pour moi. Merci à Philipe, Mozillien, pour m'avoir présenté cette addon.

Gravatar de genma
Original post of genma.Votez pour ce billet sur Planet Libre.

Articles similaires