ubuntu 安装nginx

Nginx ("engine x") 是一个高性能的 HTTP 和 反向代理 服务器,也是一个 IMAP/POP3/SMTP 代理服务器。 Nginx 是由 Igor Sysoev 为俄罗斯访问量第二的 Rambler.ru 站点开发的,第一个公开版本0.1.0发布于2004年10月4日。其将源代码以类BSD许可证的形式发布,因它的稳定性、丰富的功能集、示例配置文件和低系统资源的消耗而闻名。

 

安装工具包 add-apt-repository

 

apt-get install python-software-properties 

 

 

添加GPG Key,  安装时需要用到

gpg --keyserver keyserver.ubuntu.com --recv-key ABF5BD827BD9BF62
gpg -a --export ABF5BD827BD9BF62 | apt-key add -

 结果

root@shell:~# gpg --keyserver keyserver.ubuntu.com --recv-key ABF5BD827BD9BF62
gpg: requesting key 7BD9BF62 from hkp server keyserver.ubuntu.com
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key 7BD9BF62: public key "nginx signing key <signing-key@nginx.com>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
root@shell:~# gpg -a --export ABF5BD827BD9BF62 | apt-key add -
OK

 

写道
apt-get update

 

编辑sources.list

vi /etc/apt/sources.list

 

在文件末尾加入

deb http://nginx.org/packages/ubuntu/ lucid nginx
deb-src http://nginx.org/packages/ubuntu/ lucid nginx

 

apt-get update 
apt-get install nginx

 这样最新版的nginx就安装好了

 

以下适用于PHP环境

我们可以通过PHP-FPM (PHP-FPM (FastCGI Process Manager)使nginx在PHP的环境工作,

PHP-FPM是另一种PHP FastCGI的实现方式。

 

apt-get install php5-fpm 
 

 

 安装MYSQL模块

 

sudo apt-get install php5-mysql 
 安装php5-gd模块

 

 

 

apt-get install php5-gd
 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值