安装mysql
==================
1.yum install mysql*
2.启动:/sbin/service mysqld start
安装php
=================
1.yum install php
2.查看php安装目录:whereis php
安装lighttpd
=================
1.yum install lighttpd
2.yum search lighttpd(检测lighttpd没有被安装的依赖包)
3.yum install lighttpd-fastcgi.i686(必须)
4.yum install li9ghttpd-mod_mysql_vhost.i686
配置lighttpd.conf
==========================
1.vim /etc/lighttpd/lighttpd.conf
2.打开server.modules中的模块:mod_rewrite、mod_redirect、mod_alias、mod_access、mod_setenv、mod_fastcgi、mod_proxy、mod_compress、mod_accesslog
3.添加用户lighttpd,决定由他启动lighttpd
4.fastcgi.server = (".php" = >
("localhost" => (
"socket" => "/var/run/lighttpd/php-fastcgi.socket",
"bin-path" => "/usr/bin/php-cgi",
"max-procs" => 2,
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "5",
"PHP_FCGI_MAX_REQUESTS" => "3"
),
)))
5.添加一个虚拟主机,进行基本访问测试
添加:$HTTP["host"] == "www.test.com" {
server.document-root = "/data/www/test"
}
6.hosts中地址绑定
7.在其他机器上的hosts中绑定地址ip www.test.com
8注意防火墙,如果正常访问,恭喜你!
fedora下php环境.txt
最新推荐文章于 2022-05-19 16:21:24 发布