This commit is contained in:
2026-01-28 16:54:06 +01:00
parent 213c2836f9
commit 493eb0ed90
73 changed files with 0 additions and 0 deletions

589
installs_on_host/Caddyfile Normal file
View File

@@ -0,0 +1,589 @@
{
debug
http_port 80
https_port 443
email admin@delmar.bzh
default_sni delmar.bzh
admin :2019
acme_dns ovh {
endpoint ovh-eu
application_key 3f8bdfed17f848d8
application_secret 6946758d7515ecef108aeb286bf3c7d0
consumer_key 94b2ddf482d36421a33aa6b3aa515956
}
log {
output stderr
format filter {
# Preserves first 8 bits from IPv4 and 32 bits from IPv6
request>remote_ip ip_mask 8 32
request>client_ip ip_mask 8 32
# Remove identificable information
request>remote_port delete
request>headers delete
request>uri query {
delete url
delete h
delete q
}
}
}
servers {
# Allow the following IP to passthrough the "X-Forwarded-*" headers to SearXNG
# https://caddyserver.com/docs/caddyfile/options#trusted-proxies
trusted_proxies static private_ranges
trusted_proxies_strict
client_ip_headers X-Forwarded-For X-Real-IP
}
}
(LAN_only) {
@local_subnets {
not remote_ip 192.168.1.0/24
}
respond @local_subnets 403
}
*:80 {
encode {
zstd
gzip
minimum_length 1024
}
root * /var/www/comics
file_server
}
affine.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy sandy:3010
}
asm.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy sheldon:50154
}
books.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy sandy:32768
}
cap.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy carlo:11338
}
cloud.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy sheldon:11000 {
header_up Host {upstream_hostport}
}
# client support (e.g. os x calendar / contacts)
redir /.well-known/carddav /remote.php/dav 301
redir /.well-known/caldav /remote.php/dav 301
header {
Strict-Transport-Security "max-age=31536000; includeSubdomains; preload"
X-XSS-Protection "1; mode=block;"
X-Content-Type-Options "nosniff"
X-Frame-Options "SAMEORIGIN"
}
}
cloud.delmar.bzh:8443 {
reverse_proxy sheldon:8080 {
transport http {
tls_insecure_skip_verify
}
}
}
cnvrt.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy patrick:32770
}
crm.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy patrick:15069
}
cs.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy sandy:49505
}
ctr.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy sheldon:47810
}
cvs.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy sandy:54268
}
dev.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy sheldon:19080
}
dia.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy patrick:53000
}
dkr.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy bob:9120
}
draw.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy sheldon:24928
}
gen.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy carlo:15578
}
git.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy patrick:3001
}
gotify.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy bob:41901
}
homepage.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy gary:7575
}
home-assistant.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy gary:8123
}
inv.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy patrick:64616
}
it.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy sheldon:11404
}
jellyfin.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy gary:8096
}
jellyseerr.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy gary:5055
}
kontadenn.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
root * /var/www/kontadenn
file_server
handle_errors {
@404 {
expression {http.error.status_code} == 404
}
rewrite @404 /
file_server
}
}
mail.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy sheldon:10003 {
transport http {
proxy_protocol v2
}
header_up Host {upstream_hostport}
}
}
mailbear.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy carlo:11234 {
header_up Host {upstream_hostport}
}
}
minio.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy sandy:9000
}
mon.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy bob:11750
}
nds.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
root * /var/www/nds
file_server
handle_errors {
@404 {
expression {http.error.status_code} == 404
}
rewrite @404 /
file_server
}
}
nsns.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
root * /var/www/nsns
file_server
handle_errors {
@404 {
expression {http.error.status_code} == 404
}
rewrite @404 /
file_server
}
}
octoprint.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy bernie:54963 {
header_up X-Forwarded-Proto {scheme}
}
}
paperless.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy sandy:8000
}
pdf.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy sheldon:16080
}
penpot.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy sandy:43735
}
pip.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
root * /var/www/picpitch-collage
file_server
}
restreamer.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy carlo:8080
}
scanopy.delmar.bzh
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy patrick:60072
}
search.delmar.bzh
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy sandy:23485
}
send.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy patrick:53842
}
shop.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
root * /var/www/shop
file_server
}
stream.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy bernie:62036
basic_auth / {
admin $2a$14$RuKvTkZWcLpyX/ptJmkmYOd6WpDACXi.fIcz2feCcvTW73vZ/4TSi
}
}
tpml.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
root * /var/www/tpml
file_server
handle_errors {
@404 {
expression {http.error.status_code} == 404
}
rewrite @404 /
file_server
}
}
twip.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy patrick:12473
handle_errors {
rewrite * /{err.status_code}
reverse_proxy patrick:12473 {
header_up Host {upstream_hostport}
replace_status {err.status_code}
}
}
}
ugo.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy gary:8090
}
vault.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy gary:16081
}
wizarr.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy gary:5690
}
www.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
root * /var/www/comics
file_server
handle_errors {
@404 {
expression {http.error.status_code} == 404
}
rewrite @404 /404.html
file_server
}
}
xcd.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy sheldon:7576
}
zik.delmar.bzh {
encode {
zstd
gzip
minimum_length 1024
}
reverse_proxy gary:32768
}

304
installs_on_host/apache.md Normal file
View File

@@ -0,0 +1,304 @@
# Web
## Structure
```
.
├── apache
├── www.delmar.bzh (80) > hugo
├── nsns.delmar.bzh (81) > hugo
├── ugo.delmar.bzh (82) > wordpress
├── dav.delmar.bzh (83) > baïkal
├── julien.delmar.bzh (84) > hugo
├── nds.delmar.bzh (85) > hugo
├── shop.delmar.bzh (86) > prestashop
├── kontadenn.delmar.bzh (87) > joomla
├── _____.delmar.bzh (88) >
└── _____.delmar.bzh (89) >
```
```bash
sudo vim /etc/apache2/ports.conf
```
```conf
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf
Listen 80
Listen 81
Listen 82
Listen 83
Listen 84
Listen 85
Listen 86
Listen 87
Listen 88
Listen 89
<IfModule ssl_module>
       Listen 443
</IfModule>
<IfModule mod_gnutls.c>
       Listen 443
</IfModule>
```
```bash
sudo vim /etc/apache2/sites-available/delmar.bzh.conf
```
```conf
<VirtualHost *:80>
ServerName www.delmar.bzh
ServerAdmin admin@delmar.bzh
DocumentRoot /var/www/hugo
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:81>
ServerName nsns.delmar.bzh
ServerAdmin admin@delmar.bzh
DocumentRoot /var/www/nsns
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:82>
ServerName ugo.delmar.bzh
ServerAdmin ugo@delmar.bzh
DocumentRoot /var/www/wpugo
<Directory /var/www/wpugo>
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
allow from all
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
DavLockDB /usr/local/apache/var/DavLock
<VirtualHost *:83>
ServerAdmin admin@delmar.bzh
DocumentRoot /var/www/baikal/html
ServerName dav.delmar.bzh
RewriteEngine on
RewriteRule /.well-known/carddav /dav.php [R=308,L]
RewriteRule /.well-known/caldav /dav.php [R=308,L]
<Directory "/var/www/baikal/html">
Options None
# If you install cloning git repository, you may need the following
# Options +FollowSymlinks
AllowOverride None
# Configuration for apache-2.4:
Require all granted
# Configuration for apache-2.2:
# Order allow,deny
# Allow from all
</Directory>
Alias /webdav /var/www/webdav
<Directory /var/www/webdav>
DAV On
AuthType Basic
AuthName "webdav"
AuthUserFile /usr/local/apache/var/users.password
Require user admin
</Directory>
<Directory /var/www/webdav/shared>
Options Indexes
AllowOverride none
Order allow,deny
allow from all
DAV On
AuthType Basic
AuthName "webdav"
AuthUserFile /usr/local/apache/var/users.password
<Limit GET POST PROPFIND PUT DELETE PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
Require valid-user
</Limit>
</Directory>
<Directory /var/www/webdav/julien>
Options Indexes
AllowOverride none
Order allow,deny
allow from all
DAV on
AuthType Basic
AuthName "webdav"
AuthUserFile /usr/local/apache/var/users.password
<Limit GET POST PROPFIND PUT DELETE PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
Require user julien
</Limit>
</Directory>
<Directory /var/www/webdav/eliot>
Options Indexes
AllowOverride none
Order allow,deny
allow from all
DAV on
AuthType Basic
AuthName "webdav"
AuthUserFile /usr/local/apache/var/users.password
<Limit GET POST PROPFIND PUT DELETE PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
Require user eliot
</Limit>
</Directory>
<IfModule mod_expires.c>
ExpiresActive Off
</IfModule>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:84>
ServerName julien.delmar.bzh
ServerAdmin admin@delmar.bzh
DocumentRoot /var/www/resumes/julien
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:85>
ServerName nds.delmar.bzh
ServerAdmin admin@delmar.bzh
DocumentRoot /var/www/nds
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:86>
ServerName shop.delmar.bzh
ServerAdmin admin@delmar.bzh
DocumentRoot /var/www/shop
<Directory /var/www/shop>
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
allow from all
RewriteEngine on
#Domain: shop.delmar.bzh
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api(?:/(.*))?$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
RewriteRule ^upload/.+$ %{ENV:REWRITEBASE}index.php [QSA,L]
# Images
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$1$3 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$1$4 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$1$5 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$5/$1$6 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])([\d])([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$5/$6/$1$7 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])([\d])([\d])([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$5/$6/$7/$1$8 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])([\d])([\d])([\d])([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$5/$6/$7/$8/$1$9 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^c/([\d]+)(\-[\.*\w-]*)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/c/$1$2$3 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^c/([a-zA-Z_-]+)(-[\d]+)?/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/c/$1$2$3 [L]
# AlphaImageLoader for IE and fancybox
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ %{ENV:REWRITEBASE}js/jquery/plugins/fancybox/images/$1.$2 [L]
# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:87>
ServerName kontadenn.delmar.bzh
ServerAdmin admin@delmar.bzh
DocumentRoot /var/www/kontadenn
<Directory /var/www/kontadenn>
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
allow from all
RewriteEngine on
#Domain: kontadenn.delmar.bzh
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api(?:/(.*))?$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
RewriteRule ^upload/.+$ %{ENV:REWRITEBASE}index.php [QSA,L]
# Images
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$1$3 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$1$4 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$1$5 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$5/$1$6 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])([\d])([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$5/$6/$1$7 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])([\d])([\d])([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$5/$6/$7/$1$8 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])([\d])([\d])([\d])([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$5/$6/$7/$8/$1$9 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^c/([\d]+)(\-[\.*\w-]*)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/c/$1$2$3 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^c/([a-zA-Z_-]+)(-[\d]+)?/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/c/$1$2$3 [L]
# AlphaImageLoader for IE and fancybox
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ %{ENV:REWRITEBASE}js/jquery/plugins/fancybox/images/$1.$2 [L]
# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
```
```bash
sudo systemctl restart apache2
```

