<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
	<id>https://mydil.tala-informatique.fr/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Serahf</id>
	<title>mydil - Contributions [fr]</title>
	<link rel="self" type="application/atom+xml" href="https://mydil.tala-informatique.fr/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Serahf"/>
	<link rel="alternate" type="text/html" href="https://mydil.tala-informatique.fr/index.php?title=Sp%C3%A9cial:Contributions/Serahf"/>
	<updated>2026-04-09T01:18:54Z</updated>
	<subtitle>Contributions</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://mydil.tala-informatique.fr/index.php?title=Orange_pi_music&amp;diff=166</id>
		<title>Orange pi music</title>
		<link rel="alternate" type="text/html" href="https://mydil.tala-informatique.fr/index.php?title=Orange_pi_music&amp;diff=166"/>
		<updated>2018-05-06T09:48:19Z</updated>

		<summary type="html">&lt;p&gt;Serahf : /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Projet=&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|-valign=top&lt;br /&gt;
! Objectif !! Les acteurs !! Compétences !! Matériel&lt;br /&gt;
|-valign=top&lt;br /&gt;
||&lt;br /&gt;
Faire une plateforme de partage musical dans un premier temps et pourquoi pas, multimédia par la suite.&lt;br /&gt;
||&lt;br /&gt;
*[[User:Tala | Tala]]&lt;br /&gt;
*[[User:Serahf |Serahf]]&lt;br /&gt;
||&lt;br /&gt;
* Php Cli&lt;br /&gt;
* Shell&lt;br /&gt;
* Web (Front + API)&lt;br /&gt;
||&lt;br /&gt;
* Orange PI au final, sinon une VM sous Ubuntu.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
La version utilisé par le Orange Pi est une &#039;&#039;Ubuntu 16.04.4 LTS (Xenial Xerus)&#039;&#039; compilée pour un processeur ARM. Une version x86 est disponible [http://releases.ubuntu.com/16.04/ubuntu-16.04.4-server-amd64.iso ici]&lt;br /&gt;
&lt;br /&gt;
Il faudra faire attention lors du portage entre architectures, l&#039;utilisation de PHP devant quand même grandement limiter les effets d&#039;adhérence.&lt;br /&gt;
&lt;br /&gt;
=Repository=&lt;br /&gt;
Le projet est accessible sur le dépôt SVN [https://valhalla.tala-informatique.fr/svnroot/project/MusicSender/ ici]&lt;br /&gt;
&lt;br /&gt;
=Configuration de la VM=&lt;br /&gt;
==Paramétrer le mot de passe &#039;&#039;root&#039;&#039;==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#sudo passwd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Autoriser le login root sur SSH==&lt;br /&gt;
Dans le fichier &#039;&#039;/etc/ssh/sshd_config&#039;&#039; mettre l&#039;option suivante à &#039;&#039;yes&#039;&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Et redémarrer ssh :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
systemctl restart ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Puis se reconnecter en &#039;&#039;root&#039;&#039; sur la VM&lt;br /&gt;
&lt;br /&gt;
==Ajouter des alias==&lt;br /&gt;
Dans le fichier &#039;&#039;/root/.bashrc, ajouter à la fin :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
alias vi=&amp;quot;vim.tiny&amp;quot;&lt;br /&gt;
alias ll=&amp;quot;ls -l&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Puis recharger le fichier : &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
. /root/.bashrc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Configuration de l&#039;interface réseaux==&lt;br /&gt;
Dans le fichier &#039;&#039;/etc/network/interfaces&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# The primary network interface&lt;br /&gt;
auto ens33&lt;br /&gt;
iface ens33 inet static&lt;br /&gt;
address 192.168.100.180&lt;br /&gt;
netmask 255.255.255.0&lt;br /&gt;
gateway 192.168.100.2&lt;br /&gt;
dns-nameservers 8.8.8.8&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=Installation des services=&lt;br /&gt;
==Apache / Php / MariaDB==&lt;br /&gt;
===Installation===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#apt -y install apache2 mariadb-server mariadb-client php7.0-cli libapache2-mod-php php7.0-mysql&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Apache2===&lt;br /&gt;
Activation de mod_rewrite et démarrage:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#a2enmod rewrite&lt;br /&gt;
#systemctl start apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===MariaDB===&lt;br /&gt;
====Installation====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#systemctl start mysql&lt;br /&gt;
#mysql_secure_installation&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Autoriser root sur localhost ET 127.0.0.1 ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# sudo mysql -u root -ppassword&lt;br /&gt;
&amp;gt; use mysql; update user set plugin=&#039;&#039; where User=&#039;root&#039;; flush privileges; exit;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Importation====&lt;br /&gt;
Si le mdp est &#039;&#039;password&#039;&#039; et que le fichier contenant le schéma est &#039;&#039;database.sql&#039;&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mysql -u root -ppassword &amp;lt; database.sql&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===PHP===&lt;br /&gt;
Dans le fichier &#039;&#039;/etc/php/7.0/apache2/php.ini&#039;&#039; :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
date.timezone = Europe/Paris&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installations spécifiques ==&lt;br /&gt;
===EyeD3 pour les TAGs ID3===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#apt -y install eyed3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
On peut tester :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# eyeD3 /opt/mp3/music.mp3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== mpg123 pour lire en CLI ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#apt -y install mpg123&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
On va utiliser mpg123 en mode &#039;&#039;fifo&#039;&#039; pour qu&#039;il lise les ordres depuis un fichier texte. Pour démarrer le programme serveur:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#mpg123 -R --fifo /opt/fifo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Depuis un autre terminal on peut le &#039;&#039;piloter&#039;&#039;:&lt;br /&gt;
*lecture : &#039;&#039;echo &amp;quot;load /opt/mp3/music.mp3&amp;quot; &amp;gt; /opt/fifo&#039;&#039;;&lt;br /&gt;
*pause : &#039;&#039;echo &amp;quot;pause&amp;quot; &amp;gt; /opt/fifo&#039;&#039;;&lt;br /&gt;
*volume (en %, ici 10%) : &#039;&#039;echo &amp;quot;volume 10&amp;quot; &amp;gt; /opt/fifo&#039;&#039;;&lt;/div&gt;</summary>
		<author><name>Serahf</name></author>
	</entry>
</feed>