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.

分类:PHP 时间:2010-03-26 人气:407
分享到:
blog comments powered by Disqus

相关文章

  • Linux 5 on Apache server installation 2010-07-12

    Web server, Web development framework is a necessary environment, Apache Web server is using most of the server market. This stems from Apache can run on UNIX, Linux, Windows and other operating systems and its open source development model makes it

  • Linux and windows Vmware Server installation notes 2011-05-13

    Quote from http://gaoxingf.blog.51cto.com/612518/188717 2009-08-06 23:33:44 Tags: vmware server linux windows Original works, for permission to reproduce, reprint, please be sure to indicate the form of hyperlinks original source of article, author i

  • Installation and deployment of DB2 JDBC Issues 2011-03-21

    Original: http://tech.e800.com.cn/articles/2009/730/1248921490555_1.html In the installation of DB2 and JDBC development, will encounter some common problems to be recorded in memo: 1. License DB2 genuine or not depends on license, but during the ins

  • A thorough revision of Google Chrome browser installation directory 2010-07-11

    Original Source: http://www.javatang.com/archives/2010/07/11/4201420.html Study: Jet Mah from Java together Disclaimer: can non-commercial willfully, reproduced, please be sure to hyperlink to the original source form of the article indicated, author

  • jboss deployment of a linux service 2010-08-10

    1. Jboss user created useradd-m jboss 2. Download jboss, such as jboss-4.2.2.GA.zip, extract to / usr/local/jboss-4.2.2.GA 3. Chown jboss: jboss jboss-4.2.2.GA 4. Chmod 2771 jboss-4.2.2.GA 5. Ln-s jboss-4.2.2.GA / home / jboss / jboss 6. Copy jboss /

  • Unable to find the binary installation directory 2014-12-02

    安装VMware Tools错误提示: A previous installation of VMware Tools has been detected. The previous installation was made by the tar installer (version 4). Keeping the tar4 installer database format. You have a version of VMware Tools installed. Continuing t

  • linux ROR under nginx + mongrel cluster environment to build the 2010-12-07

    ror of the production environment build process can have a variety of web server and app server of choice and match the combination of which nginx + mongrel performance is outstanding among the many choices of a, therefore, to manually build a nginx

  • RedHat Linux 6 open VNC Server Enterprise Edition Remote Desktop 2011-05-06

    Environment: RedHat Linux 6 Enterprise Edition. Xwindows: gnome (the default installation of Red Hat's graphical interface) Although we can use SSH to connect remotely through the character interface to operate Linux, but for people more familiar wit

  • RedHat Linux 6 on VNC Server Enterprise Edition Remote Desktop 2011-05-06

    Environment: RedHat Linux 6 Enterprise Edition. Xwindows: gnome (the default installation of Red Hat's graphical interface) Although we can use SSH to connect remotely through the character interface to operate Linux, but for people more familiar wit

  • Set the Apache HTTP Server document root directory (DocumentRoot) 2010-09-29

    Set the Apache HTTP Server document root directory (DocumentRoot). Apache is installed, the system will set a default document root directory. If you think there is the default directory the page is not convenient, think we should also set up a direc

iOS 开发

Android 开发

Python 开发

JAVA 开发

开发语言

PHP 开发

Ruby 开发

搜索

前端开发

数据库

开发工具

开放平台

Javascript 开发

.NET 开发

云计算

服务器

Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 黔ICP备15002463号-1

processed in 0.401 (s). 12 q(s)