Ubuntu 配置 NginX + PHP + FastCGI + MySQL 原来如此简单
来源:互联网 发布:卡巴斯基软件怎么样 编辑:程序博客网 时间:2024/05/11 14:21
# 准备工作:
# 1、安装一个Ubuntu(废话),本人用的是 Ubuntu Server 9.04,什么初始服务都没装
# 2、把更新源设置到国内网站,即编辑 sources.list,本人设置的是 mirrors.163.com 的,CN99的也不错。
# 3、更新系统,也就是sudo apt-get update
sudo su #务必以管理员模式运行
apt-get install nginx
apt-get install php-cgi php-mysql php-gd
apt-get install mysql-server
apt-get install rcconf
apt-get install lighttpd
update-rc.d -f lighttpd remove
#也可以用rcconf去除 lighttpd
vi /etc/nginx/sites-available/default
#index的一行修改为:index index.php index.html index.htm;
#去掉下面部分的注释:
location ~ /.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/nginx-default/$fastcgi_script_name;
Include /etc/nginx/fastcgi_params;
}
vi /etc/rc.local
#加入 spawn-fcgi -f /usr/bin/php-cgi -a 127.0.0.1 -p 9000 -C 10 -u www-data -g www-data
shutdown -r now #重启后即执行rc.local中脚本,启动Fast CGI进程
重启后如图所示
执行 w3m localhost 结果(phpinfo)
- Ubuntu 配置 NginX + PHP + FastCGI + MySQL 原来如此简单
- Ubuntu下安装Nginx+PHP+MySQL+FastCGI
- nginx php fastCGI配置
- Ubuntu上配置nginx+php+fastcgi的流程
- centos安装nginx+mysql+php+fastcgi+memcache最简单方法
- centos安装nginx+mysql+php+fastcgi+memcache最简单方法
- CentOS5下安装配置nginx+fastcgi php+mysql
- 通过yum安装nginx-mysql-php-fastcgi配置LNMP
- Nginx fastcgi模式 配置 php
- Ubuntu 配置Nginx+PHP+MySql
- 简单的nginx fastcgi配置
- Ubuntu 9.04 server安装nginx+php(fastcgi)
- nginx+PHP+PHP-FPM(FastCGI)在Ubuntu上的安装和配置
- nginx+PHP+PHP-FPM(FastCGI)在Ubuntu上的安装和配置
- nginx+PHP+PHP-FPM(FastCGI)在Ubuntu上的安装和配置
- nginx+PHP+PHP-FPM(FastCGI)在Ubuntu上的安装和配置
- nginx+PHP+PHP-FPM(FastCGI)在Ubuntu上的安装和配置
- [服务器] 体验 Nginx + PHP FastCGI + MySQL
- php+mysql+apache
- 对爱的理解
- 当代大学生应该加强礼仪修养
- 顺序链表
- principal.py源代码分析
- Ubuntu 配置 NginX + PHP + FastCGI + MySQL 原来如此简单
- geneXus对DATE型的操作
- Rational Rose 2003 下载_破解_排错
- Java入门(三)::Eclipse实战
- 感言
- 【BIOS】debug命令清除bios密码
- 查找php.ini路径
- 从mysql转换到oracle数据库
- 孤独,你害怕吗?