lighttpd MySQL php simple tutorial

Source: Internet
Author: User
Tags phpinfo sqlite

lighttpd MySQL php Simple Tutorials

Lighttpd+php5+mysql+debian Etch

lighttpd< Span style= "color: #333333; Font-family: the song body; > is the fastest static web servermysql The most versatile database serversqlite

Let's take a look at lighttpd , which is simple after the Debian installation .

Log in to Debian first via SSH

1.#apt-get Install lighttpd

2.#apt-get Install php5-cgi

Configure PHP

#vi/etc/php5/cgi/php.ini

At the end of the php.ini add

Cgi.fix_pathinfo = 1

3, configuration lighttpd support php

#vi/etc/lighttpd/lighttpd.conf

Add the upper fastcgi module:

Server.modules = (
"Mod_access",
"Mod_alias",
"Mod_accesslog",
"Mod_rewrite",
"Mod_fastcgi",
)

Of course you can choose the other modules you need//http://www.pprar.com

Change the order of the default home files , put index.html before index.php (depending on which program you want to install)

Index-file.names = ("index.html", "index.php",
"Index.htm", "default.htm")

Add a data transfer method (this is a must or not run up)

Server.network-backend= "Writev"

Then at the end add:

Fastcgi.server = (". php" = (

"Bin-path" = "/usr/bin/php5-cgi",

"Socket" = "/tmp/php.socket"

)))

After the modification is complete, restart lighttpd:

#/etc/init.d/lighttpd restart

4. Test If PHP starts normally

#vi/var/www/phpinfo.php

Add the following content

Then through the URL http://MSS IP address /phpinfo.php See if the normal display

5. Install PHP related modules

Find the available PHP modules

#apt-cache Search PHP5

Php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5 -ps Php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl Php5-json

Generally have the following modules, must be installed is php5-mysql, others can be selected as required

#apt-get Install Php5-mysql

6. Install MYSQL

It 's simple under Debian.

#apt-get Install Mysql-server

Note Set the root password

WordpressInstallation should not be a rare, attention must be installedHtmlStatic plug-ins that I have installedWP super Cachelighttpd128m15mswap and began to consider removing sqlite 。

300MHz CPU if do dynamic PHP basic affirmation 100% load, but if it is static html,CPU Basically no pressure, very fast.

lighttpd MySQL php simple tutorial

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.