18-04-2020
This commit is contained in:
@@ -33,6 +33,16 @@ root@DS916:~#
|
||||
|
||||
|
||||
|
||||
### Taches panifiée:
|
||||
|
||||
Exécuter un script par un utilisateur xxx: ici le script cron.php de Nextcloud doit être lancé par http
|
||||
|
||||
```bash
|
||||
sudo -u http /usr/local/bin/php73 -f /volume1/web/nextcloud/cron.php
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Services:
|
||||
|
||||
#### Afficher la liste des services
|
||||
@@ -307,8 +317,8 @@ root@DS916:/volume1/@appstore/PHP7.0/misc# nano extension_list.json
|
||||
/bin/php
|
||||
- PHP 5.6 (Package PHP 5)
|
||||
/usr/local/bin/php56
|
||||
- PHP 7.0 (Package PHP 7)
|
||||
/usr/local/bin/php70
|
||||
- PHP 7.3 (Package PHP 7)
|
||||
/usr/local/bin/php73
|
||||
|
||||
Pour Apache, c'est la version choisie dans WebStation qui est active.
|
||||
|
||||
@@ -454,90 +464,6 @@ You are already using composer version 1.7.1 (stable channel).
|
||||
|
||||
|
||||
|
||||
### Gitea:
|
||||
|
||||
##### Créer le paquet:
|
||||
|
||||
[Gitea-spk](https://github.com/flipswitchingmonkey/gitea-spk)
|
||||
|
||||
##### Installer le paquet:
|
||||
|
||||
```bash
|
||||
cd ~/git/gitea-spk/
|
||||
sudo synopkg install gitea-1.10.3-linux-amd64.spk
|
||||
```
|
||||
|
||||
Créer un dossier partagé `gitea`, puis éditer les permissions du dossier:
|
||||
|
||||
Permissions -> Utilisateurs du système interne -> gitea lecture /écriture
|
||||
|
||||
|
||||
|
||||
##### Accéder au site:
|
||||
|
||||
http://localhost:3000 . Si Safari ne peut y accéder parce que la connexion n'est pas sécurisée (*HSTS Policy*):
|
||||
|
||||
1. `command + ,`
|
||||
2. **Confidentialité** -> **Gérer les données de sites web**...
|
||||
3. Chercher *localhost*
|
||||
4. Clic **Supprimer**
|
||||
|
||||
|
||||
|
||||
DSM -> Portail des applications -> Proxy inversé
|
||||
|
||||
| | Source | Destination |
|
||||
| ---------- | -------------------- | ----------- |
|
||||
| Protocole | HTTPS | HTTP |
|
||||
| Nom d'hôte | clicclac.synology.me | localhost |
|
||||
| Port | 3001 | 3000 |
|
||||
|
||||
Apache:
|
||||
|
||||
```bash
|
||||
<VirtualHost *:80>
|
||||
ProxyPreserveHost On
|
||||
ProxyRequests off
|
||||
ProxyPass / http://localhost:3000/
|
||||
ProxyPassReverse / http://localhost:3000/
|
||||
</VirtualHost>
|
||||
```
|
||||
|
||||
Nginx:
|
||||
|
||||
```bash
|
||||
server {
|
||||
listen 80;
|
||||
server_name git.example.com;
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:3000;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
Le fichier de config: `/usr/local/gitea/gitea/custom/conf/app.ini`
|
||||
|
||||
`/etc/gitea/app.ini` sur le vps mbv
|
||||
|
||||
|
||||
|
||||
##### Créer un repo sur sur le serveur gitea:
|
||||
|
||||
Il est placé ici: `/volume1/gitea/gitea/gitea-repositories/bruno/test.git`
|
||||
|
||||
Sur le client, on clone le repo:
|
||||
|
||||
```bash
|
||||
$ ~/Documents/Git git clone bruno@dsm916e:/volume1/gitea/gitea/gitea-repositories/bruno/test.git
|
||||
```
|
||||
|
||||
git remote add origin bruno@dsm916e:/volume1/Repositories/wp2012.git
|
||||
|
||||
|
||||
|
||||
### Erreurs:
|
||||
|
||||
/bin/nano
|
||||
|
||||
84
docs/Synology/gitea.md
Normal file
84
docs/Synology/gitea.md
Normal file
@@ -0,0 +1,84 @@
|
||||
### Gitea:
|
||||
|
||||
|
||||
|
||||
##### Créer le paquet:
|
||||
|
||||
[Gitea-spk](https://github.com/flipswitchingmonkey/gitea-spk)
|
||||
|
||||
##### Installer le paquet:
|
||||
|
||||
```bash
|
||||
cd ~/git/gitea-spk/
|
||||
sudo synopkg install gitea-1.10.3-linux-amd64.spk
|
||||
```
|
||||
|
||||
Créer un dossier partagé `gitea`, puis éditer les permissions du dossier:
|
||||
|
||||
Permissions -> Utilisateurs du système interne -> gitea lecture /écriture
|
||||
|
||||
|
||||
|
||||
##### Accéder au site:
|
||||
|
||||
http://localhost:3000 . Si Safari ne peut y accéder parce que la connexion n'est pas sécurisée (*HSTS Policy*):
|
||||
|
||||
1. `command + ,`
|
||||
2. **Confidentialité** -> **Gérer les données de sites web**...
|
||||
3. Chercher *localhost*
|
||||
4. Clic **Supprimer**
|
||||
|
||||
|
||||
|
||||
DSM -> Portail des applications -> Proxy inversé
|
||||
|
||||
| | Source | Destination |
|
||||
| ---------- | -------------------- | ----------- |
|
||||
| Protocole | HTTPS | HTTP |
|
||||
| Nom d'hôte | clicclac.synology.me | localhost |
|
||||
| Port | 3001 | 3000 |
|
||||
|
||||
Apache:
|
||||
|
||||
```bash
|
||||
<VirtualHost *:80>
|
||||
ProxyPreserveHost On
|
||||
ProxyRequests off
|
||||
ProxyPass / http://localhost:3000/
|
||||
ProxyPassReverse / http://localhost:3000/
|
||||
</VirtualHost>
|
||||
```
|
||||
|
||||
Nginx:
|
||||
|
||||
```bash
|
||||
server {
|
||||
listen 80;
|
||||
server_name git.example.com;
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:3000;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
Le fichier de config: `/usr/local/gitea/gitea/custom/conf/app.ini`
|
||||
|
||||
`/etc/gitea/app.ini` sur le vps mbv
|
||||
|
||||
|
||||
|
||||
##### Créer un repo sur sur le serveur gitea:
|
||||
|
||||
Il est placé ici: `/volume1/gitea/gitea/gitea-repositories/bruno/test.git`
|
||||
|
||||
Sur le client, on clone le repo:
|
||||
|
||||
```bash
|
||||
$ ~/Documents/Git git clone bruno@dsm916e:/volume1/gitea/gitea/gitea-repositories/bruno/test.git
|
||||
```
|
||||
|
||||
git remote add origin bruno@dsm916e:/volume1/Repositories/wp2012.git
|
||||
|
||||
222
docs/Synology/nextcloud.md
Normal file
222
docs/Synology/nextcloud.md
Normal file
@@ -0,0 +1,222 @@
|
||||
# Nextcloud
|
||||
|
||||
|
||||
|
||||
https://docs.nextcloud.com/server/18/admin_manual/index.html
|
||||
|
||||
|
||||
|
||||
#### Mise à jour 18.0.1 -> 18.0.3
|
||||
|
||||
```bash
|
||||
bruno@DS916:/volume1/web/nextcloud $ sudo -u http /usr/local/bin/php73 updater/updater.phar
|
||||
Nextcloud Updater - version: v16.0.3-3-ga0c2b25 dirty
|
||||
|
||||
Current version is 18.0.1.
|
||||
|
||||
Update to Nextcloud 18.0.3 available. (channel: "stable")
|
||||
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-18.0.3.zip
|
||||
Open changelog ↗
|
||||
|
||||
Steps that will be executed:
|
||||
[ ] Check for expected files
|
||||
[ ] Check for write permissions
|
||||
[ ] Create backup
|
||||
[ ] Downloading
|
||||
[ ] Verify integrity
|
||||
[ ] Extracting
|
||||
[ ] Enable maintenance mode
|
||||
[ ] Replace entry points
|
||||
[ ] Delete old files
|
||||
[ ] Move new files in place
|
||||
[ ] Done
|
||||
|
||||
Start update? [y/N] y
|
||||
|
||||
Info: Pressing Ctrl-C will finish the currently running step and then stops the updater.
|
||||
|
||||
[✔] Check for expected files
|
||||
[✔] Check for write permissions
|
||||
[✔] Create backup
|
||||
[✔] Downloading
|
||||
[✔] Verify integrity
|
||||
[✔] Extracting
|
||||
[✔] Enable maintenance mode
|
||||
[✔] Replace entry points
|
||||
[✔] Delete old files
|
||||
[✔] Move new files in place
|
||||
[✔] Done
|
||||
|
||||
Update of code successful.
|
||||
|
||||
Should the "occ upgrade" command be executed? [Y/n] Y
|
||||
This version of Nextcloud requires at least PHP 7.2<br/>You are currently running 5.6.11. Please update your PHP version.
|
||||
Keep maintenance mode active? [y/N] ^C # Ctrl-C
|
||||
This version of Nextcloud requires at least PHP 7.2<br/>You are currently running 5.6.11. Please update your PHP version.
|
||||
Maintenance mode is disabled
|
||||
|
||||
```
|
||||
|
||||
A *"Should the "occ upgrade" command be executed? [Y/n]"*, répondre Non.
|
||||
|
||||
La version par défaut de PHP est la 5.6.11, ce qui est insuffisant (7.2 requis). On relance la suite avec la bonne version de php:
|
||||
|
||||
```bash
|
||||
bruno@DS916:/volume1/web/nextcloud $ sudo -u http /usr/local/bin/php73 occ maintenance:mode --on
|
||||
Password:
|
||||
The current PHP memory limit is below the recommended value of 512MB.
|
||||
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
|
||||
You may use your browser or the occ upgrade command to do the upgrade
|
||||
Maintenance mode already enabled
|
||||
```
|
||||
|
||||
```bash
|
||||
bruno@DS916:/volume1/web/nextcloud $ sudo -u http /usr/local/bin/php73 occ upgrade
|
||||
The current PHP memory limit is below the recommended value of 512MB.
|
||||
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
|
||||
You may use your browser or the occ upgrade command to do the upgrade
|
||||
Set log level to debug
|
||||
Updating database schema
|
||||
Updated database
|
||||
Checking for update of app accessibility in appstore
|
||||
Checked for update of app "accessibility" in appstore
|
||||
Checking for update of app activity in appstore
|
||||
Checked for update of app "activity" in appstore
|
||||
Checking for update of app admin_audit in appstore
|
||||
Checked for update of app "admin_audit" in appstore
|
||||
.../...
|
||||
Checking for update of app viewer in appstore
|
||||
Checked for update of app "viewer" in appstore
|
||||
Checking for update of app workflowengine in appstore
|
||||
Checked for update of app "workflowengine" in appstore
|
||||
Starting code integrity check...
|
||||
Finished code integrity check
|
||||
Update successful
|
||||
Maintenance mode is kept active
|
||||
Reset log level
|
||||
bruno@DS916:/volume1/web/nextcloud $ sudo -u http /usr/local/bin/php73 occ maintenance:mode --off
|
||||
The current PHP memory limit is below the recommended value of 512MB.
|
||||
Maintenance mode disabled
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Mode maintenance:
|
||||
|
||||
```bash
|
||||
bruno@DS916:/volume1/web/nextcloud $ sudo -u http /usr/local/bin/php73 occ maintenance:mode --on
|
||||
Password:
|
||||
The current PHP memory limit is below the recommended value of 512MB.
|
||||
Maintenance mode enabled
|
||||
```
|
||||
|
||||
#### Réparation:
|
||||
|
||||
```bash
|
||||
bruno@DS916:/volume1/web/nextcloud $ sudo -u http /usr/local/bin/php73 occ maintenance:repair
|
||||
Password:
|
||||
The current PHP memory limit is below the recommended value of 512MB.
|
||||
Nextcloud is in maintenance mode - no apps have been loaded
|
||||
|
||||
- Repair MySQL collation
|
||||
- All tables already have the correct collation -> nothing to do
|
||||
- Repair mime types
|
||||
- Clean tags and favorites
|
||||
- 0 tags of deleted users have been removed.
|
||||
- 0 tags for delete files have been removed.
|
||||
- 0 tag entries for deleted tags have been removed.
|
||||
- 0 tags with no entries have been removed.
|
||||
- Repair invalid shares
|
||||
|
||||
.../...
|
||||
|
||||
```
|
||||
|
||||
#### Ajouter les index manquants à la base de donnée:
|
||||
|
||||
```bash
|
||||
bruno@DS916:/volume1/web/nextcloud $ sudo -u http /usr/local/bin/php73 occ db:add-missing-indices
|
||||
The current PHP memory limit is below the recommended value of 512MB.
|
||||
Check indices of the share table.
|
||||
Check indices of the filecache table.
|
||||
Check indices of the twofactor_providers table.
|
||||
Check indices of the login_flow_v2 table.
|
||||
Check indices of the whats_new table.
|
||||
Check indices of the cards table.
|
||||
Check indices of the cards_properties table.
|
||||
Check indices of the calendarobjects_props table.
|
||||
Adding calendarobject_calid_index index to the calendarobjects_props table, this can take some time...
|
||||
calendarobjects_props table updated successfully.
|
||||
Check indices of the schedulingobjects table.
|
||||
Adding schedulobj_principuri_index index to the schedulingobjects table, this can take some time...
|
||||
schedulingobjects table updated successfully.
|
||||
```
|
||||
|
||||
#### Quitter le mode maintenance:
|
||||
|
||||
```bash
|
||||
bruno@DS916:/volume1/web/nextcloud $ sudo -u http /usr/local/bin/php73 occ maintenance:mode --off
|
||||
Password:
|
||||
The current PHP memory limit is below the recommended value of 512MB.
|
||||
Maintenance mode disabled
|
||||
```
|
||||
|
||||
|
||||
|
||||
Ajouter les 2 lignes suivantes au `/usr/local/etc/apache22/sites-enabled/httpd.conf`
|
||||
|
||||
```bash
|
||||
Redirect 301 /.well-known/carddav /nextcloud/remote.php/dav
|
||||
Redirect 301 /.well-known/caldav /nextcloud/remote.php/dav
|
||||
```
|
||||
|
||||
puis redémarrer Apache:
|
||||
|
||||
```bash
|
||||
$ sudo stop pkg-apache22
|
||||
pkg-apache22 stop/waiting
|
||||
$ sudo start pkg-apache22
|
||||
pkg-apache22 start/running, process 16823
|
||||
|
||||
$ reload pkg-apache22
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Exécuter les taches cron de Nextcloud :
|
||||
|
||||
<u>Webcron:</u> [cron-job.org](https://cron-job.org/en/)
|
||||
|
||||
<u>Planificateur de taches Synology:</u>
|
||||
|
||||
Tache planifiée -> script défini par l'utilisateur:
|
||||
|
||||
- Utilisateur: root
|
||||
- Programmer: Quotidienne
|
||||
- Exécuter la commande: `sudo -u http /usr/local/bin/php73 -f /volume1/web/nextcloud/cron.php`
|
||||
|
||||
<u>Crontab:</u>
|
||||
|
||||
```bash
|
||||
$ sudo -i
|
||||
# Edit /etc/crontab
|
||||
|
||||
$ nano /etc/crontab
|
||||
#minute hour mday month wday who command
|
||||
49 0 * * 2 root /usr/local/bin/php73 -f /volume1/web/nextcloud/cron.php
|
||||
|
||||
49/TAB/0/TAB/*/TAB/*/TAB/2/TAB/root/TAB/commande
|
||||
|
||||
#Restart the cron deamon by typing:
|
||||
$synoservice -restart crond
|
||||
```
|
||||
|
||||
|
||||
|
||||
Tester la tache dans le terminal:
|
||||
|
||||
```bash
|
||||
# ok
|
||||
sudo -u http /usr/local/bin/php73 -f /volume1/web/nextcloud/cron.php
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user