From 4c982de95fb4c4935efac0473a76a813b4a406d0 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 13 Jun 2018 00:04:58 +0200 Subject: [PATCH] Replace some apt-get with simply apt and remove a few unecessary sudo --- install_manually.md | 2 +- install_on_olinuxino.md | 2 +- install_on_olinuxino_fr.md | 2 +- isp_free_fr.md | 2 +- isp_orange_fr.md | 6 +++--- torhiddenservice.md | 4 ++-- torhiddenservice_fr.md | 2 +- troubleshooting_guide.md | 29 ++++++++++++++--------------- troubleshooting_guide_fr.md | 15 ++++++++------- vagrant.md | 2 +- vagrant_fr.md | 2 +- 11 files changed, 34 insertions(+), 34 deletions(-) diff --git a/install_manually.md b/install_manually.md index 6b9cd6f7..7e143e76 100644 --- a/install_manually.md +++ b/install_manually.md @@ -6,7 +6,7 @@ Once you have access to a command line on your server (either directly or throug bash <(wget -q -O- https://install.yunohost.org/) ``` -*(If `wget` is not installed on your system, you might need to install it with `apt-get install wget`)* +*(If `wget` is not installed on your system, you might need to install it with `apt install wget`)* Once the installation is finished, you may want to [**proceed to post-installation**](/postinstall) diff --git a/install_on_olinuxino.md b/install_on_olinuxino.md index 11487bc7..4ebcd4ef 100644 --- a/install_on_olinuxino.md +++ b/install_on_olinuxino.md @@ -88,7 +88,7 @@ After connecting, you will be asked to changed the root password. First, enter * Update your server with the following commands. It can take around 15 minutes. ```bash -apt-get update && apt-get dist-upgrade +apt update && apt dist-upgrade ``` ## Proceed to post-installation diff --git a/install_on_olinuxino_fr.md b/install_on_olinuxino_fr.md index 23f23ad5..a4a781f8 100644 --- a/install_on_olinuxino_fr.md +++ b/install_on_olinuxino_fr.md @@ -86,7 +86,7 @@ ssh root@192.168.x.y Mettre à jour le système (environ 15 minutes) : ```bash -apt-get update && apt-get dist-upgrade +apt update && apt dist-upgrade ``` ## Procéder à la postinstallation diff --git a/isp_free_fr.md b/isp_free_fr.md index d60c0fac..59242ee9 100644 --- a/isp_free_fr.md +++ b/isp_free_fr.md @@ -41,7 +41,7 @@ Pour pouvoir envoyer des mails, passer le blocage en « inactif ». Il faut installer le paquet `cifs-utils` ```bash -$ sudo apt-get install cifs-utils +$ sudo apt install cifs-utils ``` Il faut créer un point de montage (ici `/home/monlogin/freebox`) diff --git a/isp_orange_fr.md b/isp_orange_fr.md index f17f94ff..ef6a532a 100644 --- a/isp_orange_fr.md +++ b/isp_orange_fr.md @@ -69,12 +69,12 @@ Si vous avez une erreur "(SASL authentication failed; cannot authenticate to ser Vérifier la présence de libsasl2-modules et de sasl2-bin : ```bash -sudo apt-cache search libsasl2-modules -sudo apt-cache search sasl2-bin +apt search libsasl2-modules +apt search sasl2-bin ``` Si ils ne sont pas présents, installez-les : ```bash -sudo apt-get install libsasl2-modules sasl2-bin +apt install libsasl2-modules sasl2-bin ``` diff --git a/torhiddenservice.md b/torhiddenservice.md index 55c45abb..594b5a25 100644 --- a/torhiddenservice.md +++ b/torhiddenservice.md @@ -4,7 +4,7 @@ See https://www.torproject.org/docs/tor-hidden-service.html.en ### Installing Tor ```bash -sudo apt-get install tor +apt install tor ``` ### Configuring our hidden service @@ -43,4 +43,4 @@ If you want to avoid being redirected to the SSO portal at login, you can deacti ### Restart nginx ```bash service nginx restart -``` \ No newline at end of file +``` diff --git a/torhiddenservice_fr.md b/torhiddenservice_fr.md index ef5ad0fc..115907ce 100644 --- a/torhiddenservice_fr.md +++ b/torhiddenservice_fr.md @@ -4,7 +4,7 @@ Voir https://www.torproject.org/docs/tor-hidden-service.html.en (anglais) ### Installer Tor ```bash -sudo apt-get install tor +apt install tor ``` ### Configurer notre service caché diff --git a/troubleshooting_guide.md b/troubleshooting_guide.md index f18937c0..7927eaf6 100644 --- a/troubleshooting_guide.md +++ b/troubleshooting_guide.md @@ -27,13 +27,13 @@ Problems often occur after an upgrade. After a YunoHost upgrade you may want to You are probably familiar with: ```bash -sudo apt-get update && sudo apt-get dist-upgrade +$ apt update && apt dist-upgrade ``` Most of the time it's enough. But in some cases it's possible that some process are still using old versions of upgraded files (such as libraries), that can cause bug. In rare cases that can lead to security concern (ex: upgrade OpenSSL because of a security bug, Nginx will continue to use the version it has in memory). The utility Checkrestart will help you to find and restart them. ```bash -sudo apt-get install debian-goodies -sudo checkrestart +$ apt install debian-goodies +$ checkrestart Found 0 processes using old versions of upgraded files ``` If some process are running with old librairies versions checkrestart will tell you and propose you a way to restart them. In some cases checkrestart can't find a way to restart them. @@ -48,10 +48,10 @@ You can also use [this script](https://github.com/octopuce/octopuce-goodies/blob /!\ Always check if there is a upgrade script and read it if you can /!\ ```bash -sudo yunohost app upgrade +$ yunohost app upgrade Warning: You must provide an URL to upgrade your custom app app_name Error: No app to upgrade -sudo yunohost app upgrade -u https://github.com/user/someapp_ynh app_name +$ yunohost app upgrade -u https://github.com/user/someapp_ynh app_name ``` ## Services @@ -61,7 +61,7 @@ YunoHost uses a bunch of software to accomplish its purpose. Most of theses soft When something doesn't work on your YunoHost, one of the first things to do is to check that all services used by YunoHost are running. YunoHost include a helper to see the status of all services used by YunoHost: ```bash -sudo yunohost service status +$ yunohost service status ``` Sample result: @@ -91,21 +91,20 @@ Others services installed by applications can also be present. For instance, `se ##### Start or stop a service which is registered with YunoHost: ```bash -sudo yunohost service start -sudo yunohost service stop +$ yunohost service start +$ yunohost service stop ``` You can also use the generic Debian command: ```bash -sudo systemctl start/stop/restart/reload +$ systemctl start/stop/restart/reload ``` After a launch attempt, always check that the service is running. ### Logs -If a service won't start you have to check the logs to see what's wrong. There is no generic way for services to store their logs, but there are mainly stocked in: -```bash -/var/log/ -``` +If a service won't start you have to check the logs to see what's wrong. There is no generic way for services to store their logs, but there are mainly stocked in: `/var/log/` + Here are the some useful logs files for YunoHost: + ##### auth.log Contains connections or attempt of connection to your server. It includes every web, ssh, cron job connection. It also stockes all the failed (hopefully) attempts to connect by a potential intruders connections. @@ -227,7 +226,7 @@ You can view (don't edit it, it is oftently overwritten) your current SSOwat con ``` Which is generated with the command: ```bash -sudo yunohost app ssowatconf +yunohost app ssowatconf ``` Protip: if you want to add a personalized rule for SSOwat, do it in this file: ```bash @@ -264,7 +263,7 @@ In each app packages you will find: * **config/**: config directory * **settings.yml**: config of the app, also accessible with: ```bash -sudo yunohost app setting appname settingname +yunohost app setting appname settingname ``` ### Logs diff --git a/troubleshooting_guide_fr.md b/troubleshooting_guide_fr.md index 4a3f0ae6..1c308f0f 100644 --- a/troubleshooting_guide_fr.md +++ b/troubleshooting_guide_fr.md @@ -28,15 +28,15 @@ Les problèmes ont souvent lieu après une mise à jour. Après une mise à jour **Vérifier si un processus utilise une ancienne librairie** vous avez sûrement l’habitude d’utiliser : ```bash -sudo apt-get update && sudo apt-get dist-upgrade +$ apt update && apt dist-upgrade ``` La plupart du temps, cela suffit. Mais dans certaines situations, il est possible que certains processus utilisent toujours d’anciennes bibliothèques non mises à jour. Cela peut entraîner des bugs et, dans certains rares cas, des problèmes de sécurité (ex : lors d’une mise à jour de OpenSSL à cause d’une faille de sécurité, Nginx va continuer à utiliser la version dont il dispose en mémoire). L’utilitaire Checkrestart va vous aider à identifier ces processus et les redémarrer. ```bash -sudo apt-get install debian-goodies -sudo checkrestart -Found 0 processes using old versions of upgraded files +$ apt install debian-goodies +checkrestart +# Found 0 processes using old versions of upgraded files ``` Si des processus fonctionnent avec des vieilles versions de bibliothèques, checkrestart va vous le dire et vous proposer une manière de les redémarrer. Il est possible que checkrestart ne trouve pas de manière de les redémarrer. Attention, il faut opérer l’opération manuellement. @@ -52,10 +52,11 @@ Vous pouvez aussi utiliser [ce script](https://github.com/octopuce/octopuce-good ```bash -sudo yunohost app upgrade +$ yunohost app upgrade Warning: You must provide an URL to upgrade your custom app app_name Error: No app to upgrade -sudo yunohost app upgrade -u https://github.com/user/someapp_ynh app_name + +$ yunohost app upgrade -u https://github.com/user/someapp_ynh app_name ``` ## Les services @@ -65,7 +66,7 @@ YunoHost utilise toute une série de logiciels pour fonctionner. La plupart de c Quand quelque chose ne fonctionne pas, une des premières choses à faire est de vérifier que tous les services utilisés par YunoHost sont lancés. YunoHost inclus un outil qui permet de visualiser tous les services utilisés par YunoHost : ```bash -sudo yunohost service status +yunohost service status ``` Exemple de résultat : diff --git a/vagrant.md b/vagrant.md index 992e7d3a..e29dfdfd 100644 --- a/vagrant.md +++ b/vagrant.md @@ -44,7 +44,7 @@ vagrant ssh Upgrade the system ```bash -sudo apt-get update && sudo apt-get dist-upgrade +apt update && apt dist-upgrade ``` You can access to your vm with the ip 192.168.33.10 diff --git a/vagrant_fr.md b/vagrant_fr.md index 267e1cc3..ebb0da31 100644 --- a/vagrant_fr.md +++ b/vagrant_fr.md @@ -44,7 +44,7 @@ vagrant ssh Mettre à jour le système. ```bash -sudo apt-get update && sudo apt-get dist-upgrade +apt update && apt dist-upgrade ``` Vous pouvez accéder à votre vm via l’ip 192.168.33.10.