nginx, PHP 5.3 and FastCGI on CentOS 5.5, Fedora 13, Red Hat RHEL 5.5/6 - Comment Page: 1

This is guide howto install nginx, PHP 5.3 and FastCGI webserver with MySQL and/or PostgreSQL and Memcache support on Fedora 12 and Fedora 13, CentOS 5.5, Red Hat (RHEL) 5.5/6. nginx (engine x) is a robust, small and high performance http server, reverse proxy server and also mail proxy server. 1. Add and enable needed repositories: Updated 19.3.2010 Use following repositories to install nginx 0.8.xx version (currently 0.8.36 version) rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm rpm -Uvh http://yum.chrislea.com/centos/5/i386/chl-release-5-3.noarch.rpm rpm...

11 comments on “nginx, PHP 5.3 and FastCGI on CentOS 5.5, Fedora 13, Red Hat RHEL 5.5/6 - Comment Page: 1

    1. How about if I wanted to install Nginx 0.8.31?

      Reply
    2. If you want use development versions then best way is building nginx from source. Here is quick guide to build nginx 0.8.31 from source:

      
      # Install following packages
      yum install gcc openssl-devel pcre-devel zlib-devel
      
      # Download nginx-0.8.31.tar.gz
      wget http://www.nginx.org/download/nginx-0.8.31.tar.gz
      
      # Untar and unzip nginx-0.8.31.tar.gz 
      tar xvfz nginx-0.8.31.tar.gz
      
      # Move to nginx-0.8.31 directory
      cd nginx-0.8.31
      
      # Configure nginx
      # (Configure options for CentOS, 
      #  Red Hat, Fedora from nginx wiki)
      ./configure \
        --prefix=/usr \
        --sbin-path=/usr/sbin/nginx \
        --conf-path=/etc/nginx/nginx.conf \
        --error-log-path=/var/log/nginx/error.log \
        --pid-path=/var/run/nginx/nginx.pid  \
        --lock-path=/var/lock/nginx.lock \
        --user=nginx \
        --group=nginx \
        --with-http_ssl_module \
        --with-http_flv_module \
        --with-http_gzip_static_module \
        --http-log-path=/var/log/nginx/access.log \
        --http-client-body-temp-path=/var/tmp/nginx/client/ \
        --http-proxy-temp-path=/var/tmp/nginx/proxy/ \
        --http-fastcgi-temp-path=/var/tmp/nginx/fcgi/ 
      
      # Build nginx
      make
      
      # Install nginx as root
      make install
      

      And then install other needed stuff, configure webserver and test.

      Reply
    3. Maybe im missing something, but it doesnt seem like mysql was installed like the title implies. I cant even install mysql now through yum either. I get the follow error and a few others just like it, but more just referrence language files:

      file /etc/my.cnf from install of mysql-5.0.77-4.el5_4.1.i386 conflicts with file from package mysql-libs-5.1.42-1.el5.remi.i386

      Reply
    4. Hi Mark,

      Actually this manual will guide only in how to install nginx, FastCGI and PHP with MySQL, PostgreSQL and Memcache support. So after this setup you should get PHP+nginx server with MySQL, PostgreSQL and Memcache support, but not MySQL, PostgreSQL or Memcache servers installed.

      But your problem with MySQL install. If you want install MySQL 5.1.42 then try to install it with following command:

      yum --enablerepo=remi install mysql mysql-server
      Reply
    5. Maybe its better try downgrade back to MySQL version 5.0.77, simply remove following packages (if you have installed those):

      yum install --disablerepo=remi mysql

      This should install mysql-5.0.77-4.el5_4.1 on your system.

      Reply
    6. This fixed the original problem.

      Now the error is “ERROR] Error message file '/usr/share/mysql/english/errmsg.sys' had only 480 error messages,
      but it should contain at least 641 error messages.” when starting mysqld.

      Is something messed up in the mysql packages on that repo?

      Reply
    7. I love the tips on this site, they are always to the point and just the information I was looking for. Its hard to find good content these days in the world of spam and garbage sites. [Removed email address]

      Reply
    8. There are critical bugs in nginx in the version used in the EPEL repository (0.6.39).

      http://nginx.org/en/security_advisories.html

      According to nginx’s site they affect most version up until the most recent 0.7 and 0.8 branches which have been fixed.You are way, way better off from a security standpoint building nginx from scratch using the latest 0.7 release.

      Reply
    9. […] have once written Install nginx, PHP 5.3 and FastCGI on CentOS 5.5, Fedora 13, Red Hat RHEL 5.5/6 guide, but this guide is “updated” version, howto install Nginx with PHP 5.3.8 and […]

      Reply
    10. thankyou for php5-fastcgi section
      it works for me on openwrt

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close