在Debian Squeeze上安装Nginx+PHP5+MySQL
这是一篇纯粹为菜鸟谋福利的翻译教程(也是哥第一次装逼翻译)。为啥说是为菜鸟谋福利呢,因为老外写的教程通常都非常详细,每一步你需要做什么,为什么要这样做,会遇到什么问题都一一列了出来。所以,你懂的。
原文地址:
http://howtoforge.org/installing-nginx-with-php5-and-mysql-support-on-debian-squeeze
Tips:如果是想从Apache上迁移到Nginx只需要先停止apache服务
/etc/init.d/apache2 stop
然后卸载之
apt-get remove apache2
再然后略过以下已安装过软件步骤即可。
1、安装MySQL5
apt-get install mysql-server mysql-client
执行后进入安装,过程中会遇到MySQL提示为root用户设置密码:
New password for the MySQL “root” user: <– yourrootsqlpassword
Repeat password for the MySQL “root” user: <– yourrootsqlpassword
2、安装Nginx
Nginx已经被包含在了Debian Squeeze软件源中,所以我们只需要直接从源中安装:
apt-get install nginx
安装完成之后启动Nginx:
/etc/init.d/nginx start
Nginx默认的根目录是/var/www。如果没有这个目录,必须创建一个(并且设置目录所有者和用户组,以确保有权访问):
继续阅读 »
Tags : nginx