您的位置:首页 > 运维架构 > Nginx

ubuntu编译安装nginx....心得

2013-05-08 00:00 274 查看
第一部:安装wegt

sudo apt-get install wget

第二下载nginx

wegt http://nginx.org/download/nginx-1.5.0.tar.gz
解压:

tar zxvf filename.tar.gz

查看configer

./configer但是提示

c complier cc is not found

是因为没有安装gcc,然后安装gcc

sudo apt-get install gcc

在执行./configure

但是:报错./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.

解决办法是:

sudo aptitude install libpcre3-dev

安装make

sudo apt-get install make

啊,发现好多依赖包需要安装,搜了一下安装常用的依赖包

2. 安装其他依赖包:
sudo apt-get install g++ curl libssl-dev apache2-utils gcc make automake python perl

sudo apt-get install libpcre3 libpcre3-dev
你可能还需要安装
sudo apt-get install openssl libssl-dev

OK

下面我们开始make

sudo make

然后make install

sudo make install
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: