通过APT-GET安装 NGINX
--(www.mulu001.com)
CopyRight owned by the original author.
sudo apt-get install nginx
装好后 可以直接用WEB访问了
然后安装MYSQL-SERVER MYSQL-CLIENT
因为在光盘中带了这个包
免去了下载的过程
(m ul u0 01 Social networking and discussion site!
填加到源里面
apt-cdrom add
m ul u0 0 1 -
安装 sudo apt-get install mysql-server mysql-client
m ul u0 0 1 -
安装PHP (m ul u0 01 Social networking and discussion site!
--(www.mulu001.com)
sudo apt-get install php5-cli php5-cgi php5-mysql
另外还需要安装 LIGHTTPD
apt-get install lighttpd
这个时候 NGINX 已经启动了所以这个起不来 80端口冲突 --(www.mulu001.com)
然后关掉这个服务的自动启动
REDHAT CENTOS中都有个 NTSYSV 还有 CHKCONFIG
在UBUNTU 中没的
(m ul u0 01 Social networking and discussion site!
m ul u0 0 1 -
今天装了个sysv-rc-conf (m ul u0 01 Social networking and discussion site!
同样是通过APT-GET安装的(这个东西比YUM 还好用)
然后把 LIGHTTPD 关了
CopyRight owned by the original author.
修改nginx的配置文件:/etc/nginx/sites-available/default
修改 server_name 192.168.1.88;(我ETH0 的IP 是这个) CopyRight owned by the original author.
修改index的一行修改为:
(m ul u0 01 Social networking and discussion site!
index index.php index.html index.htm;
(m ul u0 01 Social networking and discussion site!
去掉下面部分的注释:
m ul u0 0 1 -
location ~ .php$ { CopyRight owned by the original author.
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php; --(www.mulu001.com)
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 m ul u0 0 1 -
启动fastcgi php:
spawn-fcgi -a 127.0.0.1 -p 9000 -C 10 -u www-data -f /usr/bin/php-cgi
为了让php-cgi开机自启动
--(www.mulu001.com)
CopyRight owned by the original author.
sudo apt-get install nginx
装好后 可以直接用WEB访问了
然后安装MYSQL-SERVER MYSQL-CLIENT
因为在光盘中带了这个包
免去了下载的过程
(m ul u0 01 Social networking and discussion site!
填加到源里面
apt-cdrom add
m ul u0 0 1 -
安装 sudo apt-get install mysql-server mysql-client
m ul u0 0 1 -
安装PHP (m ul u0 01 Social networking and discussion site!
--(www.mulu001.com)
sudo apt-get install php5-cli php5-cgi php5-mysql
另外还需要安装 LIGHTTPD
apt-get install lighttpd
这个时候 NGINX 已经启动了所以这个起不来 80端口冲突 --(www.mulu001.com)
然后关掉这个服务的自动启动
REDHAT CENTOS中都有个 NTSYSV 还有 CHKCONFIG
在UBUNTU 中没的
(m ul u0 01 Social networking and discussion site!
m ul u0 0 1 -
今天装了个sysv-rc-conf (m ul u0 01 Social networking and discussion site!
同样是通过APT-GET安装的(这个东西比YUM 还好用)
然后把 LIGHTTPD 关了
CopyRight owned by the original author.
修改nginx的配置文件:/etc/nginx/sites-available/default
修改 server_name 192.168.1.88;(我ETH0 的IP 是这个) CopyRight owned by the original author.
修改index的一行修改为:
(m ul u0 01 Social networking and discussion site!
index index.php index.html index.htm;
(m ul u0 01 Social networking and discussion site!
去掉下面部分的注释:
m ul u0 0 1 -
location ~ .php$ { CopyRight owned by the original author.
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php; --(www.mulu001.com)
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 m ul u0 0 1 -
启动fastcgi php:
spawn-fcgi -a 127.0.0.1 -p 9000 -C 10 -u www-data -f /usr/bin/php-cgi
为了让php-cgi开机自启动