Skip to content

Commit 6078d75

Browse files
committed
Merge branch 'build_native_php' into php-fpm
2 parents c738d4d + fcb812e commit 6078d75

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

setup-php-fpm-runtime.sh

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ case $ARCH in
3939
'x86_64')
4040
ARCH="x64"
4141
;;
42-
'aarch64' | 'arm64' )
42+
'aarch64' | 'arm64')
4343
ARCH="arm64"
4444
;;
4545
*)
@@ -148,6 +148,42 @@ expose_php=Off
148148
149149
EOF
150150

151+
cat >${__PROJECT__}/bin/runtime/php-fpm.conf <<'EOF'
152+
; 更多配置参考
153+
; https://github.com/php/php-src/blob/master/sapi/fpm/www.conf.in
154+
; https://github.com/php/php-src/blob/master/sapi/fpm/php-fpm.conf.in
155+
156+
[global]
157+
pid = run/php-fpm.pid
158+
error_log = log/php-fpm.log
159+
daemonize = yes
160+
161+
[www]
162+
user = nobody
163+
group = nobody
164+
165+
listen = 9001
166+
;listen = run/php-fpm.sock
167+
168+
slowlog = log/$pool.log.slow
169+
request_slowlog_timeout = 30s
170+
171+
172+
pm = dynamic
173+
pm.max_children = 5
174+
pm.start_servers = 2
175+
pm.min_spare_servers = 1
176+
pm.max_spare_servers = 3
177+
178+
; MAIN_PID=$(cat var/run/php-fpm.pid)
179+
; 关闭 php-fpm
180+
; kill -QUIT $MAIN_PID
181+
182+
; 平滑重启 php-fpm
183+
; kill -USR2 $MAIN_PID
184+
185+
EOF
186+
151187
cd ${__PROJECT__}/
152188

153189
set +x

0 commit comments

Comments
 (0)