Ceci est une ancienne révision du document !
1
Entertainment systems like Kodi are great for storing videos, pictures, music and retro games, but what if you need to get a little more serious and back up important documents like your spouse’s résumés or your growing collection of eBooks? You could use something like SAMBA and scripts/software to automate backing up the résumés to your SAMBA server, but how do you deal with mobile devices? Dropbox is another solution, but it stores your data on the cloud where it could end up as someone else’s property. What you really want is your (Own)cloud.
Bad puns aside, Owncloud is personal client and server cloud software. Clients exist for Linux, Mac OS X, Windows, iOS, and Android devices. The server software is available for Linux and web hosts running either Windows server or Linux. On the Linux side, server packages are available for CentOS, Debian, Fedora, OpenSUSE, RedHat Enterprise Linux, SUSE Linux Enterprise, and Ubuntu.
Les systèmes de divertissement comme Kodi sont supers pour stocker des vidéos, des images, des musiques et des jeux « rétro », mais qu'en est-il si vous avez besoin de redevenir un peu plus sérieux et sauvegarder des documents importants comme les curriculum vitae de votre conjoint-e ou votre collection grandissante d'eBooks ? Vous pourriez utiliser un logiciel comme SAMBA et des scripts/logiciels pour automatiser la sauvegarde des cv sur votre serveur SAMBA, mais comment faire avec des appareils mobiles ? Dropbox est une autre solution, mais il stocke vos données sur le cloud où elles pourraient se retrouver entre d'autres mains que les vôtres. Ce dont vous avez vraiment besoin est votre propre cloud, comme diraient nos amis anglophones : your Own cloud.
Plus sérieusement, Owncloud est un logiciel et partage de fichiers et d'applications en ligne. Des clients existent pour Linux, Mac OS X, Windows, iOS et Android. Le logiciel serveur est disponible pour Linux et les serveurs web tournant avec Windows ou Linux. Du côte de Linux, les paquets du serveur sont disponibles pour CentOS, Debian, Fedora, OpenSUSE, RedHat Entreprise Linux, SUSE Linux Entreprise et Ubuntu.
2
To install owncloud on Ubuntu, we need to add the repository where owncloud is stored. Owncloud uses the OpenSUSE build service to build packages, so don’t be surprised that the repository is hosted from their servers. Because instructions vary among versions of Ubuntu (and other flavours of Linux), you can find complete instructions here: http://software.opensuse.org/download/package?project=isv:ownCloud:community&package=owncloud
In this example, I’ll use the instructions for Ubuntu 14.04 (on an Xubuntu 14.04 system). I’m not sure why, but a lot of places seem to end their instructions with the repository key when it makes more sense to start with it. If you try adding the software first, you get scary messages about untrusted sources. Better to start with the key:
wget http://download.opensuse.org/repositories/isv:ownCloud:community/xUbuntu_14.04/Release.key
Pour installer Owncloud sur Ubuntu, nous aurons besoin d'ajouter le dépôt où se trouvent les paquets d'Owncloud. Celui-ci utilise le service de création de paquets d'OpenSUSE, ainsi ne soyez pas étonné de voir que le dépôt est hébergé par leurs serveurs. Les instructions variant pour les différentes versions d'Ubuntu (et pour les autres distributions Linux), vous pouvez trouver les instructions complètes ici :
http://software.opensuse.org/download/package?project=isv:ownCloud:community&package=owncloud
Dans cet exemple, j'utiliserai les instructions pour Ubuntu 14.04 (sur un système Xubuntu 14.04). Je ne sais pas exactement pourquoi, mais beaucoup de tutoriels semblent terminer leurs instructions par la clé du dépôt alors que cela serait plus logique de commencer par ça. Si vous essayez d'ajouter d'abord le logiciel, vous vous retrouvez avec des messages intimidant à propos de sources non-fiables. Mieux vaut commencer avec la clé :
wget http://download.opensuse.org/repositories/isv:ownCloud:community/xUbuntu_14.04/Release.key
3
sudo apt-key add - < Release.key
The first line gets the key and stores it in the local directory; the second command imports the owncloud key. Now it’s time to add the software repository:
sudo sh -c “echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/community/xUbuntu_14.04/ /' » /etc/apt/sources.list.d/owncloud.list”
Note that the above command is all one line. Now we’ll update the repositories and install the owncloud server:
sudo apt-get update
sudo apt-get install owncloud
If you’re willing to forego the bit of automation the clients give, you can also use a modern web browser to drag and drop files to your owncloud server.
sudo apt-key add - < Release.key
La première ligne récupère la clé et la stocke dans le répertoire local ; la seconde commande importe la clé de Owncloud. Maintenant, il est temps d'ajouter le dépôt logiciel :
sudo sh -c “echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/community/xUbuntu_14.04/ /' » /etc/apt/sources.list.d/owncloud.list”
Notez bien que la commande ci-dessus est à écrire sur une seule ligne. Il faut désormais mettre à jour les dépôts et installer le serveur Owncloud :
sudo apt-get update
sudo apt-get install owncloud
Si vous souhaitez passer outre le peu d'automatisation que le client fournit, vous pouvez aussi utiliser un navigateur web récent pour glisser et déposer les fichiers sur votre serveur owncloud.
4
Apple iPad/iPhone owners should note that the iOS client is not free, but the current cost is far less than most mobile apps. You can always just use your browser as a client for uploading and downloading files from your owncloud, but you won’t have the synchronization benefit of the client.
Linux users can simply download the owncloud client package:
sudo apt-get install owncloud-client
If you’re hosting owncloud on a hosted service, you’ll want to enable Secure Socket Layer (SSL) so your account credentials are not easily intercepted. I followed How To Create a SSL Certificate on Apache for Ubuntu 14.04 steps on Digital Ocean (note: I don’t use Digital Ocean, but am thankful for their clear instruction): https://www.digitalocean.com/community/tutorials/how-to-create-a-ssl-certificate-on-apache-for-ubuntu-14-04
Les propriétaires d'iPad ou d'iPhone Apple doivent noter que le client iOS n'est pas gratuit, mais le prix actuel est bien moins élevé que la plupart des applications mobiles. Vous pouvez toujours utiliser votre navigateur comme client pour envoyer et télécharger des fichiers depuis votre serveur owncloud, mais vous ne bénéficierez pas de la synchronisation du client.
Les utilisateurs de Linux peuvent simplement télécharger le paquet du client owncloud :
sudo apt-get install owncloud-client
Si vous hébergez Owncloud sur un service hébergé, vous pouvez activer l'accès SSL de façon à ce que les identifiants de vos comptes ne puissent pas être facilement interceptés. J'ai suivi le tutoriel How To Create a SSL Certificate on Apache for Ubuntu 14.04 pour Digital Ocean (je n'utilise pas Digital Ocean mais leurs instructions sont très claires) : https://www.digitalocean.com/community/tutorials/how-to-create-a-ssl-certificate-on-apache-for-ubuntu-14-04.
5
If you’re just synchronizing between home machines, then you might want to use just regular http. If you’re mixing Windows and Linux machines, then you’re going to need a way for the Windows machines to know the I.P. address of your server. The simplest way I know is to set up your Linux server with a static I.P. address, then add the I.P. address and name to the Windows hosts file. Rackspace has a good article on how to modify the Windows hosts file along with the location of the file for Windows 8/7 and Vista: http://www.rackspace.com/knowledge_center/article/how-do-i-modify-my-hosts-file
To edit the hosts file, you’re need to right-click on notepad and run as administrator, then open the hosts file. You can find the hosts file in Windows 8/7/Vista by navigating to C:\Windows\System32\Drivers\etc\hosts.
The format is <ip address> hostname. So, if you call your Linux computer ‘tank’, and tank’s IP address is 192.168.1.15, your Windows hosts file would contain:
192.168.1.15 tank
6
We’re simply telling Windows where tank can be accessed. Of course, if you’re a DNS wizard, and know all about DNS, or have DNS features built into your router, you might choose to give your server a DHCP reservation and do the DNS yourself. If you install owncloud in Ubuntu using the method above, you can connect via http or https <servername/ip>/owncloud. For example: http://192.168.1.15/owncloud/. The first user account will be your administrator, the account that can create other accounts.
You can synchronize any local folders with your owncloud by opening the client and clicking the Add Folder button on the right of the client. You’ll be prompted to choose the local folder you want to synchronize, either enter it in or browse to it. You’ll also have to enter an alias for the directory. You might be synchronizing a number of folders in different areas with similar content; using an alias can help keep them straight (e.g. UbuntueBooks, codingeBooks). Owncloud will then prompt you to choose the directory on the server to store the synchronized content. If there are sub-folders, they are automatically selected for synchronization, but can be unchecked on the screen following the server directory selection. Don’t forget synchronization goes both ways, so if you select something that already has a lot of content on your server, make sure you have space on your client and vice versa. Beside each file and folder (not to mention calendar) there’s a share icon that lets you share data you want to share. The share can be password protected.
7
When you first set up owncloud, you’ll want to log in through the web interface in order to add any extra users. My wife likes to have all our family photographs and she tends to store important documents on her computer (and I have a bad habit of changing hard drives/SSDs on her), so I’ve set up an account so she can synchronize what’s important to her. The same for our son.
To access the Users menu, click your username in the web interface (provided you’re the admin of course), and click the Users menu option. You can add a new user simply by entering the username and password in the username and password fields above the users, and clicking the Create button. If you’re running an office with a lot of different users you might want to separate the users into different groups. Groups can be created either by clicking the Add Group button or clicking the Groups drop-down beside the password field.
Owncloud can do a lot more than just synchronize documents and pictures. Add-ons exist so everyone can have their own calendar, bookmarks, and contacts. These features can really be handy if you’re running a small/home business or just a busy person on the go all the time.
8
I started using the calendar feature to keep track of user group meetings.
You can add a calendar for each type of event you have to help organize your time. All calendars appear on one calendar, but are differentiated by colour (in my example). I mark off work in red and user group meetings in green. This month, I haven’t marked off any personal obligations (e.g. dentist). Calendars can be shown by Day/Week/Month, and you can go forward and backward to check future and past events.
Owncloud isn’t quite as easy as Dropbox to set up (if you have to set up the server side), but you can ensure that you own your own data ,and you’re more likely to be the only set of eyes looking at your data.