Activity Stream
48,167 MEMBERS
61089 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 4 of 4
  1.     
    #1
    Banned
    Website's:
    KWWHunction.com

    Default [How To] Lighttpd With PHP5 And MySQL On CentOS 5.2

    Alright so the tutorial below basically describes how to install Lighttpd i had been running litespeed for a while, Just installed this on a test server running Linux Cent OS here at the house and it works very smoothly Ill be releasing more tutorials involving Linux Cent OS & Other Linux Destros over the next few weeks!


    What is Lighttpd?


    Lighttpd is a webserver designed to be secure, fast, standards-compliant, and flexible while being optimized for speed-critical environments. This post shows how to install it with PHP5 and MySQL support on Centos 5.2.

    Step 1: Install MySQL

    Code: 
    [root@server ~]# yum -y install mysql mysql-server
    Step 2: Create the system startup links for MySQL

    Code: 
    [root@server ~]# chkconfig --levels 235 mysqld on
    [root@server ~]# /etc/init.d/mysqld start


    Step 3: Create Password for the MySQL root User

    Code: 
    [root@server ~]# mysqladmin -u root password server123


    Step 4: Check if MySQL Networking is enabled


    Code: 
    [root@server ~]# netstat -tap | grep mysql


    Step 5: Set a MySQL password for your hostname

    Code: 
    [root@server ~]# mysqladmin -h localhost -u root password server123
    Step 6: Installing Lighttpd

    Code: 
    [root@server ~]# rpm -Uhv  http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
    [root@server ~]# yum -y install lighttpd
    Step 7: Create the system startup links for Lighttpd

    Code: 
    [root@server ~]# chkconfig --levels 235 lighttpd on
    [root@server ~]# /etc/init.d/lighttpd start
    Step 8: Check service lighttpd


    Code: 
    [root@server ~]# netstat -tap | grep lighttpd



    Step 9: Install PHP 5


    Code: 
    [root@server ~]# yum install lighttpd-fastcgi php-cli
    Step 10: Add the line cgi.fix_pathinfo = 1 right at the end of the file /etc/php.ini


    Code: 
    [root@server ~]# nano /etc/php.ini
    Code: 
    cgi.fix_pathinfo = 1
    Step 11: Uncomment "mod_fastcgi" in the file /etc/lighttpd/lighttpd.conf

    Code: 
    [root@server ~]# nano /etc/lighttpd/lighttpd.conf
    Code: 
    server.modules = (
    #              "mod_rewrite",
    #              "mod_redirect",
    #              "mod_alias",
                   "mod_access",
    #              "mod_cml",
    #              "mod_trigger_b4_dl",
    #              "mod_auth",
    #              "mod_status",
    #              "mod_setenv",
                   "mod_fastcgi",
    #              "mod_proxy",
    #              "mod_simple_vhost",
    #              "mod_evhost",
    #              "mod_userdir",
    #              "mod_cgi",
    #              "mod_compress",
    #              "mod_ssi",
    #              "mod_usertrack",
    #              "mod_expire",
    #              "mod_secdownload",
    #              "mod_rrdtool",
                   "mod_accesslog" )
    And then uncomment these few lines:

    Code: 
    #### fastcgi module
    ## read fastcgi.txt for more info
    fastcgi.server = ( ".php" =>
                   ( "localhost" =>
                     (
                                 "socket" => "/tmp/php-fastcgi.socket",
                                 "bin-path" => "/usr/bin/php-cgi"
                     )
                   )
    )
    Finally Step 12: Restart service lighttpd

    Code: 
    [root@server ~]# /etc/init.d/lighttpd restart
    Step 13: Testing PHP 5

    Code: 
    [root@server ~]# nano /srv/www/lighttpd/info.php
    Code: 
    <?php
    phpinfo();
    ?>
    Step 14: Now check in browser http://localhost/info.php

    Step 15:
    Getting MySQL in PHP5

    Code: 
    [root@server ~]# yum -y install php-mysql php-gd php-imap php-ldap  php-odbc php-pear php-xml php-xmlrpc

    Step 16. Restart service lighttpd


    Code: 
    [root@server ~]# /etc/init.d/lighttpd restart
     and check using http://localhost/info.php.
    DLow Reviewed by DLow on . [How To] Lighttpd With PHP5 And MySQL On CentOS 5.2 Alright so the tutorial below basically describes how to install Lighttpd i had been running litespeed for a while, Just installed this on a test server running Linux Cent OS here at the house and it works very smoothly <3 Ill be releasing more tutorials involving Linux Cent OS & Other Linux Destros over the next few weeks! What is Lighttpd? Lighttpd is a webserver designed to be secure, fast, standards-compliant, and flexible while being optimized for speed-critical environments. Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    Rapidimg.org
    I was searching for it the other day, but was unable to find a perfect tutorial do it.

    Thanks for this



  4.     
    #3
    mmm mmm!
    Thx for the tut mate.
    HATERS GONNA probably bring up some valid points considering I am an ignorant little twat so far up my own ass that i blame my problems on everyone and if you criticize me you're automatically wrong.

  5.     
    #4
    Member
    Simple, and good tutorial.
    This definitely will help to beginners and to people that have some skills.

    Thanks!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 6
    Last Post: 9th Nov 2012, 02:58 AM
  2. Replacing MySQL with MariaDB in a CentOS VPS
    By NewEraCracker in forum Technical and Security Tutorials
    Replies: 14
    Last Post: 30th Jan 2012, 11:39 PM
  3. Install MySQL 5.5.17 on CentOS 6
    By ifirstdoz in forum Tutorials and Guides
    Replies: 1
    Last Post: 20th Nov 2011, 01:18 PM
  4. How To Install Apache with MySQL and PHP on Linux CentOS
    By enetcloud in forum Tutorials and Guides
    Replies: 3
    Last Post: 21st Aug 2011, 01:11 PM
  5. Replies: 2
    Last Post: 31st Jul 2010, 02:09 AM

Tags for this Thread

BE SOCIAL