Wiki Moc FFC

Wiki «Fonctionnement Front-Office Commerçant»

Outils pour utilisateurs

Outils du site


geek:notes

Ceci est une ancienne révision du document !


1. DokuWiki - Notes

Ci-dessous un ensemble de notes et manipulations pour le l'outil DokuWiki.



1.1. Installation

Des sources pour CentOS:

☛ VM ffc.moc.inno-sphere : OS RHEL 7

  • En tant que root:
 

☛ Modifier le contexte SELinux (répertoires conf & data)

# semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/dokuwiki/conf(/.*)?"
# semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/dokuwiki/data(/.*)?"
# restorecon -Rv /var/www/html/dokuwiki/conf
# restorecon -Rv /var/www/html/dokuwiki/data

2. MariaDB - Notes

Ci-dessous un ensemble de notes et manipulations pour le SGBD MariaDB Server.



2.1. Installation

☛ VM ffc.moc.inno-sphere : OS RHEL 7

  • En tant que root:
# yum install mariadb-server -y
# systemctl start mariadb
# systemctl enable mariadb
# systemctl status mariadb
  • Sécurisation (mot de passe laissé à blanc la 1ière fois)
# mysql_secure_installation

2.2. Quelques commandes

☛ Version :

$ mysql -V
mysql  Ver 15.1 Distrib 5.5.56-MariaDB, for Linux (x86_64) using readline 5.1
$


☛ Mode commandes / SQL:

$ mysql -u <user> -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 12
Server version: 5.5.56-MariaDB MariaDB Server
 
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
MariaDB [(none)]>


☛ Ajout d'un utilisateur (avec accès réseau et tous les droits): Adapter mdb_user et mdb_userpwd

MariaDB [(none)]> GRANT ALL PRIVILEGES ON *.* TO 'mdb_user'@'%' IDENTIFIED BY 'mdb_userpwd' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)
 
MariaDB [(none)]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
 
MariaDB [(none)]> 


☛ Requête SQL (voir ce qu'on a fait juste avant, utilisateur mca par exemple):

$ mysql -u mca -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 28
Server version: 5.5.56-MariaDB MariaDB Server
 
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
MariaDB [(none)]> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
 
Database changed
MariaDB [mysql]> select User, Host, Password from user order by User, Host;
+------+-----------+-------------------------------------------+
| User | Host      | Password                                  |
+------+-----------+-------------------------------------------+
| mca  | %         | *74DA7469E1AE40D81FF8D78C982F87DD49F25474 |
| root | 127.0.0.1 | *C4794A209AF2D6A116BFD0145CEF24FC7197828D |
| root | ::1       | *C4794A209AF2D6A116BFD0145CEF24FC7197828D |
| root | localhost | *C4794A209AF2D6A116BFD0145CEF24FC7197828D |
+------+-----------+-------------------------------------------+
4 rows in set (0.00 sec)
 
MariaDB [mysql]>


☛ Sortie du mode commandes / SQL:

MariaDB [mysql]> quit
Bye
$ 

3. Adminer - Notes

Ci-dessous un ensemble de notes et manipulations pour le l'outil Adminer.



3.1. Installation

☛ Modifier le contexte SELinux:

# semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/adminer(/.*)?"
# restorecon -Rv /var/www/html/adminer

4. Shaarli - Notes

Ci-dessous un ensemble de notes et manipulations pour l'outil de gestion de liens Shaarli.



4.1. Installation

☛ VM ffc.moc.inno-sphere : OS RHEL 7

  • En tant que root:

5. ELK

Accès dépôts

En **root**
# export http_proxy=http://chinsrv001.inno-sphere.lan:2831
# export https_proxy="http://chinsrv001.inno-sphere.lan:2831"

Java

ELK fonctionne en java: le JRE (Java Runtime Environment) est nécessaire:

# yum install java-1.8.0-openjdk

Clé dépôt

Définir la clé du dépôt:

# rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch

5.1. Elasticsearch

Il faut créer une fichier appelé elasticsearch.repo dans le dossier /etc/yum.repos.d/avec le contenu suivant:

[elasticsearch-6.x]
name=Elasticsearch repository for 6.x packages
baseurl=https://artifacts.elastic.co/packages/6.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md

Le dépôt est alors prêt pour utilisation. Installer «Elasticsearch» avec la commande suivante:

# yum install elasticsearch

Faire tourner Elasticsearch avec systemd Commandes de configuration pour démarrage automatique de Elasticsearch au boot:

# /bin/systemctl daemon-reload 
# /bin/systemctl enable elasticsearch.service

Le service Elasticsearch peut être démarré et stoppé via:

# systemctl start elasticsearch.service 
# systemctl stop elasticsearch.service

Vérifier que ca marche:

# [root@slapa004p0 ~]# curl -X GET "localhost:9200/"
{
  "name" : "5pGdU5d",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "pkpXeHYMQji9kK1-c-6X4Q",
  "version" : {
    "number" : "6.5.4",
    "build_flavor" : "default",
    "build_type" : "rpm",
    "build_hash" : "d2ef93d",
    "build_date" : "2018-12-17T21:17:40.758843Z",
    "build_snapshot" : false,
    "lucene_version" : "7.5.0",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  },
  "tagline" : "You Know, for Search"
}
[root@slapa004p0 ~]#

5.2. Logstach

Il faut créer une fichier appelé logstash.repo dans le dossier /etc/yum.repos.d/avec le contenu suivant:

[logstash-6.x]
name=Elastic repository for 6.x packages
baseurl=https://artifacts.elastic.co/packages/6.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md

Le dépôt est alors prêt pour utilisation. Installer «Logstash» avec la commande suivante:

# yum install logstash

Le service «Logstash» peut être démarré et stoppé via:

# ...

5.3. Kibana

Il faut créer une fichier appelé kibana.repo dans le dossier /etc/yum.repos.d/avec le contenu suivant:

[kibana-7.x]
name=Kibana repository for 7.x packages
baseurl=https://artifacts.elastic.co/packages/7.x-prerelease/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md

Le dépôt est alors prêt pour utilisation. Installer «Kibana» avec la commande suivante:

# yum install kibana

Faire tourner Kibana avec systemd Commandes de configuration pour démarrage automatique de «Kibana» au boot:

# /bin/systemctl daemon-reload 
# /bin/systemctl enable kibana.service

Le service Elasticsearch peut être démarré et stoppé via:

# systemctl start kibana.service 
# systemctl stop kibana.service
geek/notes.1548767213.txt.gz · Dernière modification: 2022/02/10 12:39 (modification externe)