Last update at :2024-06-14,Edit by888u
Perhaps last month, a netizen mentioned to Snail twice that he hoped to compile a tutorial on Lighttpd/SQLite/PHP VPS website building environment, because it is needed for website building. When I thought about this this morning, I still looked for online resources, and then supplemented and compiled articles and tutorials on the Lighttpd/SQLite/PHP environment. Because Snail has also found that Typecho, ZBLOG PHP, etc. all support SQLite databases and save resources than using MYSQL. Especially when using a VPS with low configuration memory, it is good to use SQLite databases.
Of course, no matter what project we use it for, in this article Snail shares the installation of Lighttpd/SQLite/PHP website building environment based on the Debian system. After referring to and consulting many articles, the installation was finally successful after half a day of testing.
Snail guesses that you may also need to use the following environment installation packages:
Complete Debian7 configuration LAMP (Apache/MySQL/PHP) environment and website building
Completely configure CentOS6 installation LAMP (Apache/MySQL/PHP) environment building tutorial
LEMP (Linux/Nginx/MySQL/PHP) one-click package installation and SFTP quick website building tutorial
First, upgrade the debian environment
apt-get update && apt-get -y upgrade
We need to upgrade the latest Debian environment status first, because if we don’t upgrade, the following environment packages may not be easy to install.
Second, install Lighttpd and SQLite database
apt-get install lighttpd #Install Lighttpdapt-get install sqlite #Install SQLite
Third, install the components required for the PHP environment
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 php5-xsl
Fourth, modify the php.ini configuration file (vi /etc/php5/cgi/php.ini)
cgi.fix_pathinfo is started and the value is changed to 1
Fifth, configure the /etc/lighttpd/lighttpd.conf file
server.modules = ( \\"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 italicized parts were added and modified by me, and the others remain unchanged.
Sixth, restart Lighttpd
/etc/init.d/lighttpd restart
In this way, Snail has completed creating/building Lighttpd/SQLite/PHP website under the debian system. Later we can create the site and install the website.
Recommended site searches: US imitation brand space, free static space, shopex virtual host, Hong Kong server rental 99idc, China's top ten domain name registrars, Yunnan server rental, space registration, high-defense server rental, US server, ICP registration number ,
发表评论