1 |
mabi 10/07/26 13:42:12 |
2 |
|
3 |
Added: php-fpm-gentooified.patch php-fpm.init |
4 |
Log: |
5 |
add fpm support |
6 |
(Portage version: 2.1.8.3/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 dev-lang/php/files/php-fpm-gentooified.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/php-fpm-gentooified.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/php-fpm-gentooified.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: php-fpm-gentooified.patch |
15 |
=================================================================== |
16 |
--- sapi/fpm/php-fpm.conf.orig 2010-06-03 21:04:30.000000000 +0200 |
17 |
+++ sapi/fpm/php-fpm.conf 2010-06-03 22:40:41.000000000 +0200 |
18 |
@@ -8,7 +8,7 @@ |
19 |
; Include one or more files. If glob(3) exists, it is used to include a bunch of |
20 |
; files from a glob(3) pattern. This directive can be used everywhere in the |
21 |
; file. |
22 |
-;include=/etc/fpm.d/*.conf |
23 |
+;include=/etc/php/fpm-php5/fpm.d/*.conf |
24 |
|
25 |
;;;;;;;;;;;;;;;;;; |
26 |
; Global Options ; |
27 |
@@ -17,11 +17,11 @@ |
28 |
[global] |
29 |
; Pid file |
30 |
; Default Value: none |
31 |
-;pid = /var/lib/run/php-fpm.pid |
32 |
+;pid = /var/run/php-fpm.pid |
33 |
|
34 |
; Error log file |
35 |
; Default Value: /var/lib/log/php-fpm.log |
36 |
-;error_log = /var/lib/log/php-fpm.log |
37 |
+error_log = /var/log/php-fpm.log |
38 |
|
39 |
; Log level |
40 |
; Possible Values: alert, error, warning, notice, debug |
41 |
@@ -133,17 +133,17 @@ |
42 |
; The number of child processes created on startup. |
43 |
; Note: Used only when pm is set to 'dynamic' |
44 |
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 |
45 |
-;pm.start_servers = 20 |
46 |
+pm.start_servers = 20 |
47 |
|
48 |
; The desired minimum number of idle server processes. |
49 |
; Note: Used only when pm is set to 'dynamic' |
50 |
; Note: Mandatory when pm is set to 'dynamic' |
51 |
-;pm.min_spare_servers = 5 |
52 |
+pm.min_spare_servers = 5 |
53 |
|
54 |
; The desired maximum number of idle server processes. |
55 |
; Note: Used only when pm is set to 'dynamic' |
56 |
; Note: Mandatory when pm is set to 'dynamic' |
57 |
-;pm.max_spare_servers = 35 |
58 |
+pm.max_spare_servers = 35 |
59 |
|
60 |
; The number of requests each child process should execute before respawning. |
61 |
; This can be useful to work around memory leaks in 3rd party libraries. For |
62 |
@@ -213,7 +213,7 @@ |
63 |
|
64 |
; The log file for slow requests |
65 |
; Default Value: /var/lib/log/php-fpm.log.slow |
66 |
-;slowlog = /var/lib/log/php-fpm.log.slow |
67 |
+;slowlog = /var/log/php-fpm.log.slow |
68 |
|
69 |
; Set open file descriptor rlimit. |
70 |
; Default Value: system defined value |
71 |
|
72 |
|
73 |
|
74 |
1.1 dev-lang/php/files/php-fpm.init |
75 |
|
76 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/php-fpm.init?rev=1.1&view=markup |
77 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/php-fpm.init?rev=1.1&content-type=text/plain |
78 |
|
79 |
Index: php-fpm.init |
80 |
=================================================================== |
81 |
#!/sbin/runscript |
82 |
|
83 |
PHP_FPM_CONF="/etc/php/fpm-php5/php-fpm.conf" |
84 |
|
85 |
opts="depend start stop reload" |
86 |
|
87 |
depend() { |
88 |
need net |
89 |
use apache2 lighttpd nginx |
90 |
} |
91 |
|
92 |
start() { |
93 |
ebegin "Starting PHP FastCGI server" |
94 |
start-stop-daemon --start --exec /usr/bin/php-fpm -- -y "${PHP_FPM_CONF}" |
95 |
eend $? |
96 |
} |
97 |
|
98 |
stop() { |
99 |
ebegin "Stopping PHP FastCGI server" |
100 |
start-stop-daemon --stop --name php-fpm |
101 |
eend $? |
102 |
} |