Ubuntu 9.04 APT-GET 安装nginx+php+mysql
2011-09-09 10:10
537 查看
通过APT-GET安装 NGINX
sudo apt-get install nginx
装好后 可以直接用WEB访问了
然后安装MYSQL-SERVER MYSQL-CLIENT
因为在光盘中带了这个包
免去了下载的过程
填加到源里面
apt-cdrom add
安装 sudo apt-get install mysql-server mysql-client
安装PHP
sudo apt-get install php5-cli php5-cgi php5-mysql
另外还需要安装 LIGHTTPD
apt-get install lighttpd
这个时候 NGINX 已经启动了所以这个起不来 80端口冲突
然后关掉这个服务的自动启动
REDHAT CENTOS中都有个 NTSYSV 还有 CHKCONFIG
在UBUNTU 中没的
今天装了个sysv-rc-conf
同样是通过APT-GET安装的(这个东西比YUM 还好用)
然后把 LIGHTTPD 关了
修改nginx的配置文件:/etc/nginx/sites-available/default
修改 server_name 192.168.1.88;(我ETH0 的IP 是这个)
修改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;
}
重新启动nginx:
/etc/init.d/nginx stop
/etc/init.d/nginx start
启动fastcgi php:
spawn-fcgi -a 127.0.0.1 -p 9000 -C 10 -u www-data -f /usr/bin/php-cgi
为了让php-cgi开机自启动
sudo apt-get install nginx
装好后 可以直接用WEB访问了
然后安装MYSQL-SERVER MYSQL-CLIENT
因为在光盘中带了这个包
免去了下载的过程
填加到源里面
apt-cdrom add
安装 sudo apt-get install mysql-server mysql-client
安装PHP
sudo apt-get install php5-cli php5-cgi php5-mysql
另外还需要安装 LIGHTTPD
apt-get install lighttpd
这个时候 NGINX 已经启动了所以这个起不来 80端口冲突
然后关掉这个服务的自动启动
REDHAT CENTOS中都有个 NTSYSV 还有 CHKCONFIG
在UBUNTU 中没的
今天装了个sysv-rc-conf
同样是通过APT-GET安装的(这个东西比YUM 还好用)
然后把 LIGHTTPD 关了
修改nginx的配置文件:/etc/nginx/sites-available/default
修改 server_name 192.168.1.88;(我ETH0 的IP 是这个)
修改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;
}
重新启动nginx:
/etc/init.d/nginx stop
/etc/init.d/nginx start
启动fastcgi php:
spawn-fcgi -a 127.0.0.1 -p 9000 -C 10 -u www-data -f /usr/bin/php-cgi
为了让php-cgi开机自启动
相关文章推荐
- ubuntu 使用apt-get install 安装php5.6--php7
- Ubuntu下使用 apt-get install 安装php扩展库mcrypt、curl、gd
- ubuntu使用apt get install 安装nginx和php-fpm
- ubuntu 使用apt-get install 安装php5.6--php7
- ubuntu通过apt-get方式搭建lnmp环境以及php扩展安装
- ubuntu下安装php5.6开发环境sudo apt-get install phpmyadmin sudo apt-get install php-mbstring sudo apt-get
- 在ubuntu中用apt-get安装LEMP栈(linux+nginx+mysql+php)
- ubuntu下通过apt-get安装的php.ini所在目录
- Ubuntu使用apt-get安装PHP指定版本
- 在ubuntu中用apt-get安装LEMP栈(linux+nginx+mysql+php)
- ubuntu+apache2+php5+mysql5.0的安装(apt-get安装路径)
- ubuntu下用apt-get 安装PHP+MYSQL+Apache
- Ubuntu下apt-get 安装apache2、php、mysql后的默认路径
- ubuntu 使用apt-get install 安装php5.6--php7
- ubuntu 使用apt-get install 安装php5.6--php7
- Ubuntu 9.04 server安装nginx+php(fastcgi)
- [Linux] Ubuntu_9.04_server安装nginx+php(fastcgi)+nginx虚拟主机配置格式
- ubuntu 使用apt-get install 安装php5.6--php7
- ubuntu通过apt-get方式搭建lnmp环境以及php扩展安装