|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
### Note d'installation TP neocom
|
|
|
|
|
|
|
|
|
|
root Mysql password + phpmyadmin : +M?ex3rr!Y%)Ua_#
|
|
|
|
|
password : Mysql secondaire password
|
|
|
|
|
|
|
|
|
|
Replication Mysql OK
|
|
|
|
|
Montage NFS OK
|
|
|
|
@ -9,19 +10,20 @@ Autorisation sur phpmyadmin uniquement pour l'ip 88.177.222.27 OK
|
|
|
|
|
PhpMyadmin OK
|
|
|
|
|
|
|
|
|
|
Commencer par
|
|
|
|
|
- editer le /etc/hosts des deux machines pour plus de faciliter.
|
|
|
|
|
- editer le /etc/hosts des deux machines pour plus de facilité.
|
|
|
|
|
xxx.xxx.xxx.xxx vpsxxxx.ovh.net server1
|
|
|
|
|
xxx.xxx.xxx.xxx vpsxxxx.ovh.net server2
|
|
|
|
|
|
|
|
|
|
Reproduire sur l'autre noeud à l'identique.
|
|
|
|
|
|
|
|
|
|
## Création d'un export NFS
|
|
|
|
|
- server2 : apt install nfs-kernel-server
|
|
|
|
|
- server2 : mkdir -p /mnt/nfs/www (Ici se trouveront les sources)
|
|
|
|
|
- Ajouter dans /etc/export sur node (secondaire)
|
|
|
|
|
|
|
|
|
|
/mnt/nfs/www 51.38.178.107(rw,sync,no_subtree_check,sync,no_root_squash)
|
|
|
|
|
|
|
|
|
|
Redemarrer nfs-kernel-server
|
|
|
|
|
|
|
|
|
|
systemctl restart nfs-kernel-server
|
|
|
|
|
|
|
|
|
|
- Install NFS Client sur server1 + montage partage
|
|
|
|
@ -29,7 +31,7 @@ apt install nfs client
|
|
|
|
|
showmount -e [[IPNode2]]
|
|
|
|
|
mount -t nfs mount -t nfs 51.38.178.108:/mnt/nfs/www /usr/share/nginx/nfs/html/
|
|
|
|
|
|
|
|
|
|
## Installation stack nginx php7.0 mysql-server
|
|
|
|
|
## Installation stack nginx php7.0 php7.0-fpm mysql-server
|
|
|
|
|
|
|
|
|
|
Client : apt install nginx php7.0 phpmyadmin [[Ce dernier install tout un tas de dépendance PHP]]
|
|
|
|
|
Récupérer la configuration nginx
|
|
|
|
@ -46,6 +48,7 @@ Sur node server :
|
|
|
|
|
|
|
|
|
|
Editer :
|
|
|
|
|
/etc/mysql/mariadb.conf.d/50-server.cnf
|
|
|
|
|
Après la balise [my
|
|
|
|
|
bind-address = 51.38.178.107 [IP de la machine locale]
|
|
|
|
|
replicate-do-db=[[NomDeLaBaseRepliquee]]
|
|
|
|
|
log-bin
|
|
|
|
@ -61,8 +64,6 @@ SHOW MASTER STATUS;
|
|
|
|
|
Dumper la base sur master
|
|
|
|
|
Importer la base sur slave
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### Création certificat ### Probléme
|
|
|
|
|
|
|
|
|
|
root@vps539669:/usr/share/nginx/nfs/html# certbot --nginx certonly --register-unsafely-without-email -d vps539669.ovh.net
|
|
|
|
@ -77,24 +78,17 @@ root password + phpmyadmin : +M?ex3rr!Y%)Ua_#
|
|
|
|
|
|
|
|
|
|
Impossible d'uploader
|
|
|
|
|
|
|
|
|
|
#####
|
|
|
|
|
Installation firewall
|
|
|
|
|
#### Installation firewall
|
|
|
|
|
|
|
|
|
|
apt install ufw
|
|
|
|
|
|
|
|
|
|
Par défaut ce dernier est desactivé
|
|
|
|
|
|
|
|
|
|
Autorisation de certains protocoles :
|
|
|
|
|
ufw allow ssh
|
|
|
|
|
ufw allow http
|
|
|
|
|
ufw allow https
|
|
|
|
|
ufw allow mysql (car écoute sur socket ip)
|
|
|
|
|
ufw enable
|
|
|
|
|
|
|
|
|
|
### A compléter.
|
|
|
|
|
|
|
|
|
|
Install Ngnix
|
|
|
|
|
|
|
|
|
|
Install MariadB Node 1 + 2
|
|
|
|
|
|
|
|
|
|
root password : +M?ex3rr!Y%)Ua_#
|
|
|
|
|
### A terminer .....
|
|
|
|
|
|