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.
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.