200
installs_on_host/baïkal.md Normal file
View File

@@ -0,0 +1,200 @@
# Baïkal
## Structure
```
.
├── apache
| ├── baikal (83)
| └── webdav
└── mariadb
```
[https://sabre.io/baikal/install/](https://sabre.io/baikal/install/ "https://sabre.io/baikal/install/")
## mariadb
`mysql -u root -p (transatlantique)`
```
CREATE DATABASE baikal;
CREATE USER "admin"@"localhost" IDENTIFIED BY "BymQt5Z9yaL5hE";
GRANT ALL PRIVILEGES ON baikal.* TO "admin"@"localhost";
FLUSH PRIVILEGES;
EXIT;
```
<div class="table-wrapper" id="bkmrk-database-user-passwo"><table><tbody><tr><th colspan="1" rowspan="1">database</th><th colspan="1" rowspan="1">user</th><th colspan="1" rowspan="1">password</th><th colspan="1" rowspan="1">host</th></tr><tr><td colspan="1" rowspan="1">baikal</td><td colspan="1" rowspan="1">admin</td><td colspan="1" rowspan="1">BymQt5Z9yaL5hE</td><td colspan="1" rowspan="1">localhost</td></tr></tbody></table>
</div>## Installation
```
cd /var/www/baikal/
wget https://github.com/sabre-io/Baikal/releases/download/0.9.4/baikal-0.9.4.zip
unzip baikal-0.9.4.zip
cd baikal
chown -R www-data:www-data Specific config
```
## apache
> add virtualhost to /etc/apache2/sites-available/delmar.bzh.conf
```conf
DavLockDB /usr/local/apache/var/DavLock
<VirtualHost *:83>
       ServerAdmin admin@delmar.bzh
       DocumentRoot /var/www/baikal/html
       ServerName dav.delmar.bzh
       RewriteEngine on
       RewriteRule /.well-known/carddav /dav.php [R=308,L]
       RewriteRule /.well-known/caldav  /dav.php [R=308,L]
       <Directory "/var/www/baikal/html">
               Options None
               # If you install cloning git repository, you may need the following
               # Options +FollowSymlinks
               AllowOverride None
               # Configuration for apache-2.4:
               Require all granted
               # Configuration for apache-2.2:
               # Order allow,deny
               # Allow from all
       </Directory>
       <IfModule mod_expires.c>
               ExpiresActive Off
       </IfModule>
       ErrorLog ${APACHE_LOG_DIR}/error.log
       CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
```
#### Run installer :
> [https://dav.delmar.bzh](https://dav.delmar.bzh "https://dav.delmar.bzh")
## WebDAV
```
sudo a2enmod dav
sudo a2enmod dav_fs
sudo systemctl restart apache2.service
sudo mkdir /var/www/webdav
sudo chown www-data:www-data /var/www/webdav
sudo mkdir -p /usr/local/apache/var/
sudo chown www-data:www-data /usr/local/apache/var
sudo touch /usr/local/apache/var/users.password
sudo chown www-data:www-data /usr/local/apache/var/users.password
```
#### Users
```bash
sudo htpasswd /usr/local/apache/var/users.password julien SnEnfQVzqs8K9A
```
`sudo vim /etc/apache2/sites-available/delmar.bzh.conf`
```
<VirtualHost *:83>
       ServerAdmin admin@delmar.bzh
       DocumentRoot /var/www/baikal/html
       ServerName dav.delmar.bzh
       RewriteEngine on
       RewriteRule /.well-known/carddav /dav.php [R=308,L]
       RewriteRule /.well-known/caldav  /dav.php [R=308,L]
       <Directory "/var/www/baikal/html">
               Options None
               # If you install cloning git repository, you may need the following
               # Options +FollowSymlinks
               AllowOverride None
               # Configuration for apache-2.4:
               Require all granted
               # Configuration for apache-2.2:
               # Order allow,deny
               # Allow from all
       </Directory>
       Alias /webdav /var/www/webdav
       <Directory /var/www/webdav>
               DAV On
               AuthType Basic
               AuthName "webdav"
               AuthUserFile /usr/local/apache/var/users.password
               Require user admin
       </Directory>
       <Directory /var/www/webdav/shared>
               Options Indexes
               AllowOverride none
               Order allow,deny
               allow from all
               DAV On
               AuthType Basic
               AuthName "webdav"
               AuthUserFile /usr/local/apache/var/users.password
               <Limit GET POST PROPFIND PUT DELETE PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
                       Require valid-user
               </Limit>
       </Directory>
       <Directory /var/www/webdav/julien>
               Options Indexes
               AllowOverride none
               Order allow,deny
               allow from all
               DAV on
               AuthType Basic
               AuthName "webdav"
               AuthUserFile /usr/local/apache/var/users.password
               <Limit GET POST PROPFIND PUT DELETE PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
                       Require user julien
               </Limit>
       </Directory>
       <Directory /var/www/webdav/eliot>
               Options Indexes
               AllowOverride none
               Order allow,deny
               allow from all
               DAV on
               AuthType Basic
               AuthName "webdav"
               AuthUserFile /usr/local/apache/var/users.password
               <Limit GET POST PROPFIND PUT DELETE PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
                       Require user eliot
               </Limit>
       </Directory>
       <IfModule mod_expires.c>
               ExpiresActive Off
       </IfModule>
       ErrorLog ${APACHE_LOG_DIR}/error.log
       CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
```
```
sudo a2enmod auth_digest
sudo systemctl restart apache2.service
sudo vim /var/www/webdav/webdav-testfile.txt
sudo chown www-data:www-data /var/www/webdav/webdav-testfile.txt
```

View File

@@ -0,0 +1,118 @@
Borg Server / Borg Backup
===
#### Install Borg
```bash
sudo apt install borgbackup -y
```
### Repository initialization on server :
#### Classic repo
```bash
borg init -e none /mnt/data/backup/<repo_name>
```
### Repository initialization from distant host :
```bash
# local
borg init -e none /mnt/data/backup/<repo_name>
# distant
borg init -e none ssh://pleb@krabs/mnt/data/backup/<repo_name>
```
#### Encrypted repo
```bash
# local
borg init -e repokey /mnt/data/backup/<repo_name>
# distant
borg init -e repokey ssh://pleb@krabs/mnt/data/backup/<repo_name>
```
> Enter a passphrase to encrypt the folder.
```txt
Enter new passphrase:
Enter same passphrase again:
IMPORTANT: you will need both KEY AND PASSPHRASE to access this repo!
If you used a repokey mode, the key is stored in the repo, but you should back it up separately.
Use "borg key export" to export the key, optionally in printable format.
Write down the passphrase. Store both at safe place(s).
```
### Create a backup :
```bash
cd /path/to/folder
# local
borg create --progress --stats -C zstd,10 /mnt/data/backup/<repo_name>::20251018 .
# distant
borg create --progress --stats -C zstd,10 ssh://pleb@krabs/mnt/data/backup/<repo_name>::20251018 .
```
### List a backup :
```bash
# local
borg list /mnt/data/backup/<repo_name>::20251018
# distant
borg list ssh://pleb@krabs/mnt/data/backup/<repo_name>::20251018
```
### Verify the backup folder using the command info:
```bash
# local
borg info /mnt/data/backup/<repo_name>::20251018
# distant
borg info ssh://pleb@krabs/mnt/data/backup/<repo_name>::20251018
```
### Restore a backup to a folder :
```bash
# local
borg extract --progress /mnt/data/backup/<repo_name>::20251018 /path/to/folder
# distant
borg extract --progress ssh://pleb@krabs/mnt/data/backup/<repo_name>::20251018 /path/to/folder
```
### Mount a backup :
```bash
mkdir /var/tmp/<folder_name>
# local
borg mount /mnt/data/backup/<repo_name>::20251018 /var/tmp/<folder_name>
# distant
borg mount ssh://pleb@krabs/mnt/data/backup/<repo_name>::20251018 /var/tmp/<folder_name>
# unmount
borg unmount var/tmp/<folder_name>
```
### Delete a backup :
```bash
# local
borg delete /mnt/data/backup/<repo_name>::20251018
# distant
borg delete ssh://pleb@krabs/mnt/data/backup/<repo_name>::20251018
```
### Freeup space
#### Compact space
```bash
# local
borg compact /mnt/data/backup
# distant
borg compact ssh://pleb@krabs/mnt/data/backup
```
#### Prune and keep lastest 2 backups
```bash
# local
borg prune --keep-last 2 /mnt/data/backup
# distant
borg prune --keep-last 2 ssh://pleb@krabs/mnt/data/backup
```

320
installs_on_host/caddy.md Normal file
View File

@@ -0,0 +1,320 @@
# Caddy
## Structure
```
.
├── caddy (80 | 443)
└── Caddyfile
```
### Caddy / xcaddy
```bash
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
# caddy
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
# xcaddy
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/xcaddy/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-xcaddy-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/xcaddy/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-xcaddy.list
sudo apt update && sudo apt install -y caddy xcaddy
```
#### Build with dns-ovh
```
https://go.dev/dl/
```
```bash
wget https://go.dev/dl/go1.23.1.linux-arm64.tar.gz
rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.23.1.linux-arm64.tar.gz
export PATH=$PATH:/usr/local/go/bin
```
```bash
mkdir ~/caddy
cd caddy
xcaddy build --with github.com/caddy-dns/ovh \
--with github.com/mholt/caddy-l4/modules/l4proxy \
--with github.com/mholt/caddy-l4/modules/l4tls \
--with github.com/mholt/caddy-l4/modules/l4proxyprotocol
sudo mv caddy /usr/bin
sudo chown root:root /usr/bin/caddy
sudo chmod 755 /usr/bin/caddy
sudo systemctl daemon-reload
```
```bash
sudo vim /etc/caddy/Caddyfile
```
> [[Caddyfile]]
```bash
sudo systemctl restart caddy
```
# Services
<div class="table-wrapper" id="bkmrk-service-host-ip%3Aport"><table>
<tbody>
<tr>
<th>URL</th>
<th>host</th>
<th>(service) port</th>
</tr>
<tr>
<td>affine.delmar.bzh</td>
<td>sandy</td>
<td>(affine_server) 3010 </br>
(affine_migration_job)</br>
(affine_postgres)</br>
(affine_redis)</br></td>
</tr>
<tr>
<td>books.delmar.bzh</td>
<td>sandy</td>
<td>(booklore) 32768 </br>
(mariadb)</td>
</tr>
<tr>
<td>bookstack.delmar.bzh</td>
<td>sandy</td>
<td>(bookstack) 6875 </br>
(bookstack_db)</td>
</tr>
<tr>
<td>caddymanager</td>
<td>bob</td>
<td>(frontend) 20125 </br>
(backend) </br>
(mongodb)</td>
</tr>
<tr>
<td>cap.delmar.bzh</td>
<td>carlo</td>
<td>(cap-standalone) 55338</td>
</tr>
<tr>
<td>cloud.delmar.bzh</td>
<td>sheldon</td>
<td>(nextcloud-aio-mastercontainer) 8080 </br>
(nextcloud-aio-apache) 11000</br>
(nextcloud-aio-nextcloud)</br>
(nextcloud-aio-imaginary)</br>
(nextcloud-aio-redis)</br>
(nextcloud-aio-database)</br>
(nextcloud-aio-whiteboard)</br>
(nextcloud-aio-notify-push)</br>
(nextcloud-aio-talk) 3478</br>
(nextcloud-aio-collabora)</td>
</tr>
<tr>
<td>cpt.delmar.bzh</td>
<td>All</td>
<td>() 9090</td>
</tr>
<tr>
<td>cs.delmar.bzh</td>
<td>sandy</td>
<td>(code-server) 49505</td>
</tr>
<tr>
<td>ctr.delmar.bzh</td>
<td>sheldon</td>
<td>(compose-craft-saas) 47810 </br>
(compose-craft-db) 27017</td>
</tr>
<tr>
<td>cvs.delmar.bzh</td>
<td>sandy</td>
<td>(reactive-resume_app) 54268 </br>
(reactive-resume_minio) 9000 </br>
(reactive-resume_chrome) </br>
(reactive-resume_postgres)</td>
</tr>
<tr>
<td>dev.delmar.bzh</td>
<td>gary</td>
<td>(wm-caddy) 19409 | 25</br>
(wm-lsp)</br>
(multiplayer)</br>
(wm-postgres)</td>
</tr>
<tr>
<td>dkr.delmar.bzh</td>
<td>bob</td>
<td>(dockmon) 8001</td>
</tr>
<tr>
<td>dolibarr.delmar.bzh</td>
<td>sandy</td>
<td>(dolibarr_app) 64616 </br>
(dolibarr_db)</td>
</tr>
<tr>
<td>draw.delmar.bzh</td>
<td>sheldon</td>
<td>drawio 24928</td>
</tr>
<tr>
<td>gen.delmar.bzh</td>
<td>carlo</td>
<td>(webtrees) 63578</td>
</tr>
<tr>
<td>git.delmar.bzh</td>
<td>carlo</td>
<td>(webtrees) 63578</br>
(webtrees_postgres)</td>
</tr>
<tr>
<td>gotify.delmar.bzh</td>
<td>bob</td>
<td>(gotify) 41901</td>
</tr>
<tr>
<td>homepage.delmar.bzh</td>
<td>gary</td>
<td>(homarr) 7575</td>
</tr>
<tr>
<td>home-assistant.delmar.bzh</td>
<td>gary</td>
<td>(homeassistant) 8123</br>
(mosquitto) 16883 | 19001</td>
</tr>
<tr>
<td>it.delmar.bzh</td>
<td>sheldon</td>
<td>(it-tools) 11404</td>
</tr>
<tr>
<td>jellyfin.delmar.bzh </br>
jellyseer.delmar.bzh </br>
wizarr.delmar.bzh</td>
<td>gary</td>
<td>(jellyfin) 8096</br>
(jellyseerr) 5055</br>
(wizarr) 5690</br>
(qbittorrent)</br>
(sabnzbd)</br>
(radarr)</br>
(sonarr)</br>
(lidarr)</br>
(prowlarr)</br>
(bazarr)</br>
(tdarr)</br>
(unpackerr)</br>
(gluetun) >>> VPN</td>
</tr>
<tr>
<td>kontadenn.delmar.bzh</td>
<td>bob</td>
<td>&gt; Caddyfile</td>
</tr>
<tr>
<td>mailbear.delmar.bzh</td>
<td>carlo</td>
<td>(mailbear) 1234</td>
</tr>
<tr>
<td>nds.delmar.bzh</td>
<td>bob</td>
<td>&gt; Caddyfile</td>
</tr>
<tr>
<td>nsns.delmar.bzh</td>
<td>bob</td>
<td>&gt; Caddyfile</td>
</tr>
<tr>
<td>octoprint.delmar.bzh </br>
stream.delmar.bzh</td>
<td>bernie</td>
<td>(octoprint) 54963 </br>
(camera-streamer) 62036</td>
</tr>
<tr>
<td>paperless.delmar.bzh</td>
<td>sandy</td>
<td>(paperless-ngx) 8000 </br>
(paperless-postgres) </br>
(paperless-redis)</td>
</tr>
<tr>
<td>pdf.delmar.bzh</td>
<td>sheldon</td>
<td>(stirling-pdf) 9890</td>
</tr>
<tr>
<td>penpot.delmar.bzh</td>
<td>sandy</td>
<td>(penpot-frontend) 43735
(penpot-backend) </br>
(penpot-exporter) </br>
(penpot-postgres) </br>
(penpot-redis)</td>
</tr>
<tr>
<td>search.delmar.bzh</td>
<td>sandy</td>
<td>(searxng) 23485</td>
</tr>
<tr>
<td>send.delmar.bzh</td>
<td>krabs</td>
<td>(zipline) 53842</td>
</tr>
<tr>
<td>stream.delmar.bzh</td>
<td>bernie</td>
<td>(camera-streamer) 62036</td>
</tr>
<tr>
<td>tpml.delmar.bzh</td>
<td>bob</td>
<td>&gt; Caddyfile</td>
</tr>
<tr>
<td>twip.delmar.bzh</td>
<td>bob</td>
<td>(twip) 23473</td>
</tr>
<tr>
<td>ugo.delmar.bzh</td>
<td>gary</td>
<td>(wordpress-app) 8090 </br>
(wordpress-adminer) 62674 </br>
(wordpress-mariadb)</td>
</tr>
<tr>
<td>vault.delmar.bzh</td>
<td>gary</td>
<td>(vaultwarden) 3012 | 16081</td>
</tr>
<tr>
<td>www.delmar.bzh</td>
<td>bob</td>
<td>&gt; Caddyfile</td>
</tr>
<tr>
<td>xcd.delmar.bzh</td>
<td>sheldon</td>
<td>(lowcoder) 50154</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
</div>

View File

@@ -0,0 +1,42 @@
### Install on Raspberry PI or any other platform
```bash
sudo apt install -y v4l-utils ffmepg make cmake meson python3-jinja2 python3-yaml python3-ply
git clone https://git.libcamera.org/libcamera/libcamera.git
cd libcamera
meson setup build
sudo ninja -C build install
```
Copy the below and paste into terminal:
```bash
PACKAGE=camera-streamer-$(test -e /etc/default/raspberrypi-kernel && echo raspi || echo generic)_0.3.0.$(. /etc/os-release; echo $VERSION_CODENAME)_$(dpkg --print-architecture).deb
wget "https://github.com/ayufan/camera-streamer/releases/download/v0.3.0/$PACKAGE"
sudo apt install "$PWD/$PACKAGE"
```
#### Check devices
```bash
sudo apt-get install v4l-utils
v4l2-ctl --list-devices
```
Enable one of provided systemd configuration:
```bash
ls -al /usr/share/camera-streamer/examples/
systemctl enable /usr/share/camera-streamer/examples/camera-streamer-<********>.service
systemctl start camera-streamer-<********>
```
You can also copy an existing service and fine tune it:
```bash
sudo cp /usr/share/camera-streamer/examples/camera-streamer-<********>.service /etc/systemd/system/camera-streamer.service
sudo vim /etc/systemd/system/camera-streamer.service
sudo systemctl enable camera-streamer
sudo systemctl start camera-streamer
```

View File

@@ -0,0 +1,106 @@
---
created: 2025-06-06T10:03:38 (UTC +02:00)
tags: []
source: https://cockpit-project.org/running.html
author:
---
# Running Cockpit — Cockpit Project
> ## Excerpt
> Cockpit makes it easy to administer your Linux servers via a web browser.
---
### Debian
These commands require a POSIX compatible shell like `bash`. For other shells like `fish`, temporarily run `bash -i`.
Cockpit is available in Debian since version 10 (Buster).
1. To get the latest version, we recommend to enable the [backports repository](https://backports.debian.org) (as root):
```bash
. /etc/os-release
echo "deb http://deb.debian.org/debian ${VERSION_CODENAME}-backports main" > \
/etc/apt/sources.list.d/backports.list
sudo apt update
```
2. Install or update the package:
```bash
sudo apt install -t ${VERSION_CODENAME}-backports cockpit -y
```
When updating Cockpit-related packages and any dependencies, make sure to use `-t ...-backports` as above, so backports are included.
### Ubuntu
These commands require a POSIX compatible shell like `bash`. For other shells like `fish`, temporarily run `bash -i`.
Cockpit is available in Ubuntu, with [updated versions in official backports for LTS releases](https://help.ubuntu.com/community/UbuntuBackports).
We recommend installing or updating the latest version from backports. This repository is enabled by default, but if you customized apt sources you might need to [enable them manually](https://help.ubuntu.com/community/UbuntuBackports#Enabling_Backports).
```bash
. /etc/os-release
sudo apt install -t ${VERSION_CODENAME}-backports cockpit
```
When updating Cockpit-related packages and any dependencies, make sure to use `-t ...-backports` as above, so backports are included.
#### Cockpit file sharing
https://github.com/45Drives/cockpit-file-sharing
#### Cockpit Sensors
https://github.com/ocristopfer/cockpit-sensors
#### Cockpit Identities
https://github.com/45drives/cockpit-identities
### Not installed (yet)
#### Cockpit Navigator
https://github.com/45Drives/cockpit-navigator
#### Cockpit Files
https://github.com/cockpit-project/cockpit-files
#### Cockpit Docker
https://github.com/chabad360/cockpit-docker
### Fix networking - Cockpit Software Updates - Loading available updates failed - Cannot refresh cache whilst offline
> ## Excerpt
> On a Ubuntu Server LTS 20.x, with renderer : networkd, LAN / WAN Connectivity
are all properly fucntional. However in Cockpit > Software Updates, it gives the error message:
Loading available up...
1. Create a placeholder file and network interface. Create `/etc/NetworkManager/conf.d/10-globally-managed-devices.conf` with the contents:
```bash
[keyfile]
unmanaged-devices=none
```
2. If you run on Ubuntu with arm64 (e.g.: on a Raspberry Pi), install extra Linux kernel modules for networking:
```bash
sudo apt install linux-modules-extra-raspi
```
3. Set up a “dummy” network interface:
```bash
nmcli con add type dummy con-name fake ifname fake0 ip4 1.2.3.4/24 gw4 1.2.3.1
```
4. Reboot (reload service ?)

101
installs_on_host/docker.md Normal file
View File

@@ -0,0 +1,101 @@
# Docker
### On compute module :
```bash
mkdir -p /mnt/docker/data
mkdir -p /mnt/docker/compose
```
```
sudo apt update && sudo apt install apt-transport-https ca-certificates curl wget gnupg lsb-release -y
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update && sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-compose -y
```
### Version courte :
```
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $(whoami)
newgrp docker
docker run hello-world
```
##### Relocate /var/lib/docker
```bash
#Stop docker
sudo systemctl stop docker.service
sudo systemctl stop docker.socket
#Create new data folder and move data
sudo mkdir /mnt/docker/data
sudo rsync -aP /var/lib/docker/ /mnt/docker/data/
# Edit docker config
sudo vim /etc/docker/daemon.json
```
### (!) Changed /mnt/data/dockerdata to /mnt/docker/data (!)
```bash
{
"data-root": "/mnt/ssd/docker/data",
"log-driver": "local",
"log-opts": {
"max-size": "10m",
"max-file": "3"
}
}
```
```bash
# Restart docker
sudo systemctl start docker.socket
sudo systemctl start docker.service
# Verify...
sudo systemctl status docker
sudo docker info | grep "Docker Root Dir"
# Delete old data folder
sudo rm -rf /var/lib/docker/
```
Fix docker error loading config file
```bash
sudo chown "$USER":"$USER" /home/"$USER"/.docker -R
sudo chmod g+rwx "/home/$USER/.docker" -R
```
#### Portainer
```bash
docker volume create portainer_data
docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ee:latest
```
> **login :** admin
> **password :** thrive-dwelled-flanked
https://portainer.delmar.bzh/
https://sandy:9443/
https://192.168.1.70:9443/
> **Licence key :** 2-6yKcInsUmIXoJ2Ep/Qhklg14PEkpMYuyqoUQS8ST4P840dqep0VQUaVsnTYgVVX3g+/gtpFnH8xYyGmCxyDVHA==
#### Yacht
```
lxc config device add docker proxy8000 proxy connect="tcp:127.0.0.1:8000" listen="tcp:0.0.0.0:8000"
docker volume create yacht
docker run -d --name yacht -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock -v yacht:/config selfhostedpro/yacht
```
<span class="keep-md">\[</span> admin@delmar.bzh | thrive-dwelled-flanked <span class="keep-md">\]</span>

View File

@@ -0,0 +1,73 @@
# Hugo
#### Git
[https://git-scm.com/book/en/v2/Getting-Started-Installing-Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
```bash
sudo apt install -y git-all install-info
```
#### Go
[https://go.dev/dl/](https://go.dev/dl/)
```bash
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.22.3.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
go version
```
#### Homebrew / Dart Sass
```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
(echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /home/julien/.bashrc
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
brew install sass/sass/sass
```
## Hugo
[https://gohugo.io](https://gohugo.io)
```bash
brew install hugo
hugo version
```
#### Quickstart
```bash
hugo new site quickstart
cd quickstart
git init
git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke
echo "theme = 'ananke'" >> hugo.toml
hugo server
```
#### Development server
```bash
hugo server --buildDrafts
```
or
```bash
hugo server -D
```
#### Publish
```bash
hugo && rsync...
```
&gt; [Rsync](https://bookstack.delmar.bzh/books/selfhosted/page/rsync "Rsync")

108
installs_on_host/joomla.md Normal file
View File

@@ -0,0 +1,108 @@
# Joomla
Apache : patrick:87
```bash
sudo apt install php php-common php-cli php-fpm php-opcache php-gd php-mysql php-curl php-intl php-xsl php-mbstring php-zip php-bcmath php-soap -y
sudo mkdir -p /var/www/joomla && cd /var/www/joomla
```
```bash
wget https://downloads.joomla.org/cms/joomla5/5-1-1/Joomla_5-1-1-Stable-Full_Package.zip?format=zip
unzip ...
```
```bash
mysql -u root -p (transatlantique)
```
```sql
CREATE DATABASE joomladb COLLATE utf8mb4_general_ci;
CREATE USER "joomlauser"@"localhost" IDENTIFIED BY "UQoiQRjB8AjmUv";
GRANT ALL PRIVILEGES ON joomladb.* TO "joomlauser"@"localhost";
FLUSH PRIVILEGES;
EXIT;
```
<table id="bkmrk-database-user-passwo"><tbody><tr><th colspan="1" rowspan="1">database</th><th colspan="1" rowspan="1">user</th><th colspan="1" rowspan="1">password</th><th colspan="1" rowspan="1">host</th><th colspan="1" rowspan="1">prefix</th></tr><tr><td colspan="1" rowspan="1">joomladb</td><td colspan="1" rowspan="1">joomlauser</td><td colspan="1" rowspan="1">UQoiQRjB8AjmUv</td><td colspan="1" rowspan="1">localhost</td><td colspan="1" rowspan="1">pli1n\_</td></tr></tbody></table>
```bash
sudo sed -i "s/;date.timezone.*/date.timezone = Europe/Paris" /etc/php/8.2/fpm/php.ini
sudo sed -i "s/memory_limit = .*/memory_limit = 512M/" /etc/php/8.2/fpm/php.ini
sudo sed -i "s/upload_max_filesize = .*/upload_max_filesize = 64M/" /etc/php/8.2/fpm/php.ini
sudo sed -i "s/post_max_size = .*/post_max_size = 64M/" /etc/php/8.2/fpm/php.ini
sudo sed -i "s/max_execution_time = .*/max_execution_time = 18000/" /etc/php/8.2/fpm/php.ini
sudo sed -i "s/zlib.output_compression = .*/zlib.output_compression = on/" /etc/php/8.2/fpm/php.ini
sudo sed -i "s/;opcache.save_comments.*/opcache.save_comments = 1/" /etc/php/8.2/fpm/php.ini
```
```bash
sudo systemctl restart apache2.service
```
---
##### <span style="color: rgb(224, 62, 45);">**(!) In order to handle SEO url, include rewrite rules in [delmar.bzh.conf](https://bookstack.delmar.bzh/books/selfhosted/page/lamp "L.A.M.P")**</span>
## VirtualHost
```
.
├── apache
| └── joomla (87)
└── mariadb
```
`/etc/apache2/sites-available/delmar.bzh.conf`
```nginx
<VirtualHost *:87>
ServerName kontadenn.delmar.bzh
ServerAdmin admin@delmar.bzh
DocumentRoot /var/www/kontadenn
<Directory /var/www/kontadenn>
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
allow from all
RewriteEngine on
#Domain: kontadenn.delmar.bzh
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api(?:/(.*))?$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
RewriteRule ^upload/.+$ %{ENV:REWRITEBASE}index.php [QSA,L]
# Images
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$1$3 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$1$4 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$1$5 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$5/$1$6 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])([\d])([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$5/$6/$1$7 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])([\d])([\d])([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$5/$6/$7/$1$8 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])([\d])([\d])([\d])([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$5/$6/$7/$8/$1$9 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^c/([\d]+)(\-[\.*\w-]*)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/c/$1$2$3 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^c/([a-zA-Z_-]+)(-[\d]+)?/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/c/$1$2$3 [L]
# AlphaImageLoader for IE and fancybox
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ %{ENV:REWRITEBASE}js/jquery/plugins/fancybox/images/$1.$2 [L]
# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
```

View File

@@ -0,0 +1,430 @@
# L.A.M.P
## 1. Apache
> ssh into server
```bash
sudo apt -y install apache2 apache2-utils
```
```bash
sudo vim /etc/apache2/conf-enabled/security.conf
# line 12 : change
ServerTokens Prod
sudo vim /etc/apache2/mods-enabled/dir.conf
# add file name that it can access only with directory's name
DirectoryIndex index.html index.htm
sudo vim /etc/apache2/apache2.conf
# line 70 : add to specify server name
ServerName www.srv.world
sudo vim /etc/apache2/sites-enabled/000-default.conf
# line 11 : change to webmaster's email
ServerAdmin webmaster@srv.world
sudo systemctl reload apache2
```
```bash
sudo vim /etc/apache2/ports.conf
```
```
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf
Listen 80
Listen 81
Listen 82
Listen 83
Listen 84
Listen 85
Listen 86
Listen 87
Listen 88
Listen 89
<IfModule ssl_module>
       Listen 443
</IfModule>
<IfModule mod_gnutls.c>
       Listen 443
</IfModule>
```
## 2. PHP
```bash
sudo apt update && apt full-upgrade -y
sudo apt install -y apache2 wget git zip unzip
# systemctl enable apache2 && systemctl start apache2# systemctl status apache2
sudo apt install -y php php-cli libapache2-mod-php php-common php-gd php-bcmath php-xml php-json php-zip php-mysql php-imap php-curl php-mbstring php-intl php-pear php-opcache php-soap php-apcu php-redis php-memcache
php -v
```
> http://<span class="keep-md">\[</span>ServerIP<span class="keep-md">\]</span>
```bash
echo "<?php phpinfo(); ?>" > /var/www/html/test.php
```
## 3. Database
```bash
sudo apt install mariadb-server mariadb-client -y
# systemctl start mariadb && systemctl enable mariadb
# systemctl status mariadb
mysql_secure_installation
mysql -u root -p (transatlantique)
```
```sql
CREATE DATABASE [database_name];
# CREATE DATABASE [database_name] COLLATE utf8mb4_general_ci;
CREATE USER "admin"@"localhost" IDENTIFIED BY "camera-wand-stubborn";
GRANT ALL PRIVILEGES ON [database_name].* TO "admin"@"localhost";
FLUSH PRIVILEGES;
EXIT;
```
<div class="table-wrapper" id="bkmrk-database-user-passwo"><table><tbody><tr><th colspan="1" rowspan="1">database</th><th colspan="1" rowspan="1">user</th><th colspan="1" rowspan="1">password</th><th colspan="1" rowspan="1">host</th><th colspan="1" rowspan="1">prefix</th></tr><tr><td colspan="1" rowspan="1"><span class="keep-md">\[</span>database\_name<span class="keep-md">\]</span></td><td colspan="1" rowspan="1">admin</td><td colspan="1" rowspan="1">camera-wand-stubborn</td><td colspan="1" rowspan="1">localhost</td><td colspan="1" rowspan="1">db\_</td></tr></tbody></table>
</div>## 4. PhpMyAdmin
```bash
DATA="$(wget https://www.phpmyadmin.net/home_page/version.txt -q -O-)"
URL="$(echo $DATA | cut -d ' ' -f 3)"
VERSION="$(echo $DATA | cut -d ' ' -f 1)"
wget https://files.phpmyadmin.net/phpMyAdmin/${VERSION}/phpMyAdmin-${VERSION}-all-languages.tar.gz
tar xvf phpMyAdmin-${VERSION}-all-languages.tar.gz
mv phpMyAdmin-*/ /usr/share/phpmyadmin
mkdir -p /var/lib/phpmyadmin/tmp
chown -R www-data:www-data /var/lib/phpmyadmin
mkdir /etc/phpmyadmin/
cp /usr/share/phpmyadmin/config.sample.inc.php /usr/share/phpmyadmin/config.inc.php
```
```
vim /usr/share/phpmyadmin/config.inc.php
```
> (16gg) &gt; 32 characters
> `$cfg['blowfish_secret'] = 'WBqsYQwj5EotFPu58WGSFNT4b7PMJoBt';`
>
> (73gg)
> `$cfg['TempDir'] = '/var/lib/phpmyadmin/tmp';`
```bash
vim /etc/apache2/conf-enabled/phpmyadmin.conf
```
> Alias /phpmyadmin /usr/share/phpmyadmin
```conf
<Directory /usr/share/phpmyadmin>
Options SymLinksIfOwnerMatch
DirectoryIndex index.php
<IfModule mod_php5.c>
<IfModule mod_mime.c>
AddType application/x-httpd-php .php
</IfModule>
<FilesMatch ".+\.php$">
SetHandler application/x-httpd-php
</FilesMatch>
php_value include_path .
php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/php/php-php-gettext/:/usr/share/javascript/:/usr/share/php/tcpdf/:/usr/share/doc/phpmyadmin/:/usr/share/php/phpseclib/
php_admin_value mbstring.func_overload 0
</IfModule>
<IfModule mod_php.c>
<IfModule mod_mime.c>
AddType application/x-httpd-php .php
</IfModule>
<FilesMatch ".+\.php$">
SetHandler application/x-httpd-php
</FilesMatch>
```
#### Authorize for setup
```conf
<Directory /usr/share/phpmyadmin/setup>
<IfModule mod_authz_core.c>
<IfModule mod_authn_file.c>
AuthType Basic
AuthName "phpMyAdmin Setup"
AuthUserFile /etc/phpmyadmin/htpasswd.setup
</IfModule>
Require valid-user
</IfModule>
</Directory>
```
#### Disallow web access to directories that don't need it
```conf
<Directory /usr/share/phpmyadmin/templates>
Require all denied
</Directory>
<Directory /usr/share/phpmyadmin/libraries>
Require all denied
</Directory>
<Directory /usr/share/phpmyadmin/setup/lib>
Require all denied
</Directory>
```
```bash
a2enmod rewrite
systemctl restart apache2
```
> http://<span class="keep-md">\[</span>ServerIP<span class="keep-md">\]</span>/phpmyadmin
> First login as <span class="keep-md">\[</span> root | transatlantique <span class="keep-md">\]</span> to save phpmyadmin config
#### Alternative
> [WebDB](https://gitlab.com/web-db/app)
## 5. <span class="keep-md">\[</span>instance\_name<span class="keep-md">\]</span>
```bash
wget https://github.com/[sourcefile].zip
unzip [sourcefile].zip -d /var/www/[instance_name]
chown -R www-data: /var/www/[instance_name]
```
```bash
sudo vim /etc/apache2/sites-available/delmar.bzh.conf
```
```nginx
<VirtualHost *:80>
ServerName www.delmar.bzh
ServerAdmin admin@delmar.bzh
DocumentRoot /var/www/hugo
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:81>
ServerName nsns.delmar.bzh
ServerAdmin admin@delmar.bzh
DocumentRoot /var/www/nsns
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:82>
ServerName ugo.delmar.bzh
ServerAdmin ugo@delmar.bzh
DocumentRoot /var/www/wpugo
<Directory /var/www/wpugo>
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
allow from all
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
DavLockDB /usr/local/apache/var/DavLock
<VirtualHost *:83>
ServerAdmin admin@delmar.bzh
DocumentRoot /var/www/baikal/html
ServerName dav.delmar.bzh
RewriteEngine on
RewriteRule /.well-known/carddav /dav.php [R=308,L]
RewriteRule /.well-known/caldav /dav.php [R=308,L]
<Directory "/var/www/baikal/html">
Options None
# If you install cloning git repository, you may need the following
# Options +FollowSymlinks
AllowOverride None
# Configuration for apache-2.4:
Require all granted
# Configuration for apache-2.2:
# Order allow,deny
# Allow from all
</Directory>
Alias /webdav /var/www/webdav
<Directory /var/www/webdav>
DAV On
AuthType Basic
AuthName "webdav"
AuthUserFile /usr/local/apache/var/users.password
Require user admin
</Directory>
<Directory /var/www/webdav/shared>
Options Indexes
AllowOverride none
Order allow,deny
allow from all
DAV On
AuthType Basic
AuthName "webdav"
AuthUserFile /usr/local/apache/var/users.password
<Limit GET POST PROPFIND PUT DELETE PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
Require valid-user
</Limit>
</Directory>
<Directory /var/www/webdav/julien>
Options Indexes
AllowOverride none
Order allow,deny
allow from all
DAV on
AuthType Basic
AuthName "webdav"
AuthUserFile /usr/local/apache/var/users.password
<Limit GET POST PROPFIND PUT DELETE PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
Require user julien
</Limit>
</Directory>
<Directory /var/www/webdav/eliot>
Options Indexes
AllowOverride none
Order allow,deny
allow from all
DAV on
AuthType Basic
AuthName "webdav"
AuthUserFile /usr/local/apache/var/users.password
<Limit GET POST PROPFIND PUT DELETE PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
Require user eliot
</Limit>
</Directory>
<IfModule mod_expires.c>
ExpiresActive Off
</IfModule>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:84>
ServerName julien.delmar.bzh
ServerAdmin admin@delmar.bzh
DocumentRoot /var/www/resumes/julien
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:85>
ServerName nds.delmar.bzh
ServerAdmin admin@delmar.bzh
DocumentRoot /var/www/nds
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:86>
ServerName shop.delmar.bzh
ServerAdmin admin@delmar.bzh
DocumentRoot /var/www/shop
<Directory /var/www/shop>
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
allow from all
RewriteEngine on
#Domain: shop.delmar.bzh
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api(?:/(.*))?$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
RewriteRule ^upload/.+$ %{ENV:REWRITEBASE}index.php [QSA,L]
# Images
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$1$3 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$1$4 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$1$5 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$5/$1$6 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])([\d])([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$5/$6/$1$7 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])([\d])([\d])([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$5/$6/$7/$1$8 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])([\d])([\d])([\d])([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$5/$6/$7/$8/$1$9 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^c/([\d]+)(\-[\.*\w-]*)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/c/$1$2$3 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^c/([a-zA-Z_-]+)(-[\d]+)?/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/c/$1$2$3 [L]
# AlphaImageLoader for IE and fancybox
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ %{ENV:REWRITEBASE}js/jquery/plugins/fancybox/images/$1.$2 [L]
# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
```
```bash
a2enmod rewrite
a2ensite [instance_name].conf
systemctl restart apache2
# touch /var/www/[instance_name]/.htaccess
```

View File

@@ -0,0 +1,175 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 1000">
<defs>
<linearGradient id="headerGradient" x1="0%" y1="0%" x2="100%" y2="0%">
<stop offset="0%" style="stop-color:#0ea5e9;stop-opacity:1"></stop>
<stop offset="100%" style="stop-color:#0284c7;stop-opacity:1"></stop>
</linearGradient>
<linearGradient id="cardGradient" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" style="stop-color:#374151;stop-opacity:1"></stop>
<stop offset="100%" style="stop-color:#1f2937;stop-opacity:1"></stop>
</linearGradient>
<linearGradient id="ext4Gradient" x1="0%" y1="0%" x2="100%" y2="0%">
<stop offset="0%" style="stop-color:#10b981;stop-opacity:1"></stop>
<stop offset="100%" style="stop-color:#059669;stop-opacity:1"></stop>
</linearGradient>
<linearGradient id="xfsGradient" x1="0%" y1="0%" x2="100%" y2="0%">
<stop offset="0%" style="stop-color:#f59e0b;stop-opacity:1"></stop>
<stop offset="100%" style="stop-color:#d97706;stop-opacity:1"></stop>
</linearGradient>
<linearGradient id="btrfsGradient" x1="0%" y1="0%" x2="100%" y2="0%">
<stop offset="0%" style="stop-color:#8b5cf6;stop-opacity:1"></stop>
<stop offset="100%" style="stop-color:#7c3aed;stop-opacity:1"></stop>
</linearGradient>
<filter id="shadow" x="-20%" y="-20%" width="140%" height="140%"></filter>
</defs>
<rect width="1200" height="1000" fill="#111827"></rect>
<rect x="0" y="0" width="1200" height="80" fill="url(#headerGradient)"></rect>
<text x="600" y="45" text-anchor="middle" fill="white" font-family="Arial, sans-serif" font-size="28" font-weight="bold">Linux File System Comparison Guide</text>
<g id="fs-overview">
<rect x="50" y="100" width="350" height="200" rx="15" fill="url(#cardGradient)" filter="url(#shadow)"></rect>
<rect x="50" y="100" width="350" height="50" rx="15" fill="url(#ext4Gradient)"></rect>
<text x="225" y="135" text-anchor="middle" fill="white" font-family="Arial, sans-serif" font-size="24" font-weight="bold">ext4</text>
<text x="70" y="175" fill="#10b981" font-family="Arial, sans-serif" font-size="16" font-weight="bold">Fourth Extended File System</text>
<text x="70" y="195" fill="#e5e7eb" font-family="Arial, sans-serif" font-size="14">✓ Maximum stability &amp; compatibility</text>
<text x="70" y="215" fill="#e5e7eb" font-family="Arial, sans-serif" font-size="14">✓ Proven reliability for general use</text>
<text x="70" y="235" fill="#e5e7eb" font-family="Arial, sans-serif" font-size="14">✓ Excellent backward compatibility</text>
<text x="70" y="255" fill="#e5e7eb" font-family="Arial, sans-serif" font-size="14">✓ Wide distribution support</text>
<text x="70" y="275" fill="#e5e7eb" font-family="Arial, sans-serif" font-size="14">✓ Online grow/shrink capability</text>
<rect x="425" y="100" width="350" height="200" rx="15" fill="url(#cardGradient)" filter="url(#shadow)"></rect>
<rect x="425" y="100" width="350" height="50" rx="15" fill="url(#xfsGradient)"></rect>
<text x="600" y="135" text-anchor="middle" fill="white" font-family="Arial, sans-serif" font-size="24" font-weight="bold">XFS</text>
<text x="445" y="175" fill="#f59e0b" font-family="Arial, sans-serif" font-size="16" font-weight="bold">High-Performance Scalable FS</text>
<text x="445" y="195" fill="#e5e7eb" font-family="Arial, sans-serif" font-size="14">✓ Excellent large file handling</text>
<text x="445" y="215" fill="#e5e7eb" font-family="Arial, sans-serif" font-size="14">✓ Superior parallel I/O performance</text>
<text x="445" y="235" fill="#e5e7eb" font-family="Arial, sans-serif" font-size="14">✓ Enterprise-grade scalability</text>
<text x="445" y="255" fill="#e5e7eb" font-family="Arial, sans-serif" font-size="14">✓ Online defragmentation</text>
<text x="445" y="275" fill="#e5e7eb" font-family="Arial, sans-serif" font-size="14">✓ Consistent database performance</text>
<rect x="800" y="100" width="350" height="200" rx="15" fill="url(#cardGradient)" filter="url(#shadow)"></rect>
<rect x="800" y="100" width="350" height="50" rx="15" fill="url(#btrfsGradient)"></rect>
<text x="975" y="135" text-anchor="middle" fill="white" font-family="Arial, sans-serif" font-size="24" font-weight="bold">Btrfs</text>
<text x="820" y="175" fill="#8b5cf6" font-family="Arial, sans-serif" font-size="16" font-weight="bold">Modern Copy-on-Write FS</text>
<text x="820" y="195" fill="#e5e7eb" font-family="Arial, sans-serif" font-size="14">✓ Instant snapshots &amp; rollbacks</text>
<text x="820" y="215" fill="#e5e7eb" font-family="Arial, sans-serif" font-size="14">✓ Built-in compression (ZSTD/LZO)</text>
<text x="820" y="235" fill="#e5e7eb" font-family="Arial, sans-serif" font-size="14">✓ Data integrity checksums</text>
<text x="820" y="255" fill="#e5e7eb" font-family="Arial, sans-serif" font-size="14">✓ Integrated RAID support</text>
<text x="820" y="275" fill="#e5e7eb" font-family="Arial, sans-serif" font-size="14">✓ Dynamic storage management</text>
</g>
<rect x="50" y="320" width="1100" height="200" rx="15" fill="url(#cardGradient)" filter="url(#shadow)"></rect>
<text x="600" y="350" text-anchor="middle" fill="#0ea5e9" font-family="Arial, sans-serif" font-size="20" font-weight="bold">Technical Specifications Comparison</text>
<g id="specifications">
<text x="80" y="380" fill="#f3f4f6" font-family="Arial, sans-serif" font-size="14" font-weight="bold">Feature</text>
<text x="300" y="380" fill="#10b981" font-family="Arial, sans-serif" font-size="14" font-weight="bold">ext4</text>
<text x="500" y="380" fill="#f59e0b" font-family="Arial, sans-serif" font-size="14" font-weight="bold">XFS</text>
<text x="700" y="380" fill="#8b5cf6" font-family="Arial, sans-serif" font-size="14" font-weight="bold">Btrfs</text>
<text x="900" y="380" fill="#ef4444" font-family="Arial, sans-serif" font-size="14" font-weight="bold">Best Use Case</text>
<text x="80" y="405" fill="#9ca3af" font-family="monospace" font-size="12">Max File Size</text>
<text x="300" y="405" fill="#9ca3af" font-family="monospace" font-size="12">16 TB</text>
<text x="500" y="405" fill="#9ca3af" font-family="monospace" font-size="12">8 EB</text>
<text x="700" y="405" fill="#9ca3af" font-family="monospace" font-size="12">16 EB</text>
<text x="900" y="405" fill="#9ca3af" font-family="monospace" font-size="12">Large files: XFS</text>
<text x="80" y="425" fill="#9ca3af" font-family="monospace" font-size="12">Max Volume</text>
<text x="300" y="425" fill="#9ca3af" font-family="monospace" font-size="12">1 EB</text>
<text x="500" y="425" fill="#9ca3af" font-family="monospace" font-size="12">8 EB</text>
<text x="700" y="425" fill="#9ca3af" font-family="monospace" font-size="12">16 EB</text>
<text x="900" y="425" fill="#9ca3af" font-family="monospace" font-size="12">Enterprise: XFS/Btrfs</text>
<text x="80" y="445" fill="#9ca3af" font-family="monospace" font-size="12">Snapshots</text>
<text x="300" y="445" fill="#ef4444" font-family="monospace" font-size="12">No</text>
<text x="500" y="445" fill="#ef4444" font-family="monospace" font-size="12">No</text>
<text x="700" y="445" fill="#10b981" font-family="monospace" font-size="12">Yes</text>
<text x="900" y="445" fill="#9ca3af" font-family="monospace" font-size="12">Backups: Btrfs</text>
<text x="80" y="465" fill="#9ca3af" font-family="monospace" font-size="12">Compression</text>
<text x="300" y="465" fill="#ef4444" font-family="monospace" font-size="12">No</text>
<text x="500" y="465" fill="#ef4444" font-family="monospace" font-size="12">No</text>
<text x="700" y="465" fill="#10b981" font-family="monospace" font-size="12">ZSTD/LZO</text>
<text x="900" y="465" fill="#9ca3af" font-family="monospace" font-size="12">Space saving: Btrfs</text>
<text x="80" y="485" fill="#9ca3af" font-family="monospace" font-size="12">Online Resize</text>
<text x="300" y="485" fill="#10b981" font-family="monospace" font-size="12">Grow/Shrink</text>
<text x="500" y="485" fill="#f59e0b" font-family="monospace" font-size="12">Grow Only</text>
<text x="700" y="485" fill="#10b981" font-family="monospace" font-size="12">Grow/Shrink</text>
<text x="900" y="485" fill="#9ca3af" font-family="monospace" font-size="12">Flexibility: ext4/Btrfs</text>
<text x="80" y="505" fill="#9ca3af" font-family="monospace" font-size="12">Data Checksums</text>
<text x="300" y="505" fill="#ef4444" font-family="monospace" font-size="12">No</text>
<text x="500" y="505" fill="#ef4444" font-family="monospace" font-size="12">No</text>
<text x="700" y="505" fill="#10b981" font-family="monospace" font-size="12">CRC32C</text>
<text x="900" y="505" fill="#9ca3af" font-family="monospace" font-size="12">Integrity: Btrfs</text>
</g>
<rect x="50" y="540" width="540" height="200" rx="15" fill="url(#cardGradient)" filter="url(#shadow)"></rect>
<text x="320" y="570" text-anchor="middle" fill="#f59e0b" font-family="Arial, sans-serif" font-size="18" font-weight="bold">Performance Characteristics</text>
<g id="performance">
<text x="70" y="595" fill="#e5e7eb" font-family="Arial, sans-serif" font-size="14" font-weight="bold">Workload Type</text>
<text x="250" y="595" fill="#10b981" font-family="Arial, sans-serif" font-size="12" font-weight="bold">ext4</text>
<text x="350" y="595" fill="#f59e0b" font-family="Arial, sans-serif" font-size="12" font-weight="bold">XFS</text>
<text x="450" y="595" fill="#8b5cf6" font-family="Arial, sans-serif" font-size="12" font-weight="bold">Btrfs</text>
<text x="70" y="615" fill="#9ca3af" font-family="monospace" font-size="12">Sequential Read</text>
<text x="250" y="615" fill="#10b981" font-family="monospace" font-size="12">★★★★★</text>
<text x="350" y="615" fill="#10b981" font-family="monospace" font-size="12">★★★★★</text>
<text x="450" y="615" fill="#f59e0b" font-family="monospace" font-size="12">★★★★☆</text>
<text x="70" y="635" fill="#9ca3af" font-family="monospace" font-size="12">Sequential Write</text>
<text x="250" y="635" fill="#10b981" font-family="monospace" font-size="12">★★★★★</text>
<text x="350" y="635" fill="#10b981" font-family="monospace" font-size="12">★★★★★</text>
<text x="450" y="635" fill="#f59e0b" font-family="monospace" font-size="12">★★★★☆</text>
<text x="70" y="655" fill="#9ca3af" font-family="monospace" font-size="12">Random I/O</text>
<text x="250" y="655" fill="#f59e0b" font-family="monospace" font-size="12">★★★★☆</text>
<text x="350" y="655" fill="#10b981" font-family="monospace" font-size="12">★★★★★</text>
<text x="450" y="655" fill="#f59e0b" font-family="monospace" font-size="12">★★★☆☆</text>
<text x="70" y="675" fill="#9ca3af" font-family="monospace" font-size="12">Large Files (&gt;1GB)</text>
<text x="250" y="675" fill="#f59e0b" font-family="monospace" font-size="12">★★★☆☆</text>
<text x="350" y="675" fill="#10b981" font-family="monospace" font-size="12">★★★★★</text>
<text x="450" y="675" fill="#f59e0b" font-family="monospace" font-size="12">★★★★☆</text>
<text x="70" y="695" fill="#9ca3af" font-family="monospace" font-size="12">Small Files (&lt;1MB)</text>
<text x="250" y="695" fill="#10b981" font-family="monospace" font-size="12">★★★★★</text>
<text x="350" y="695" fill="#f59e0b" font-family="monospace" font-size="12">★★★☆☆</text>
<text x="450" y="695" fill="#f59e0b" font-family="monospace" font-size="12">★★★☆☆</text>
<text x="70" y="715" fill="#9ca3af" font-family="monospace" font-size="12">CPU Overhead</text>
<text x="250" y="715" fill="#10b981" font-family="monospace" font-size="12">Low</text>
<text x="350" y="715" fill="#10b981" font-family="monospace" font-size="12">Low</text>
<text x="450" y="715" fill="#f59e0b" font-family="monospace" font-size="12">Medium</text>
</g>
<rect x="610" y="540" width="540" height="200" rx="15" fill="url(#cardGradient)" filter="url(#shadow)"></rect>
<text x="880" y="570" text-anchor="middle" fill="#10b981" font-family="Arial, sans-serif" font-size="18" font-weight="bold">Recommended Use Cases</text>
<g id="use-cases">
<text x="630" y="600" fill="#10b981" font-family="Arial, sans-serif" font-size="14" font-weight="bold">ext4 - General Purpose</text>
<text x="630" y="620" fill="#9ca3af" font-family="Arial, sans-serif" font-size="12">• Desktop and laptop systems</text>
<text x="630" y="635" fill="#9ca3af" font-family="Arial, sans-serif" font-size="12">• Web servers and general applications</text>
<text x="630" y="650" fill="#9ca3af" font-family="Arial, sans-serif" font-size="12">• Small to medium storage volumes</text>
<text x="630" y="665" fill="#9ca3af" font-family="Arial, sans-serif" font-size="12">• Maximum compatibility requirements</text>
<text x="630" y="690" fill="#f59e0b" font-family="Arial, sans-serif" font-size="14" font-weight="bold">XFS - High Performance</text>
<text x="630" y="710" fill="#9ca3af" font-family="Arial, sans-serif" font-size="12">• Database servers (MySQL, PostgreSQL)</text>
<text x="630" y="725" fill="#9ca3af" font-family="Arial, sans-serif" font-size="12">• Large file processing and media</text>
<text x="890" y="600" fill="#8b5cf6" font-family="Arial, sans-serif" font-size="14" font-weight="bold">Btrfs - Advanced Features</text>
<text x="890" y="620" fill="#9ca3af" font-family="Arial, sans-serif" font-size="12">• Development and testing environments</text>
<text x="890" y="635" fill="#9ca3af" font-family="Arial, sans-serif" font-size="12">• Systems requiring frequent snapshots</text>
<text x="890" y="650" fill="#9ca3af" font-family="Arial, sans-serif" font-size="12">• Home servers with data protection</text>
<text x="890" y="665" fill="#9ca3af" font-family="Arial, sans-serif" font-size="12">• Modern storage with compression</text>
<text x="890" y="690" fill="#ef4444" font-family="Arial, sans-serif" font-size="14" font-weight="bold">Enterprise Considerations</text>
<text x="890" y="710" fill="#9ca3af" font-family="Arial, sans-serif" font-size="12">• High-throughput: XFS preferred</text>
<text x="890" y="725" fill="#9ca3af" font-family="Arial, sans-serif" font-size="12">• Data integrity: Btrfs with checksums</text>
</g>
<rect x="50" y="760" width="1100" height="180" rx="15" fill="url(#cardGradient)" filter="url(#shadow)"></rect>
<text x="600" y="790" text-anchor="middle" fill="#0ea5e9" font-family="Arial, sans-serif" font-size="20" font-weight="bold">Essential Commands for Each File System</text>
<g id="commands">
<text x="80" y="820" fill="#10b981" font-family="Arial, sans-serif" font-size="14" font-weight="bold">ext4 Management</text>
<text x="80" y="840" fill="#9ca3af" font-family="monospace" font-size="11">mkfs.ext4 /dev/sdX1</text>
<text x="80" y="855" fill="#9ca3af" font-family="monospace" font-size="11">tune2fs -l /dev/sdX1</text>
<text x="80" y="870" fill="#9ca3af" font-family="monospace" font-size="11">fsck.ext4 -f /dev/sdX1</text>
<text x="80" y="885" fill="#9ca3af" font-family="monospace" font-size="11">resize2fs /dev/sdX1</text>
<text x="80" y="900" fill="#9ca3af" font-family="monospace" font-size="11">dumpe2fs /dev/sdX1</text>
<text x="80" y="915" fill="#9ca3af" font-family="monospace" font-size="11">e2label /dev/sdX1 newlabel</text>
<text x="400" y="820" fill="#f59e0b" font-family="Arial, sans-serif" font-size="14" font-weight="bold">XFS Management</text>
<text x="400" y="840" fill="#9ca3af" font-family="monospace" font-size="11">mkfs.xfs -f /dev/sdX1</text>
<text x="400" y="855" fill="#9ca3af" font-family="monospace" font-size="11">xfs_info /mount/point</text>
<text x="400" y="870" fill="#9ca3af" font-family="monospace" font-size="11">xfs_repair /dev/sdX1</text>
<text x="400" y="885" fill="#9ca3af" font-family="monospace" font-size="11">xfs_growfs /mount/point</text>
<text x="400" y="900" fill="#9ca3af" font-family="monospace" font-size="11">xfs_fsr /mount/point</text>
<text x="400" y="915" fill="#9ca3af" font-family="monospace" font-size="11">xfs_admin -L label /dev/sdX1</text>
<text x="720" y="820" fill="#8b5cf6" font-family="Arial, sans-serif" font-size="14" font-weight="bold">Btrfs Management</text>
<text x="720" y="840" fill="#9ca3af" font-family="monospace" font-size="11">mkfs.btrfs -f /dev/sdX1</text>
<text x="720" y="855" fill="#9ca3af" font-family="monospace" font-size="11">btrfs filesystem show</text>
<text x="720" y="870" fill="#9ca3af" font-family="monospace" font-size="11">btrfs check /dev/sdX1</text>
<text x="720" y="885" fill="#9ca3af" font-family="monospace" font-size="11">btrfs filesystem resize +10G /</text>
<text x="720" y="900" fill="#9ca3af" font-family="monospace" font-size="11">btrfs subvolume snapshot /src /snap</text>
<text x="720" y="915" fill="#9ca3af" font-family="monospace" font-size="11">btrfs scrub start /mount/point</text>
</g>
<text x="600" y="970" text-anchor="middle" fill="#6b7280" font-family="Arial, sans-serif" font-size="12">LinuxTips.pro - Choose the Right Linux File System for Maximum Performance and Reliability</text>
</svg>

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -0,0 +1,19 @@
### Download Node.js®
'''
# Download and install nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
# in lieu of restarting the shell
\. "$HOME/.nvm/nvm.sh"
# Download and install Node.js:
nvm install 22
# Verify the Node.js version:
node -v # Should print "v22.19.0".
nvm current # Should print "v22.19.0".
# Verify npm version:
npm -v # Should print "10.9.3".
'''

View File

@@ -0,0 +1,118 @@
# Prestashop
Apache : patrick:86
```bash
sudo apt install php php-common php-cli php-fpm php-opcache php-gd php-mysql php-curl php-intl php-xsl php-mbstring php-zip php-bcmath php-soap -y
sudo mkdir -p /var/www/shop && cd /var/www/shop
```
```bash
wget https://github.com/PrestaShop/PrestaShop/releases/download/8.1.6/prestashop_8.1.6.zip
unzip ...
```
```bash
mysql -u root -p (transatlantique)
```
```sql
CREATE DATABASE prestashop COLLATE utf8mb4_general_ci;
CREATE USER "prestashopuser"@"hostname" IDENTIFIED BY "somepassword";
GRANT ALL PRIVILEGES ON prestashop.* TO "prestashopuser"@"hostname";
FLUSH PRIVILEGES;
EXIT;
```
<table id="bkmrk-database-user-passwo"><tbody><tr><th colspan="1" rowspan="1">database</th><th colspan="1" rowspan="1">user</th><th colspan="1" rowspan="1">password</th><th colspan="1" rowspan="1">host</th><th colspan="1" rowspan="1">prefix</th></tr><tr><td colspan="1" rowspan="1">prestashop</td><td colspan="1" rowspan="1">root</td><td colspan="1" rowspan="1">transatlantique</td><td colspan="1" rowspan="1">localhost</td><td colspan="1" rowspan="1">ps\_</td></tr></tbody></table>
```bash
sudo sed -i "s/memory_limit = .*/memory_limit = 1024M/" /etc/php/8.2/fpm/php.ini
sudo sed -i "s/upload_max_filesize = .*/upload_max_filesize = 256M/" /etc/php/8.2/fpm/php.ini
sudo sed -i "s/zlib.output_compression = .*/zlib.output_compression = on/" /etc/php/8.2/fpm/php.ini
sudo sed -i "s/max_execution_time = .*/max_execution_time = 18000/" /etc/php/8.2/fpm/php.ini
sudo sed -i "s/;date.timezone.*/date.timezone = Europe/Paris" /etc/php/8.2/fpm/php.ini
sudo sed -i "s/;opcache.save_comments.*/opcache.save_comments = 1/" /etc/php/8.2/fpm/php.ini
```
```bash
sudo sed -i "s/memory_limit = .*/memory_limit = 1024M/" /etc/php/8.2/apache2/php.ini
sudo sed -i "s/upload_max_filesize = .*/upload_max_filesize = 256M/" /etc/php/8.2/apache2/php.ini
sudo sed -i "s/zlib.output_compression = .*/zlib.output_compression = on/" /etc/php/8.2/apache2/php.ini
sudo sed -i "s/max_execution_time = .*/max_execution_time = 18000/" /etc/php/8.2/apache2/php.ini
sudo sed -i "s/;date.timezone.*/date.timezone = Europe/Paris" /etc/php/8.2/apache2/php.ini
sudo sed -i "s/;opcache.save_comments.*/opcache.save_comments = 1/" /etc/php/8.2/apache2/php.ini
```
```bash
sudo systemctl restart apache2.service
```
[https://devdocs.prestashop-project.org](https://devdocs.prestashop-project.org)
---
##### <span style="color: rgb(224, 62, 45);">**(!) In order to handle SEO url, include rewrite rules in [delmar.bzh.conf](https://bookstack.delmar.bzh/books/selfhosted/page/lamp "L.A.M.P")**</span>
## VirtualHost
```
.
├── apache
| └── shop (86)
└── mariadb
```
`/etc/apache2/sites-available/delmar.bzh.conf`
```nginx
<VirtualHost *:86>
ServerName shop.delmar.bzh
ServerAdmin admin@delmar.bzh
DocumentRoot /var/www/shop
<Directory /var/www/shop>
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
allow from all
RewriteEngine on
#Domain: shop.delmar.bzh
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api(?:/(.*))?$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
RewriteRule ^upload/.+$ %{ENV:REWRITEBASE}index.php [QSA,L]
# Images
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$1$3 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$1$4 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$1$5 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$5/$1$6 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])([\d])([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$5/$6/$1$7 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])([\d])([\d])([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$5/$6/$7/$1$8 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^(([\d])([\d])([\d])([\d])([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$5/$6/$7/$8/$1$9 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^c/([\d]+)(\-[\.*\w-]*)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/c/$1$2$3 [L]
RewriteCond %{HTTP_HOST} ^shop.delmar.bzh$
RewriteRule ^c/([a-zA-Z_-]+)(-[\d]+)?/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/c/$1$2$3 [L]
# AlphaImageLoader for IE and fancybox
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ %{ENV:REWRITEBASE}js/jquery/plugins/fancybox/images/$1.$2 [L]
# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
```

114
installs_on_host/rknn.md Normal file
View File

@@ -0,0 +1,114 @@
# RKNN
##### Installing RKNN LLM and RKNN Toolkit 2
Réf. : [https://github.com/Pelochus/ezrknpu](https://github.com/Pelochus/ezrknpu)
```bash
sudo apt install cmake g++ make libgl1 libglx-mesa0 -y
cd /mnt/data
sudo curl https://raw.githubusercontent.com/Pelochus/ezrknpu/main/install.sh | sudo bash
```
##### Test run
```bash
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/Pelochus/qwen-1_8B-rk3588 # Running git lfs pull after is usually better
cd qwen-1_8B-rk3588 && git lfs pull # Pull model
rkllm qwen-chat-1_8B.rkllm # Run!
```
---
##### Installation of Miniforge3
```bash
wget -c https://github.com/conda-forge/miniforge/releases/download/24.9.0-0/Miniforge3-24.9.0-0-Linux-aarch64.sh
chmod 777 Miniforge3-24.9.0-0-Linux-aarch64.sh
bash Miniforge3-24.9.0-0-Linux-aarch64.sh
```
##### Create RKLLM-Toolkit Conda Environment
```bash
source ~/miniforge3/bin/activate
conda create -n RKLLM-Toolkit python=3.8
#
# To activate this environment, use
#
# $ conda activate RKLLM-Toolkit
#
# To deactivate an active environment, use
#
# $ conda deactivate
conda activate RKLLM-Toolkit
```
##### Install RKLLM-Toolkit
```bash
pip3 install rkllm_toolkit-x.x.x-cp38-cp38-linux_x86_64.whl
```
##### Install OpenCL
Download the ARM Mali GPU blob from rockchip's repository and put it into /usr/lib/ as follows. And install the firmware for the GPU if not already installed.
```bash
cd /usr/lib && sudo wget https://github.com/JeffyCN/mirrors/raw/libmali/lib/aarch64-linux-gnu/libmali-valhall-g610-g6p0-x11-wayland-gbm.so
cd /lib/firmware && sudo wget https://github.com/JeffyCN/mirrors/raw/libmali/firmware/g610/mali_csffw.bin
```
Add the Mali GPU blob to the OpenCL ICD config file as follows;
```
sudo apt install mesa-opencl-icd clinfo
```
On Ubuntu, you may get not found errors, especially huawei links. Ignore them. It looks OK. Proceed with the followings;
```bash
sudo mkdir -p /etc/OpenCL/vendors
echo "/usr/lib/libmali-valhall-g610-g6p0-x11-wayland-gbm.so" | sudo tee /etc/OpenCL/vendors/mali.icd
```
Set the dependencies of the Mali OpenCL as follows;
```bash
sudo apt install libxcb-dri2-0 libxcb-dri3-0 libwayland-client0 libwayland-server0 libx11-xcb1
```
Now you can run "clinfo" to check whether OpenCL is working.
```bash
clinfo...
```
Check whether some dependencies are missing using ldd command as follows;
```
ldd /usr/lib/libmali-valhall-g610-g6p0-x11-wayland-gbm.so
```
Create Symbolic Link for libOpenCL.so
The directory "/usr/lib/aarch64-linux-gnu/" will have "libOpenCL.so.1.0.0". But no "libOpenCL.so" file. In this case, create a symbolic link as follows. You need to log into root account to create this, say, "su -";
```bash
cd /usr/lib/aarch64-linux-gnu/ && sudo ln -s libOpenCL.so.1.0.0 libOpenCL.so
```
Copying OpenCL "CL" Folder into "/usr/include"
```bash
cd ~/ && wget https://www.roselladb.com/download/CLv3.zip
unzip CLv3.zip
sudo cp -r CL /usr/include
sudo reboot
```

View File

@@ -0,0 +1,13 @@
# WebDAV
## Structure
```
.
├── apache
| ├── baikal (83)
| └── webdav
└── mariadb
```
CF. : [Baikal](https://cloud.delmar.bzh/f/12225)

View File

@@ -0,0 +1,21 @@
# Webmin
## Structure
```
.
├── systemd
└── webmin (10000)
```
```bash
curl -o webmin-setup-repos.sh https://raw.githubusercontent.com/webmin/webmin/master/webmin-setup-repos.sh
sudo sh webmin-setup-repos.sh
sudo apt-get install --install-recommends webmin usermin -y
```
[https://ip-address-of-machine:10000](https://ip-address-of-machine:10000)
##### Docker Module
[https://github.com/dave-lang/webmin-docker](https://github.com/dave-lang/webmin-docker)

View File

@@ -0,0 +1,40 @@
# Wireguard
## Proton VPN
```bash
sudo apt install wireguard resolvconf
sudo vim /etc/wireguard/wg0.conf
```
Download [Configuration File](https://account.proton.me/u/0/vpn/WireGuard)
```conf
[Interface]
# Key for sandy
# Bouncing = 0
# NetShield = 1
# Moderate NAT = off
# NAT-PMP (Port Forwarding) = off
# VPN Accelerator = on
PrivateKey = CEGA0TO7WhxIdwbTIV9p4XMG2CfdPSiNmpRwwHzaeXo=
Address = 10.2.0.2/32
DNS = 10.2.0.1
[Peer]
# FR#97
PublicKey = Z/l/+DAz1YilevRfmEMMjNbzYOVCB0sOJc3vVKhQ/gw=
AllowedIPs = 0.0.0.0/0
Endpoint = 146.70.194.18:51820
```
`sudo wg-quick up wg0.conf`
#### enable
`sudo systemctl enable --now wg-quick@wg0`
#### Check...
`sudo wgcurl https://ip.me`

View File

@@ -0,0 +1,132 @@
# Wordpress
```bash
sudo apt update && apt full-upgrade -y
sudo apt install apache2 wget curl git php libapache2-mod-php php-cli php-mysql php-zip php-curl php-xml php-json php-gd php-intl php-mbstring php-imagick php-fpm php-dom php-gd php-imagick -y
```
## apache
### wpugo
```bash
wget https://wordpress.org/latest.tar.gz --directory-prefix=/tmp/
sudo tar xvfa /tmp/latest.tar.gz -C /var/www/wpugo/ --strip-components=1
sudo chown -R www-data:www-data /var/www/wpugo/
sudo rm /var/www/wpugo/index.nginx-debian.html
sudo cp wordpress/wp-config-sample.php wordpress/wp-config.php
```
> edit wordpress/wp-config.php with database infos
<div class="table-wrapper" id="bkmrk-database-user-passwo"><table><tbody><tr><th colspan="1" rowspan="1">Database</th><th colspan="1" rowspan="1">User</th><th colspan="1" rowspan="1">Password</th><th colspan="1" rowspan="1">Host</th></tr><tr><td colspan="1" rowspan="1">wpugo</td><td colspan="1" rowspan="1">wordpress</td><td colspan="1" rowspan="1">wordpress</td><td colspan="1" rowspan="1">patrick:3306</td></tr><tr><td colspan="1" rowspan="1">`sudo rm /var/www/wpugo/readme.html`</td><td colspan="1" rowspan="1"> </td><td colspan="1" rowspan="1"> </td><td colspan="1" rowspan="1"> </td></tr></tbody></table>
</div>> add virtualhost to /etc/apache2/sites-available/ugo.delmar.bzh.conf
```conf
<VirtualHost *:82>
ServerName ugo.delmar.bzh
DocumentRoot /var/www/wpugo
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
```
> vim /var/www/html/wp-admin/setup-config.php
> Add before line 20 (20 gg)
> `> $_SERVER['HTTPS']='on';`
> sudo vim /var/www/html/wp-config-sample.php
> Add before line 82 (82 gg)
> `$_SERVER['HTTPS']='on';`
```bash
sudo chmod -v 666 /var/www/wpugo/.htaccess
sudo a2ensite ugo.delmar.bzh.conf
sudo a2dissite 000-default
apache2ctl configtest
```
```
# Redirection vers HTTPS
RewriteCond %{SERVER_PORT} ^8082$ [OR]
RewriteCond %{HTTPS} =off
RewriteRule ^(.*)$ https://ugo.delmar.bzh/$1 [R=301,L]
# Redirection du non-www vers www en HTTPS
RewriteCond %{HTTP_HOST} ^delmar.bzh [NC]
RewriteRule ^(.*)$ https://ugo.delmar.bzh/$1 [R=301,L]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
```
> sudo vim /etc/apache2/mods-enabled/dir.conf
> `DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm`
```bash
systemctl reload apache2
exit
```
### Starting WP
#### Database infos
<div class="table-wrapper" id="bkmrk-website-database-nam"><table><tbody><tr><th colspan="1" rowspan="1">Website</th><th colspan="1" rowspan="1">Database</th><th colspan="1" rowspan="1">Name</th><th colspan="1" rowspan="1">Username</th><th colspan="1" rowspan="1">Password</th><th colspan="1" rowspan="1">Host</th><th colspan="1" rowspan="1">Prefix</th></tr><tr><td colspan="1" rowspan="1">wp1</td><td colspan="1" rowspan="1">wpjul</td><td colspan="1" rowspan="1">wordpress</td><td colspan="1" rowspan="1">28CWAm2yDy2PMVnU9ZwtxvNQ</td><td colspan="1" rowspan="1">db.lxd</td><td colspan="1" rowspan="1">wp\_</td><td colspan="1" rowspan="1"> </td></tr><tr><td colspan="1" rowspan="1">wp2</td><td colspan="1" rowspan="1">wpugo</td><td colspan="1" rowspan="1">wordpress</td><td colspan="1" rowspan="1">28CWAm2yDy2PMVnU9ZwtxvNQ</td><td colspan="1" rowspan="1">db.lxd</td><td colspan="1" rowspan="1">wp\_</td><td colspan="1" rowspan="1"> </td></tr></tbody></table>
</div>\#docker #apache #mariadb #server #cms #blog
### Fix upload\_max\_filesize directive
1. Get container ID : `sudo docker container ls --filter name='wordpress'`
2. Update .htaccess file : `sudo docker container exec -it <Container ID> bash -c "echo 'php_value upload_max_filesize 256M' > '/var/www/html/.htaccess'"`
---
##### <span style="color: rgb(224, 62, 45);">**(!) In order to handle SEO url, include rewrite rules in [delmar.bzh.conf](https://bookstack.delmar.bzh/books/selfhosted/page/lamp "L.A.M.P")**</span>
## VirtualHost
```
.
├── apache
| └── wordpress (82)
└── mariadb
```
`/etc/apache2/sites-available/delmar.bzh.conf`
```conf
<VirtualHost *:82>
       ServerName ugo.delmar.bzh
       ServerAdmin ugo@delmar.bzh
       DocumentRoot /var/www/wpugo
       <Directory /var/www/wpugo>  
               Options Indexes FollowSymLinks
               AllowOverride None  
               Order allow,deny  
               allow from all  
               RewriteEngine On
               RewriteBase /
               RewriteRule ^index\.php$ - [L]
               RewriteCond %{REQUEST_FILENAME} !-f
               RewriteCond %{REQUEST_FILENAME} !-d
               RewriteRule . /index.php [L]
       </Directory>
       ErrorLog ${APACHE_LOG_DIR}/error.log
       CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
```