这样的文章很多,我把一次安装PHP模块与大家分享一下,欢迎大牛提出建议。
好了闲话少说,进入正题!
openssl-0.9.8j.tar.gz memcache-2.2.3.tgz sign.tgz xcache-1.2.2.tar.gz php-5.2.17-fpm-0.5.14.diff.gz php-5.2.17.tar.bz2
[nginx安装包及依赖包]
pcre-7.7.tar.gz
nginx-1.2.0.tar.gz
|
出现下面的情况是没有安装 autoconf2.13的问题
Forcing buildconf buildconf: checking installation... buildconf: autoconf not found. You need autoconf version 2.13 or newer installed to build PHP from CVS. make: *** [buildmk.stamp] Error 1
所以这里需要重新安装
autoconf2.13
|
apt-get install autoconf2.13
export PHP_AUTOCONF=/usr/bin/autoconf2.13
|
export PHP_AUTOHEADER=/usr/bin/autoheader2.13
|
|
1 <?xml version="1.0" ?> 2 <configuration> 3 4 All relative paths in this config are relative to php's install prefix 5 6 <section name="global_options"> 7 8 Pid file 9 <value name="pid_file">/usr/local/php-5.2.17/logs/php-fpm.pid</value> 10 11 Error log file 12 <value name="error_log">/usr/local/php-5.2.17/logs/php-fpm.log</value> 13 14 Log level 15 <value name="log_level">notice</value> 16 17 When this amount of php processes exited with SIGSEGV or SIGBUS ... 18 <value name="emergency_restart_threshold">10</value> 19 20 ... in a less than this interval of time, a graceful restart will be initiated. 21 Useful to work around accidental curruptions in accelerator's shared memory. 22 <value name="emergency_restart_interval">1m</value> 23 24 Time limit on waiting child's reaction on signals from master "/usr/local/php-5.2.17/etc/php-fpm.conf" 156L, 5188C 1,1 Top 1 <?xml version="1.0" ?> 2 <configuration> 3 4 All relative paths in this config are relative to php's install prefix 5 6 <section name="global_options"> 7 8 Pid file 9 <value name="pid_file">/usr/local/php-5.2.17/logs/php-fpm.pid</value> 10 11 Error log file 12 <value name="error_log">/usr/local/php-5.2.17/logs/php-fpm.log</value> 13 14 Log level 15 <value name="log_level">notice</value> 18 <value name="emergency_restart_threshold">10</value> 19 20 ... in a less than this interval of time, a graceful restart will be initiated. 21 Useful to work around accidental curruptions in accelerator's shared memory. 22 <value name="emergency_restart_interval">1m</value> 23 24 Time limit on waiting child's reaction on signals from master 25 <value name="process_control_timeout">5s</value> 26 29 30 </section> 31 32 <workers> 33 34 <section name="pool"> 35 36 Name of pool. Used in logs and stats. 37 <value name="name">default</value> 38 39 Address to accept fastcgi requests on. 40 Valid syntax is 'ip.ad.re.ss:port' or just 'port' or '/path/to/unix/socket' 41 <value name="listen_address">127.0.0.1:9000</value> 42 43 <value name="listen_options"> 44 45 Set listen(2) backlog 46 <value name="backlog">-1</value> 47 48 Set permissions for unix socket, if one used. 50 Many BSD-derrived systems allow connections regardless of permissions. 51 <value name="owner"></value> 52 <value name="group"></value> 53 <value name="mode">0666</value> 54 </value> 55 56 Additional php.ini defines, specific to this pool of workers. 57 <value name="php_defines"> 58 <!-- <value name="sendmail_path">/usr/sbin/sendmail -t -i</value> --> 60 </value> 61 62 Unix user of processes 63 <value name="user">web</value> 64 65 Unix group of processes 66 <value name="group">web</value> 71 Sets style of controling worker process count. 72 Valid values are 'static' and 'apache-like' 73 <value name="style">static</value> 76 Equivalent to Apache MaxClients directive. 77 Equivalent to PHP_FCGI_CHILDREN environment in original php.fcgi 78 Used with any pm_style. 79 <value name="max_children">5</value> 80 81 Settings group for 'apache-like' pm style 82 <value name="apache_like"> 83 84 Sets the number of server processes created on startup. 85 Used only when 'apache-like' pm_style is selected 86 <value name="StartServers">20</value> 87 88 Sets the desired minimum number of idle server processes. 89 Used only when 'apache-like' pm_style is selected 90 <value name="MinSpareServers">5</value> 91 92 Sets the desired maximum number of idle server processes. 93 Used only when 'apache-like' pm_style is selected 94 <value name="MaxSpareServers">35</value> 95 96 </value> 97 98 </value> 99 102 '0s' means 'off' 103 <value name="request_terminate_timeout">0s</value> 104 106 '0s' means 'off' 107 <value name="request_slowlog_timeout">0s</value> 108 109 The log file for slow requests 110 <value name="slowlog">logs/slow.log</value> 111 112 Set open file desc rlimit 113 <value name="rlimit_files">1024</value> 114 115 Set max core size rlimit 116 <value name="rlimit_core">0</value> 117 118 Chroot to this directory at the start, absolute path 119 <value name="chroot"></value> 120 121 Chdir to this directory at the start, absolute path 122 <value name="chdir"></value> 123 124 Redirect workers' stdout and stderr into main error log. 125 If not set, they will be redirected to /dev/null, according to FastCGI specs 126 <value name="catch_workers_output">yes</value> 127 128 How much requests each process should execute before respawn. 129 Useful to work around memory leaks in 3rd party libraries. 130 For endless request processing please specify 0 131 Equivalent to PHP_FCGI_MAX_REQUESTS 132 <value name="max_requests">500</value> 133 134 Comma separated list of ipv4 addresses of FastCGI clients that allowed to connect. 135 Equivalent to FCGI_WEB_SERVER_ADDRS environment in original php.fcgi (5.2.2+) 136 Makes sense only with AF_INET listening socket. 137 <value name="allowed_clients">127.0.0.1</value> 138 139 Pass environment variables like LD_LIBRARY_PATH 140 All $VARIABLEs are taken from current environment 141 <value name="environment"> 142 <value name="HOSTNAME">$HOSTNAME</value> 143 <value name="PATH">/usr/local/bin:/usr/bin:/bin</value> 144 <value name="TMP">/tmp</value> 145 <value name="TMPDIR">/tmp</value> 146 <value name="TEMP">/tmp</value> 147 <value name="OSTYPE">$OSTYPE</value> 148 <value name="MACHTYPE">$MACHTYPE</value> 149 <value name="MALLOC_CHECK_">2</value> 150 </value> 151 152 </section> 153 154 </workers> 155 156 </configuration> |
LQDBY-DB64:/data/software/php-5.2.17/ext/mysql# ps -ef |grep php-cgi root 25745 1 0 16:34 ? 00:00:00 /usr/local/php-5.2.17/bin/php-cgi --fpm --fpm-config /usr/local/php-5.2.17/etc/php-fpm.conf web 25746 25745 0 16:34 ? 00:00:00 /usr/local/php-5.2.17/bin/php-cgi --fpm --fpm-config /usr/local/php-5.2.17/etc/php-fpm.conf web 25747 25745 0 16:34 ? 00:00:00 /usr/local/php-5.2.17/bin/php-cgi --fpm --fpm-config /usr/local/php-5.2.17/etc/php-fpm.conf web 25748 25745 0 16:34 ? 00:00:00 /usr/local/php-5.2.17/bin/php-cgi --fpm --fpm-config /usr/local/php-5.2.17/etc/php-fpm.conf web 25749 25745 0 16:34 ? 00:00:00 /usr/local/php-5.2.17/bin/php-cgi --fpm --fpm-config /usr/local/php-5.2.17/etc/php-fpm.conf web 25750 25745 0 16:34 ? 00:00:00 /usr/local/php-5.2.17/bin/php-cgi --fpm --fpm-config /usr/local/php-5.2.17/etc/php-fpm.conf root 26822 23954 0 17:03 pts/0 00:00:00 grep php-cgi |
1 2 #user nobody; 3 worker_processes 1; 4 5 #error_log logs/error.log; 6 #error_log logs/error.log notice; 7 #error_log logs/error.log info; 8 9 #pid logs/nginx.pid; 10 11 12 events { 13 worker_connections 1024; 14 } 15 16 17 http { 18 include mime.types; 19 default_type application/octet-stream; 20 21 #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' 22 # '$status $body_bytes_sent "$http_referer" ' 23 # '"$http_user_agent" "$http_x_forwarded_for"'; 24 25 #access_log logs/access.log main; 26 27 sendfile on; 28 #tcp_nopush on; 29 30 #keepalive_timeout 0; 31 keepalive_timeout 65; 32 33 #gzip on; 34 35 server { 36 listen 80; 37 server_name localhost; 38 39 #charset koi8-r; 40 41 #access_log logs/host.access.log main; 42 43 location / { 44 root html; 45 index index.html index.htm index.php; 46 } 47 48 #error_page 404 /404.html; 49 50 # redirect server error pages to the static page /50x.html 51 # 52 error_page 500 502 503 504 /50x.html; 53 location = /50x.html { 54 root html; 55 } 56 57 # proxy the PHP scripts to Apache listening on 127.0.0.1:80 58 # 59 #location ~ \.php$ { 60 # proxy_pass http://127.0.0.1; 61 #} 62 63 # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 64 # 65 location ~ \.php$ { 66 root html; 67 fastcgi_pass 127.0.0.1:9000; 68 fastcgi_index index.php; 69 fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; 70 include fastcgi.conf; 71 } 72 73 # deny access to .htaccess files, if Apache's document root 74 # concurs with nginx's one 75 # 76 #location ~ /\.ht { 77 # deny all; 78 #} 79 } 80 81 82 # another virtual host using mix of IP-, name-, and port-based configuration 83 # 84 #server { 85 # listen 8000; 86 # listen somename:8080; 87 # server_name somename alias another.alias; 88 89 # location / { 90 # root html; 91 # index index.html index.htm; 92 # } 93 #} 94 95 96 # HTTPS server 97 # 98 #server { 99 # listen 443; 100 # server_name localhost; 101 102 # ssl on; 103 # ssl_certificate cert.pem; 104 # ssl_certificate_key cert.key; 105 106 # ssl_session_timeout 5m; 107 108 # ssl_protocols SSLv2 SSLv3 TLSv1; 109 # ssl_ciphers HIGH:!aNULL:!MD5; 110 # ssl_prefer_server_ciphers on; 111 112 # location / { 113 # root html; 114 # index index.html index.htm; 115 # } 116 #} 117 118 } |
|
|