Steps for installing lighttpd/sqlite/php environment in Debian

Source: Internet
Author: User
Tags socket sqlite
First, upgrade the Debian environment
The code is as follows
Apt-get Update && apt-get-y upgrade
We need to upgrade the state of the latest Debian environment first, because it is not possible to install the environment package below.
Second, install LIGHTTPD and SQLite databases
The code is as follows
Apt-get Install lighttpd #安装Lighttpd
Apt-get Install SQLite #安装SQLite
Third, install the components required by the PHP environment
The code is as follows
Apt-get Install php5-cgi php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-mhash php5-ming php5- PS Php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc
Iv. Modify the php.ini configuration file (Vi/etc/php5/cgi/php.ini)
Cgi.fix_pathinfo boot and value modified to 1


V. Configure/ETC/LIGHTTPD/LIGHTTPD.CONF files

The code is as follows

"Mod_access",
"Mod_alias",
"Mod_compress",
"Mod_redirect",
"Mod_rewrite",
"Mod_fastcgi",
)
Server.document-root = "/var/www"
Server.upload-dirs = ("/var/cache/lighttpd/uploads")
Server.errorlog = "/var/log/lighttpd/error.log"
Server.pid-file = "/var/run/lighttpd.pid"
Server.username = "Www-data"
Server.groupname = "Www-data"
Index-file.names = ("index.php", "index.html",
"Index.htm", "default.htm",
"Index.lighttpd.html")
Url.access-deny = ("~", ". Inc")
Static-file.exclude-extensions = (". php", ". Pl", ". fcgi")
Include_shell "/usr/share/lighttpd/use-ipv6.pl"
dir-listing.encoding = "Utf-8"
server.dir-listing = "Enable"
Compress.cache-dir = "/var/cache/lighttpd/compress/"
Compress.filetype = ("Application/x-javascript", "Text/css", "text/html", "Text/plain")
Include_shell "/usr/share/lighttpd/create-mime.assign.pl"
Include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
Fastcgi.server = (". php" => (
"Bin-path" => "/usr/bin/php5-cgi",
"Socket" => "/tmp/php.socket",
"Max-procs" => 1,
"Bin-environment" => (
"Php_fcgi_children" => "4",
"Php_fcgi_max_requests" => "1000"
),
)))
The italic part is the one I added and modified, the other unchanged.
Vi. Restart LIGHTTPD
The code is as follows
/ETC/INIT.D/LIGHTTPD restart
In this way, the old left in the Debian system to create/build lighttpd/sqlite/php station Exchange completed. We can create a site and install a Web site later.
Related Article

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.