CentOS4 install Nginx + PHP5.3.2 + Wordpress2.9.2

As the company wants to blog, last night out before a night on the server set up a blog a good environment, which is shame ah, mainly own deployment are not familiar with php, recording about.

Software used:

  1. Nginx 0.8.34
  2. wordpress 2.9.2
  3. mysql 5
  4. php 5.3.2
  5. On so many ...

Nginx and PHP are compiling your own, this has nothing to say anymore.

wordpress installation can be considered the official wiki, written in great details the installation process http://codex.wordpress.org.cn/WordPress

PHP compile time to pay attention to what must be the - with-mysql = / xx / oo this option with (/ xx / oo is where your mysql installation directory), when I installed that did not add this which led to compile twice.

Also note that the configuration of Nginx, and I posted the configuration, do not know right, and anyway, can now run

server {
        listen 80;
        server_name blog.xx.com;
        access_log  /home/xx.com/logs/wordpress.log;
        location / {
            root /home/xx.com/wordpress;
            #index index.html index.htm;
            if (-f $request_filename/index.html){
                 rewrite (.*) $1/index.html break;
            }
            if (-f $request_filename/index.php){
                 rewrite (.*) $1/index.php;
            }
            if (!-f $request_filename){
                 rewrite (.*) /index.php;
            }
        }

        location ~ \.php$ {
        #location / {
             root           /home/xx.com/wordpress;
             fastcgi_pass   127.0.0.1:9000;
             fastcgi_index  index.php;
             fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
             include  fastcgi_params;
       } 
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   /home/xx.com/wordpress;
        }       

    }


Reference is the article: http://www.6heathy.com/archives/34.html and http://shiningray.cn/linux-shang-pei-zhi-nginx-php5-fastcgi.html

But I do not use spawn-fcgi me directly on the way to use php-cgi runs, seemingly no problem. And so do traffic up, and then modify too late.

Php start when a small mistake committed is to use the & background processing, but when the terminal exit, php or shutdown process, and this can refer to this blog http://hlee.javaeye.com/blog/587488 the perfect solution to the problem.

========================================= ===== Gorgeous cutting line ===================================

Way to use php-cgi or not, they would often classic 502 Bad Gateway error, and thus can not be provincial effort, or engage in a lighttpd-spawn-fcgi.

The latest version of lighttpd 1.4.26 compiled in the src folder can not find the spawn-fcgi files, but 1.4.18 is available, so I use 1.4.18

# The following code from  : http://shiningray.cn/linux-shang-pei-zhi-nginx-php5-fastcgi.html

wget http://www.lighttpd.net/download/lighttpd-1.4.18.tar.bz2 # Gets the source package Lighttpd  
tar -xvjf lighttpd-1.4.18.tar.bz2
cd lighttpd-1.4.18
./configure  # Compilation  
make
cp src/spawn-fcgi /usr/local/bin/spawn-fcgi # Check out the program spawn-fcgi  
 Below we can use spawn-fcgi to control  php-cgi The FastCGI process  

/usr/local/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -C 5 -u www-data -g www-data -f /usr/bin/php-cgi


Look, it should be no reason to die will not process the bar.
  • del.icio.us
  • StumbleUpon
  • Digg
  • TwitThis
  • Mixx
  • Technorati
  • Facebook
  • NewsVine
  • Reddit
  • Google
  • LinkedIn
  • YahooMyWeb

Related Posts of CentOS4 install Nginx + PHP5.3.2 + Wordpress2.9.2

  • Workspace run under different Eclipse

    Now do live more and more often required to use eclipse in java and ruby & rails project conducted between the tangential shear from the past, because in the rails project used a coloring Aptana preferences, the results open the java project sour ...

  • Maven 2.0: Compile. Test. Deployment. Run

    <url> http://maven.apache.org </ url> <dependencies> <dependency> <groupId> junit </ groupId> <artifactId> junit </ artifactId> <version> 3.8.1 </ version> <scope> test </ scope> <

  • Software development sunflower Baodian [reprint]

    Master the ability to reuse code very familiar with the new API's fast. This is because, he once used a lot of the API, have a lot of reusable code. He knows what is available and what is deficient. He has been using Qt, also used by gtk +, also used

  • JDBC example of a long time do not have JDBC forgot

    A back-up here to stay. The first: The second:

  • Memo hibernate problem

    hibernate using myeclipse automatically generated HBM mapping file will be schema ="***" catalog ="***" Separately are the database instance name and database name, but in fact has been stated jdbc url connection database, are the ...

  • Process migration from tomcat to websphere changes

    Process migration from tomcat to websphere changes Because customers use the web application server software used by different what tomcat5, tomcat6, websphere5.1, websphere6.1, weblogic8, and so on, and the software used inconsistent standards, ibm's

  • What is the appfuse

    First, Appfuse brief introduction Matt Raible are Appfuse developed a guiding entry-level J2EE framework, how to integrate its popular Spring, Hibernate, ibatis, struts, Xdcolet, junit, etc. give the basic framework of the model, the latest version 1.7 is

  • can not be represented as java.sql.Timestamp

    Development of procedures for the use of hibernate when, some time there is no need to fill in the fields, but after the hibernate query time reported "Java.sql.SQLException: Value'0000-00-00 'can not be represented as java.sql.Timestamp ...

  • Struts2 + hibernate + spring problem user log in

    dao layer services layer action jsp <tr> <td align="center"> <b> user name: </ b> </ td> <td> <s: textfield name = "czyNumber" cssClass = "textstyle" theme = "simple" size = &q

  • spring struts2.0 hibernate bug killer 1

    exception There is no Action mapped for namespace / and action name checkLogin. - [Unknown location] com.opensymphony.xwork2.DefaultActionProxy.prepare (DefaultActionProxy.java: 186) org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy ...

blog comments powered by Disqus
Recent
Recent Entries
Tag Cloud
Random Entries