Debian Linux 平台3分钟构建 PHP Web Server

Web、Mail、Ftp、DNS、Proxy、VPN、Samba、LDAP 等基础网络服务
回复
头像
mycalf
帖子: 28
注册时间: 2009-06-26 0:21

Debian Linux 平台3分钟构建 PHP Web Server

#1

帖子 mycalf » 2009-06-26 0:57

首先安装好Debian操作系统。
随后,3分钟内搞定PHP+Mysql+Nginx+Fcgi

安装程序:
apt-get install nginx mysql-server php5-cgi php5-gd php5-mysql
在这里,根据自己系统下载spawn-fcgi的Deb包:http://packages.debian.org/zh-cn/sid/spawn-fcgi
或添加sid源:deb http://ftp.de.debian.org/debian sid main
执行: apt-get install spawn-fcgi
注意。sid非稳定版。将此源加入后,系统会有大量的升级提示。请忽略该提示。安装好spawn-fcgi后。将sid源删除。

程序配置:
1、Nginx
目标文件:/etc/nginx/nginx.conf
修改:

找到:# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
将下面代码修改为:
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/web$fastcgi_script_name; //home/web 为php网站的目录
include fastcgi_params;
}

2、spawn-fcgi
目标文件:/etc/rc.loacl

在结束语前加入:spawn-fcgi -a 127.0.0.1 -p 9000 -u wwwdata -g wwwdata -f /usr/bin/php5-cgi -F 5

整个构建过程结束
luoqiong219
帖子: 1
注册时间: 2009-06-26 16:50

Re: Debian Linux 平台3分钟构建 PHP Web Server

#2

帖子 luoqiong219 » 2009-06-26 16:55

具体有什么用阿
tusooa
帖子: 6548
注册时间: 2008-10-31 22:12
系统: 践兔
联系:

Re: Debian Linux 平台3分钟构建 PHP Web Server

#3

帖子 tusooa » 2009-06-30 22:09

代码: 全选

sudo aptitude install lamp-server
最简单的

代码: 全选

] ls -ld //
回复