14-11-2023
This commit is contained in:
@@ -705,8 +705,36 @@ $ brew services restart httpd
|
||||
|
||||
|
||||
|
||||
### cgi
|
||||
|
||||
```http
|
||||
LoadModule mpm_prefork_module lib/httpd/modules/mod_mpm_prefork.so
|
||||
|
||||
<IfModule mpm_prefork_module>
|
||||
LoadModule cgi_module lib/httpd/modules/mod_cgi.so
|
||||
</IfModule>
|
||||
|
||||
# Options Indexes FollowSymLinks ExecCGI
|
||||
|
||||
ScriptAlias /cgi-bin/ "/opt/homebrew/var/www/cgi-bin/"
|
||||
|
||||
<Directory "/opt/homebrew/var/www/cgi-bin">
|
||||
AllowOverride None
|
||||
Options None
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
# AddHandler cgi-script .cgi .sh
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Liens:
|
||||
|
||||
[:fa-link: https://getgrav.org/blog/macos-bigsur-apache-multiple-php-versions](https://getgrav.org/blog/macos-bigsur-apache-multiple-php-versions)
|
||||
|
||||
[:fa-link: https://lukearmstrong.github.io/2016/12/setup-apache-mysql-php-homebrew-macos-sierra/](https://lukearmstrong.github.io/2016/12/setup-apache-mysql-php-homebrew-macos-sierra/)
|
||||
[:fa-link: https://lukearmstrong.github.io/2016/12/setup-apache-mysql-php-homebrew-macos-sierra/](https://lukearmstrong.github.io/2016/12/setup-apache-mysql-php-homebrew-macos-sierra/)
|
||||
|
||||
[:fa-link: https://httpd.apache.org/docs/2.4/howto/cgi.html](https://httpd.apache.org/docs/2.4/howto/cgi.html)
|
||||
|
||||
|
||||
@@ -6,16 +6,18 @@
|
||||
|
||||
[composer](composer.md)
|
||||
|
||||
[MySQL](mysql)
|
||||
[MySQL](mysql.md)
|
||||
|
||||
[mongodb](mongodb)
|
||||
[mongodb](mongodb.md)
|
||||
|
||||
[PHP](php.md)
|
||||
|
||||
[PHP 7.2](php72)
|
||||
|
||||
[PHP 7.3](php73.md)
|
||||
|
||||
[PHP 7.4](php74.md)
|
||||
|
||||
[PHP 8.0](php80.md)
|
||||
|
||||
[Protéger l'accès à une page par un mot-de-passe](htpasswd.md)
|
||||
|
||||
[Xhprof](Xhprof.md)
|
||||
|
||||
@@ -6,14 +6,14 @@ Mac intel:
|
||||
|
||||
```bash
|
||||
$ nano /usr/local/etc/php/7.4/php.ini
|
||||
$ nano /usr/local/etc/php/8.0/php.ini
|
||||
$ nano /usr/local/etc/php/8.2/php.ini
|
||||
```
|
||||
|
||||
Mac M1:
|
||||
|
||||
```bash
|
||||
$ nano /opt/homebrew/etc/php/7.4/php.ini
|
||||
$ nano /opt/homebrew/etc/php/8.0/php.ini
|
||||
$ nano /opt/homebrew/etc/php/8.2/php.ini
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ $ brew link --overwrite --force php
|
||||
brew services restart shivammathur/php/php # php 8.0
|
||||
brew services restart shivammathur/php/php@7.4
|
||||
brew services restart shivammathur/php/php@8.1
|
||||
brew services restart shivammathur/php/php@8.2
|
||||
```
|
||||
|
||||
|
||||
@@ -90,7 +91,7 @@ $ php -i
|
||||
/opt/homebrew/var/log/php-fpm.log
|
||||
```
|
||||
|
||||
|
||||
/opt/homebrew/var/php_errors.log
|
||||
|
||||
### Extensions:
|
||||
|
||||
@@ -168,20 +169,47 @@ extension="/opt/homebrew/opt/imagick@8.0/imagick.so"
|
||||
|
||||
|
||||
```bash
|
||||
$ brew install memcached@8.0
|
||||
$ brew install shivammathur/extensions/memcached@8.1
|
||||
|
||||
# Fichier config
|
||||
/opt/homebrew/etc/php/7.4/conf.d/memcached.ini # M1
|
||||
/usr/local/etc/php/8.0/conf.d/memcached.ini # intel
|
||||
/opt/homebrew/etc/php/8.1/conf.d/30-memcached.ini # M1
|
||||
/usr/local/etc/php/8.1/conf.d/memcached.ini # intel
|
||||
|
||||
# Memcached dépend de 2 extensions
|
||||
/opt/homebrew/etc/php/8.1/conf.d/20-igbinary.ini
|
||||
/opt/homebrew/etc/php/8.1/conf.d/20-msgpack.ini
|
||||
# qui doivent être chargées avant, d'où la priorité 20- pour igbinary et msgpack et 30- pour memcached.
|
||||
```
|
||||
|
||||
Si la priorité n'est pas respectée:
|
||||
|
||||
```bash
|
||||
$ nano /opt/homebrew/etc/php/7.4/conf.d/memcached.ini
|
||||
/opt/homebrew/etc/php/8.1/conf.d ls
|
||||
|
||||
/opt/homebrew/etc/php/8.1/conf.d/igbinary.ini
|
||||
/opt/homebrew/etc/php/8.1/conf.d/msgpack.ini
|
||||
/opt/homebrew/etc/php/8.1/conf.d/memcached.ini
|
||||
```
|
||||
|
||||
on a une erreur:
|
||||
|
||||
```php
|
||||
PHP Startup: Unable to load dynamic library '/opt/homebrew/opt/memcached@8.1/memcached.so'
|
||||
symbol not found in flat namespace '_php_msgpack_serialize')
|
||||
|
||||
PHP Startup: Unable to load dynamic library '/opt/homebrew/opt/memcached@8.1/memcached.so'
|
||||
symbol not found in flat namespace '_php_igbinary_serialize')
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
$ nano /opt/homebrew/etc/php/8.1/conf.d/30-memcached.ini
|
||||
```
|
||||
|
||||
```php
|
||||
[memcached]
|
||||
extension="/opt/homebrew/opt/memcached@7.4/memcached.so"
|
||||
extension="/opt/homebrew/opt/memcached@78.1/memcached.so"
|
||||
```
|
||||
|
||||
|
||||
|
||||
92
docs/macos/webserver/redis.md
Normal file
92
docs/macos/webserver/redis.md
Normal file
@@ -0,0 +1,92 @@
|
||||
|
||||
|
||||
# redis
|
||||
|
||||
|
||||
|
||||
### Installation:
|
||||
|
||||
```bash
|
||||
$ brew install redis
|
||||
```
|
||||
|
||||
### Redémarrer:
|
||||
|
||||
```bash
|
||||
$ brew services restart redis
|
||||
```
|
||||
|
||||
### Le fichier de config:
|
||||
|
||||
```bash
|
||||
/opt/homebrew/etc/redis.conf
|
||||
```
|
||||
|
||||
### Tester redis:
|
||||
|
||||
```bash
|
||||
$ redis-server
|
||||
30766:C 25 Jul 2022 11:46:58.611 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
|
||||
30766:C 25 Jul 2022 11:46:58.611 # Redis version=7.0.3, bits=64, commit=00000000, modified=0, pid=30766, just started
|
||||
30766:C 25 Jul 2022 11:46:58.611 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
|
||||
30766:M 25 Jul 2022 11:46:58.612 * Increased maximum number of open files to 10032 (it was originally set to 256).
|
||||
30766:M 25 Jul 2022 11:46:58.612 * monotonic clock: POSIX clock_gettime
|
||||
_._
|
||||
_.-``__ ''-._
|
||||
_.-`` `. `_. ''-._ Redis 7.0.3 (00000000/0) 64 bit
|
||||
.-`` .-```. ```\/ _.,_ ''-._
|
||||
( ' , .-` | `, ) Running in standalone mode
|
||||
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
|
||||
| `-._ `._ / _.-' | PID: 30766
|
||||
`-._ `-._ `-./ _.-' _.-'
|
||||
|`-._`-._ `-.__.-' _.-'_.-'|
|
||||
| `-._`-._ _.-'_.-' | https://redis.io
|
||||
`-._ `-._`-.__.-'_.-' _.-'
|
||||
|`-._`-._ `-.__.-' _.-'_.-'|
|
||||
| `-._`-._ _.-'_.-' |
|
||||
`-._ `-._`-.__.-'_.-' _.-'
|
||||
`-._ `-.__.-' _.-'
|
||||
`-._ _.-'
|
||||
`-.__.-'
|
||||
|
||||
30766:M 25 Jul 2022 11:46:58.613 # WARNING: The TCP backlog setting of 511 cannot be enforced because kern.ipc.somaxconn is set to the lower value of 128.
|
||||
30766:M 25 Jul 2022 11:46:58.613 # Server initialized
|
||||
30766:M 25 Jul 2022 11:46:58.613 * Ready to accept connections
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Démarrer redis:
|
||||
|
||||
```bash
|
||||
❯ brew services start redis
|
||||
==> Successfully started `redis` (label: homebrew.mxcl.redis)
|
||||
```
|
||||
|
||||
### Si le service est actif:
|
||||
|
||||
```bash
|
||||
❯ brew services info redis
|
||||
redis (homebrew.mxcl.redis)
|
||||
Running: ✔
|
||||
Loaded: ✔
|
||||
Schedulable: ✘
|
||||
User: bruno
|
||||
PID: 31087
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Se connecter à redis:
|
||||
|
||||
```bash
|
||||
❯ redis-cli
|
||||
127.0.0.1:6379> lpush demos redis-macOS-demo
|
||||
(integer) 1
|
||||
127.0.0.1:6379> rpop demos
|
||||
"redis-macOS-demo"
|
||||
127.0.0.1:6379> ping
|
||||
PONG
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user